How to quickly update the renderList of ReflectionProbe

I have some mesh, they are frequently active. Is there any good way to quickly update the renderList of these probes

this is a demo: Babylon.js Playground

Hello and welcome to the Babylon community!

Since the trees themselves don’t move, I would probably try something like this: distribute the trees in a 2D grid, and keep track of which grid cell the ball is over at the moment. Whenever the ball changes grid cell, clear the current renderList and add all trees of that grid cell in the renderList.

1 Like

because renderList is readonly, I can only operate through array method. Is there a quick way to reset the renderList?After updating the renderList in the example, it seems that the reflection map did not update correctly. Is it caused by frequent updates to renderList during rendering loops?

You can quickly reset an array by doing array.length = 0 and it should update the reflection map accordingly: ReflectionProbeTest | Babylon.js Playground (babylonjs.com)

If you print out the length of reflectTrees in your example, you can see it doesn’t have anything, that’s why it’s not reflecting anything:

Thanks