I would like to council you regarding scene optimization.
- I tried a lot of things from here: Optimize your scene - Babylon.js Documentation. But the effect was hardly measurable or it broke my scene, meshes were not drawn anymore etc…
- I also checked out scene optimizer.
However I am looking for additional leverages.
I think my situation is somewhat specific.
- I am drawing a huge amount of simple meshes
- Imagine a warehouse with a lot of boxes in the shelves. (Shelves and boxes are instanced wherever possible).
- The shelves are all instanced (I spawn a shelve prototype and then create instances of those prototypes)
- The products in the shelves can be displayed on demand. Those are drawn as simple cubes with different colors (5-10). There might be up to 30k boxes (all instanced, such that I have only as much “non-instanced” meshes as I have colors (5-10).
- Things become very slow (fps) if I spawn the boxes. (I am a bit surprised as according to my perception the shelves are harder to render then the boxes, however it seems to be contrary)
As mentioned I am looking for additional leverages.
Which settings would you advise me to test / which are important in your experience?
Or more in general do you have tips for me how I can discover performance issues?
Some other ideas I wanted to test (maybe you could evaluate those before I waste time ^^):
- Create a sphere around the free cam (“horizon”) to reduce the number of meshes visible
- Displaying the boxes on an transparent offscreen canvas and sync the position of the free cam - However I am not sure how it will behave, if one scene is faster then the other.
Thank you in advance.