I have a very complex model I have coded for everything I need, camera’s, fog, buttons for the camera’s, highlight layers, pop-up text. Everything I need now to move forward to launch bar the performance.
This model is a very reduced playground of the full city and I’m still struggling to get past the 10fps. I have even put in some code to optimize it but I have very little understanding of this.
My main model uses incremental.babylon to help with the loading but because of the size of the full city (100mb) it’s not a great user experience. I’ve optimized the model to the max in blender without destroying the shape of the buildings.
This is the reduced city scape with just a few models in. If someone could help me with understanding how I could optimize this that would be a great help. I’ve tried looking through the forum but most models aren’t exported.
The main model has 600 buildings by the way I can share any screenshots needed from the main playground but I didn’t want to share that to the world. I was hoping to optimize on this easier playground first.
Hmmm I think the first step on optimization will be understanding what is taking the most time with your model. Is it the geometry, the materials, culling, etc? For this, you’ll want to check the performance tab of your browser, and The Performance Profiler | Babylon.js Documentation (babylonjs.com). Play with them a bit and see if there is anything that catches your attention there and share with us.
Is there a way to freeze specific meshes once they have loaded? I’ll need everything else for highlighting and selecting as that function won’t work.
Re grouping meshes, is that something you can do in babylon for an exported model? There are quite a few grouped meshes (identical buildings / meshes) already but I also need to be able to select meshes for highlighting buildings (individual ones rather than the group).
Thank you. I’ll give that a try. I was also thinking maybe to keep static camera’s in for my incremental file so that it reduces the initial load. I may struggle to get the above coded correctly but I’ll give it a go.
Hi, is there any chance you could show me how to freeze only certain meshes please? I can freeze them all but then I can’t highlight them after that. Also the merge meshes is very complicated. I looked at the code in the documents and I can’t get my head around it. I don’t know whether it’s because my objects have a cube.001 etc. rather than a clean name (no dots). But it’s probably my attempt at coding.
If there’s any chance you can show an updated view on my playground that would be of great help.