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: :frowning:](https://emoji.discourse-cdn.com/win10/frowning.png?v=9)
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
Sorry I missed it ![:slight_smile: :slight_smile:](https://emoji.discourse-cdn.com/win10/slight_smile.png?v=9)
Please provide a working repro in the playground and I promise I will fix it right away ![:wink: :wink:](https://emoji.discourse-cdn.com/win10/wink.png?v=9)
1 Like
Why is setting the color not working, thanks!
https://playground.babylonjs.com/#9ZS92P#5
![微信截图_20230313180302](https://global.discourse-cdn.com/business7/uploads/babylonjs/original/3X/7/e/7e506871b5f38e9a730576595fab24be21285b20.png)
Thank you, albedo comes from the downloaded file, I hope the official can fix this problem.
![微信截图_20230314092245](https://global.discourse-cdn.com/business7/uploads/babylonjs/original/3X/1/2/128015bd87f6c13ca080f41963d96b48c14e07b6.png)