Dad72 Posted June 30, 2018 Share Posted June 30, 2018 Hi, When I activate the music on my scene (with a lot of object) and if use SceneOptimizer, I get the ripples of the music on the ground in the form of a shadow. It happens when I use: mesh.material.freeze(); or the subdivision of the land ... See screenshot. The code is : this.music = new BABYLON.Sound("musicZone", "myMP3.mp3", this.scene, null, { volume: 1.0, loop: true, autoplay: true, streaming: true, spatialSound: false }); BABYLON.SceneOptimizer.OptimizeAsync(scene, optionOptimizer()); function optionOptimizer() { var result = new BABYLON.SceneOptimizerOptions(60, 1000); result.optimizations.push(new BABYLON.ShadowsOptimization(0)); result.optimizations.push(new BABYLON.LensFlaresOptimization(1)); result.optimizations.push(new BABYLON.TextureOptimization(2, 256)); result.optimizations.push(new BABYLON.PostProcessesOptimization(3)); result.optimizations.push(new BABYLON.ParticlesOptimization(4)); result.optimizations.push(new BABYLON.RenderTargetsOptimization(5)); result.optimizations.push(new BABYLON.HardwareScalingOptimization(6, 4)); return result; } I can not reproduce it on the PG, I do not know what is causing the problem and I use a lot of things on my project. I know that if I disable freeze on the material, it does not make this problem any more. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 2, 2018 Share Posted July 2, 2018 I don't see the direct relationship between music and sceneoptimizer This is freaking weird. But here is one explanation: The music consumes a bit of CPU and enough to trigger an optimization. So when there is no music the optimizer does not activate the same options Then freezing materials is no more a big deal with latest optimization from 3.2 so you should try without it Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 2, 2018 Author Share Posted July 2, 2018 Yes it's strange. I had a hard time finding the relationship too, but the shadow is moving in relation to the music. I will try the last of the optimizer and would keep informing if it works better. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted July 3, 2018 Author Share Posted July 3, 2018 It's perfect with the new sceneOptimizer, it works much better, more artifact. I can even increase parameters for the optimization of the terrain without the problems that I had. I even feel that my scene is more fluid with the new optimizer. and yet the scene a lot of unique mesh (low poly) I'm at 60 fps with this scene: (Pictures in preview of my next project) Thanks DK for the new optimizer. Quote Link to comment Share on other sites More sharing options...
Guest Posted July 3, 2018 Share Posted July 3, 2018 Excellent news..And cool project! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.