I’ve made a 500k poly brick asset which I’ve constructed a wall with using hundreds of copies. The wall looks great and by all metrics I’m aware of I see no performance impact. I’m using STATS nanite and STATS scenerendering to view the draw calls and in both places draw calls are not being added as I add bricks.
Is this a viable practice with Nanite to work with such small modular pieces as single bricks? Is anyone aware of issues I might hit in the long run. For example if I was to go beyond a wall and build a whole city or castle this way out of a single brick asset.
It kinda depends… but my advice would be to merge your pieces into larger modular meshes if you can.
For consideration of Nanite alone, I don’t think it will be a huge issue. You’ll end up with more Nanite overdraw and more instances. Overdraw will really depend on your meshes, but having more instances shouldn’t be that big of an issue provided you don’t get too granular with it, right now the engine has a 16 million max instance count limit, including Nanite meshes:
Docs
The maximum number of instances that can be present in the scene is hard-locked to 16 million instances, which includes all instances that are streamed in, not just ones enabled for use with Nanite. Only instances streamed in are counted towards the total.
However where problems start to emerge is when you involve other features of the engine, if you’re using any hardware raytracing features, that instance count gets waaay smaller:
Docs
In order to achieve a 30 frames per second target on next generation consoles, scenes should generally have 100,000 instances or fewer in the Ray Tracing Scene after culling. On Windows, the number of instances can vary significantly.
If you’re using Software Raytracing in Lumen or the Global Distance Field, small meshes also get culled from the Lumen scene more quickly, and if they are too small then they may not even be added at all to the Lumen Scene or Global Distance Field. I found this to be a big issue creating a roof out of individual shingles for example. They were too small to have any representation in the Global Distance Field so there were huge holes in my GDF/Lumen scene.
Thansk so much for your time.
Very helpful and I understand the limitations much better now.
In reference to your shingles, that is the core of what I’m trying to do. I want to find a satisfying way in UE5 to handle what I used to do with tesselation and tileable textures on planes, roofs, floor planks, brick walls. To let things be unique and have charm I don’t want to export every single floor / wall / roof layout as a 20-30 MB mesh when packed. I’ve been looking to modular pieces to try to address this but that also seems to have short comings.
Appreciate the time you took on this and thank you again!
Does InstancedStaticMesh component count as one or many? Packed Level Actors internally use ISMs. So if we create such wall using one brick mesh and next create a Packed Level Actor how does it sum up?