Render a subset of objects within a scene?

Suppose I have a scene graph populated with renderable objects. With one camera I want to render the entire scene, and with another camera I want to render just a small subset of the objects within that scene. What is the best way to go about this?

I see a method WebGLRenderer.renderObjects([…objects], scene, camera) in the source code, and while it appears to do what I’m after the method isn’t accessible.

Failing that, my other best option appears to be to move just those objects that I want to render into their own scene and render, and then move them back into the main scene. This is undesirable for a few reasons – synchronizing back and forth will be error prone and potentially slow.

Any thoughts on how to best approach this problem?

Thanks!

Hi!
Maybe try something with layers?

2 Likes

Layers look like a good fit for this. Thank you!