Back to the Shapespark home page

Refletion Probe Update with material change


I would like to know if its possible to change the reflection when a material is changed. A re-bake of the reflection per say.

If it’s not possible I would like help on a problem that is being caused by the reflection probes.

In my scene all walls have a full white material applied and I bake the lighting inside Shapespark with it. Then I export the bundle and add some code to change the default texture the walls start with. The problem is I don’t want the reflection probe to change the calculated reflection (done with full white walls) to reflection that shows the default texture I’m adding through code after.

Scene on Shapespark:

Scene with default textures I had through code:

Scene after using material picker (the reflection from the default texture are applied this is what I want to avoid):

Is the any solution to at least make the reflection stay with the full white bake?


It is not possible to regenerate lightprobes. To ensure the lightprobes use the default material, you need to replace the materials when WALK.getViewer().onSceneLoadComplete() is run or later. Doing the replacement when WALK.getViewer().onSceneReadyToDisplay() is run is too early and lightprobes will use the textures set by your code.