SceneRecorder not applying every change

Hello, I have two react projects with Babylon versions 4.2.0.
I’m using the SceneRecorder class to record the changes that happen to the scene in the first project and applying the delta file to the scene in the second project.
In the first project, I start the recording 2 seconds after the model is loaded (this way it records only the changes and does not include all the meshes). When I press on a button it triggers a function to get the delta file using the getDelta function and it downloads a file as JSON format.

The problem is that when I apply the delta file in the second project some changes are applied to the model (Roughness, Metallic, Transparency) and other changes are ignored (Lightning, Color, Index of Refraction, F0 Factor, enabling the Clear Coat).

Any kind of help would be appreciated.

Hey if you can repro it in the playground I will make sure to make it work

Hello @Deltakosh
Since I am using Babylon in a react project I can’t replicate the code 100% but I tried my best with this playground
https://playground.babylonjs.com/#RX3KJM
This downloads the delta file for me and in my second project I am applying the delta file on a glb model using the inspector.

I do not see where you are applying changes :frowning:

Recorder is checking changes applied between the record start and when you call getDelta

I told you that I am applying the delta file that I downloaded in the second project on the same model
Here is the code that applies the changes in the second project

import savedChanges from “./assets/advanced-settings.json”; // delta file
BABYLON.SceneLoader.Append("", “Car.glb”, scene, (scene) => {
setTimeout(() => {
BABYLON.SceneRecorder.ApplyDelta(savedChanges, scene);
}, 2000);
});

I did everything just like the documentation and many changes are not being saved like when you enable CLEAR COAT, ANISOTROPIC, or SHEEN and their settings are not being saved.

I’m sorry if my explanation wasn’t / isn’t clear enough

@Deltakosh :pleading_face:

Sorry I missed it :slight_smile:
Please provide a working repro in the playground and I promise I will fix it right away :wink:

1 Like