Real time environmental/scene reflection

I am looking to achieve real time environment/scene reflection on this particular object. But the issue is, since it uses PBR shader, it automatically creates a default environment from a texture. So can someone please freely edit my playground so that I get real time reflection on this shark (Skybox and also the mesh beside it on it?)

This is the image that gets reflected on the shark

adding @sebavan

You could use real time filtering with reflection probes for this: Reflection Probes | Babylon.js Documentation

1 Like

Thank you, I shall try that. I have a doubt, for probes to work we must add objects to the list. Is there a way to keep it default? As in it takes in everything that is present in the scene?

    var probe = new BABYLON.ReflectionProbe("main", 512, scene);
   //Instead I want:

You normally want to control manually what goes in but I guess if put renderlist to null it might render all.

Hi @sebavan, I tried to use probe.renderList = null; but it does not work. I thought it would render everything in the scene but that is not the case. It literally renders null.


You can iterate all meshes on a scene and put them in probe.renderListscene.meshes.forEach(mesh => probe.renderList.push(mesh))

You might find my experiment snippet useful.

1 Like

Be careful to remove the actual mesh using it from your list :slight_smile: or you will have an infinite loop

1 Like