Is it possible to render a shape above everything but with exceptions

Hey guys. I was wondering if it’s possible to render a shape above everything else save for one other object. In my case, I have a ring geometry that i want rendered above everything save for one plane in my scene. Any help or advice you can give me to point me in the right direction would be much appreciated.

You can add the shap and that object in group and add that group to scene and since you have multiple objects you can convert this into function.

const addObject = (object) => {
  const ringMesh = new Mesh(ringGeometry, ringMaterial)
  const group = new Group();
  group.add(ringMesh)
  group.add(object)

  return group
}

const object1 = addObject(planeMesh)
scene.add(object1)

Hey @bhushan6 so i’ve tried doing as you suggested and it worked perfectly! Can’t thank you enough

1 Like