Pryme8 Posted October 19, 2016 Share Posted October 19, 2016 So I love what happens to the performance when you run the scene optimizer, But I have some questions... what is it actually doing? Can I manually control some of these features? Why would some of my meshes disappear? Mainly Im wondering whats happening to my ground meshes they seem to be getting dropped out. Any hints? When at street level, walking around in the buildings after the scene optimizer I can get it to hold a constant 20 fps which on my system is pretty bossy (my dog peed on the motherboard to my development rig so I have been stuck on a old beat up i7 that I put together from spare parts years ago, which sucks but at the same time is cool because if this can run it any modern system would be able to) If I can figure out whats causing the meshes to drop then I will definitely be using the optimize function. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 19, 2016 Share Posted October 19, 2016 Did you see this? http://doc.babylonjs.com/tutorials/How_to_use_SceneOptimizer Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 19, 2016 Author Share Posted October 19, 2016 nope that did not come up when i googled thank you Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 19, 2016 Share Posted October 19, 2016 doc.babylonjs.com has a integrated search engine Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 19, 2016 Author Share Posted October 19, 2016 Yeah I only came up with Octrees and Instances when I looked up scene optimization, I must have overlooked this. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 19, 2016 Author Share Posted October 19, 2016 So I am looking at the doc you posted and Im kinda confused by what its telling me to do... BABYLON.SceneOptimizer.OptimizeAsync(scene, BABYLON.SceneOptimizerOptions.ModerateDegradationAllowed(), function() { // On success }, function() { // FPS target not reached }), why does that have a comma at the end what else is it expecting from me? var result = new BABYLON.SceneOptimizerOptions(60, 2000); var priority = 0; result.optimizations.push(new BABYLON.ShadowsOptimization(priority)); result.optimizations.push(new BABYLON.LensFlaresOptimization(priority)); // Next priority priority++; result.optimizations.push(new BABYLON.PostProcessesOptimization(priority)); result.optimizations.push(new BABYLON.ParticlesOptimization(priority)); // Next priority priority++; result.optimizations.push(new BABYLON.TextureOptimization(priority, 256)); // Next priority priority++; result.optimizations.push(new BABYLON.RenderTargetsOptimization(priority)); // Next priority priority++; result.optimizations.push(new BABYLON.HardwareScalingOptimization(priority, 4)); return result; I see this, but how does this work with calling it because this looks like the contents of a function. then at the end it talks about this: function mySceneOptimization(priority) { if (typeof priority === "undefined") { priority = 0; } this.priority = priority; this.apply = function (scene) { // Work on scene... }; } I mean the documentation is there, but it makes little to no since, do you know of a working example I can look at? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 19, 2016 Share Posted October 19, 2016 Fixed the comma typo Regarding the rest of your question, not sure to understand. Just call BABYLON.SceneOptimizer.OptimizeAsync(scene, BABYLON.SceneOptimizerOptions.ModerateDegradationAllowed()) to get the moderate degradation option. Moderate means: Level 0: ShadowsOptimization and LensFlaresOptimization Level 1: PostProcessesOptimization and ParticlesOptimization Level 2: TextureOptimization(2, 512) Level 3: RenderTargetsOptimization Level 4: HardwareScalingOptimization(4, 2) The advanced usage chapter allows you to create your own degradation option. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 19, 2016 Author Share Posted October 19, 2016 Ok gotcha! GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 19, 2016 Author Share Posted October 19, 2016 What is causing the optimization to drop my ground mesh's and nothing else? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 20, 2016 Share Posted October 20, 2016 Tough to say without a repro case..Maybe a bug? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted October 20, 2016 Author Share Posted October 20, 2016 Yeah I can't provide that as off now,. I think the work around will be the retopo of the elements and not doing the aggressive optimization. gryff 1 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.