Making mesh invisible for the camera but still available for ReflectionProbe

I’ve been using ReflectionProbe feature for my project, and I use plane meshes with emissive
textures and making my primal mesh reflect those planes, however I do not want these plane meshes to appear in my scene, so my question is:
Is there any way for me to reflect meshes with ReflectionProbe and make reflected meshes not
render in the scene?

Please use following link for the ReflectionProbe reference:

Thank you in advance BabylonJS community!

For example in Blender & C4D there are functions using which you can hide meshes from camera, but reflections by other meshes still stay in the scene, that’s what I’m trying to achieve. (If my question was not clear, thought this would help clarify);

You can change the layerMask of the camera before rendering into the reflection texture (and reset it after). Something like this:

In this PG, I have set a specific layerMask for the blue/red/yellow spheres so that they are rendered only by the reflection probe (lines 33/37/41 and 88-94).


Thank you very much for making my life easier,
btw do you have any idea on how to blur those probe reflections?

The PGs in this thread are doing the blur with a post process (but it’s not a cube texture):

In the same thread, using a cube texture (probe):

1 Like

I was aware of that but thank you for taking time, I really appreciate it.

1 Like