4.22 runtime auto instancing question

If I have 100 different static meshes, all set to world static, and they all use the same material, does that equal 1 draw call in 4.22?

Does LODs work on those different mashes for auto instancing?

If 50 of those static meshes are outside of the player camera, do they also get culled?

(I’m asking because our current workflow is to use the “merge actors” tool to merge those actors, which I think means they won’t be culled and there will only be LODs calculated for one object.)


Automatic instancing groups all visible static meshes (mobility doesn’t matter here) with the same LOD level and material instance. In this case meshes with LOD0 would be one draw call, meshes with LOD2 would be a second draw etc. You can verify it yourself by toggling r.MeshDrawCommands.DynamicInstancing and checking its impact on draw call stats or by using r.MeshDrawCommands.LogDynamicInstancingStats.

Keep in mind that automatic instancing is happening pretty late in the pipeline . Every mesh needs to be processed and culled individually and they are merged just for the final GPU submission. This means that depending on a specific use case it may be better to merge those meshes manually.

Just to add a key word here. All identical visible static meshes… (basically they are all copies of each other, originating from a single entity).

How is it that mobility doesn’t matter? Don’t moveable actors need to be rendered with a different shader (supporting volumetric lightmap) than static ones (supporting lightmaps)?