Best practice with having thousands of static mesh instances with different materials assigned to them?

Doesn’t really change anything if the end result is the same.

1b rocks of a + 1b rocks of a is just as bad as 2b rocks of only a or 2b rocks of only b.
The only benefit would be to have 1b rocks total, .5b of A and .5b of B.

Instancing works on each material, so having 2 materials means worse performance. True.
But it also doesnt really matter until you get to 40 or 60 unique instances.

Total numbers matter, but they also don’t.
Less is better. Always. For performance.
In the end, the maximum number of instances on screen is handled by the system you use for instancing.

Something like foliage is optimized for it. It groups things so that they share drawcalls automatically.

Something like a custom HISMC is not optimized for loading stuff, so you don’t get extra benefits, but you also dont usually use those systems for 1b instances.

Search online for
Ue4 optimization Intel.
Read their paper where they explain the limits/considerations and options for instancing.

Though dated (I think like 6 or 7 years now) its still verymuch a “baseline” principle/truth/best paractice worth knowinf about.

What happens when you do have billions of hismc ?

2 Likes