I have been working a great deal on performance issues lately around adding detail models into Zotbox. I wanted to explain the changes and progress since it may help other developers working with similar designs.
My goal for Zotbox and Lost Loot is to achieve a fairly dense environment which means lots of trees, bushes, grass etc. This is extremely difficult in mobile VR. I am excited to have made some solid progress recently!
Here is the end result which is a fairly dense scene on Quest 2 with a nice stable GPU that isn’t being overwhelmed.
Block Terrain Combined with Details
I started out with the approach to doing Minecraft style block terrain combined with detail objects that are models made in Blockbench. This gives a great retro art style and avoids the complete blocky look of Minecraft. This is also the approach seen in other newer blocky style games like the sadly abandoned Hytale, the hardcore survival game Vintage Story, and the in development Everwind.
These all have a mix of blocky terrain combined with details that are more like low poly, low res models. The best example of this technique is the more complex trees. Trunks are generated in a blocky nature and expand in various ways using block models then there are more sophisticated details for leaf bunches or fronds. It creates a nice look and can be generated just as easily as blocks. This is essentially Minecraft block models but pushed to be more full fledged models.
SRP Batcher to the Rescue – Not Really!
When I started putting this approach together in Zotbox I was using URP and decided to take advantage of the SRP batcher. The SRP batcher combines similar models even with different textures, so long as the same shader variant and keywords are in use.
My plan was to simply let the SRP batcher handle batching the detail models for me. I would generate chunks for the terrain and just have a pool of detail models that would be reused over the terrain as the player moved around.
This worked pretty well until I need to do many, many detail models. The SRP batcher works great but is not magic and there is overhead to batching lots of models. The Quest 2 just can’t handle this and scenes like in the video were just too much.
Here is a previous walk through of the scene relying on the SRP batcher to combine details. This similarly was not overwhelming the GPU but as you can see the density of the scene is low.
Two Detail Systems and Meshing by Chunk
So I decided to go down the path of having two different types of detail model systems that are interchangeable. The existing system is kept for dynamic details where there must be a full model present. The standard details will contain the bulk of the details in the scene and be combined into a single mesh per chunk similar to the ground and the water (which is also blocky although not evident yet!).
This has worked very well and the Quest 2 has been able to handle this much better. The combined details has light weight replicas that have things like physics colliders but no rendering elements. The asset blocks are also placed in the same way which is what creates the AO effect and makes the block based global illumination work with details (the rocks, trees, plants help block the light when the torch is on the ground).
Going forward I plan to have these systems work together. For example when the player begins to chop a tree it will be swapped with a dynamic version and then effects can be applied to that full model like shaking and changes to parts of it or decals etc.
The SRP Batcher is Still What Makes it Work!
Just to be clear the SRP batcher is still integral to all this working. It batches together all the chunks (both block and detail meshes) and similarly batches the water meshes (they are transparent and use the water shader so are in a separate batch group). The big change is that the SRP batcher isn’t trying to reduce thousands of detail models and instead is handling hundreds between the chunk meshes and the other entity models (crates etc.) Just check out these Stats and batches in the Frame Debugger.
I am so excited to be unbound by some of these performance issues. My dream is to have a fairly rich open modifiable world here so looking forward to what’s next!



