Search code examples
camerathree.jsraytracing

Exclude objects from camera in Three.js


i'm wondering if it's possible to hide a list of objects from a camera (used to build a reflaction map over a plan, simulating the water). So basicly i'd want to hide a list of objects from the water reflaction.

The Object3D.visible property will of course hide the object for the main camera too so it's useless.

Any idea?


Solution

  • before you update the reflection camera, hide the objects, when the reflection map is rendered, make them visible again.

    without your current code i wouldnt be able to provide you with example code since there are several ways to accomplish reflection.