I have observed that the difference between using StaticMesh and InstancedStaticMesh lies in the fact that, in the former, every time a 3D object is drawn on the screen, it generates 1 drawcall (not counting the textures associated with the model). For example, if a wall that is part of a modular kit appears 30 times in a corridor, 30 drawcalls will be generated (only if all 30 wall sections are visible at once).
On the other hand, when using InstancedStaticMesh, a single Blueprint configured with ISM and the same wall module as in the previous case will generate only 1 drawcall, regardless of whether that module is instantiated 1 or 100 times.
Now, the following question arises:
Does it make sense in terms of performance to exclusively use StaticMesh in a modular kit if an excessive number of modules will never be visible on the screen simultaneously?
Using only StaticMesh, these will not be rendered until the camera has them within its frustum. I believe that the performance difference is insignificant when choosing either method (PC, Console). For instance, if my player is inside a room, only the models they can see will be rendered, which might be 4 or 5 walls of the modular kit at a time, and the rest will be omitted until they enter the camera's field of view. In this case, there would be 4 or 5 drawcalls depending on the number of visible modules.
I find it more useful to use the InstancedStaticMesh method when viewing a landscape from a certain height and thousands of objects can be seen on the screen at once (or perhaps in this case, it would be better to use Hierarchical Instanced Static Mesh).
(The information I provide here is based on my understanding of how these systems work in Unreal; if I am mistaken at any point, I would appreciate your correction to ensure a correct approach).
I have noticed that many artists do not use any system other than the basic StaticMesh and usually do not experience performance issues.
Replies
You'd need to have a pretty low detail environment to not want to use them. Interiors for games aren't just four walls anymore.
Aside, Nanite more or less makes the distinction between SMs and ISMs irrelevant, you only ever pay for 1 draw per material.
There would be more than one room visible in a complete level. And there'd probably be bigger rooms than this (and smaller ones).
Not every mesh would need to be part of an ISM but it's something you'd use if you needed to. Especially if you found areas which had a high mesh count.
Also many automated level creation tools use ISM meshes. For example PCG networks usually create ISM mesh groups.
That and Nanite does make any conversation around instancing from the artist perspective a lot muddier, it allows artists to get away with a lot more before draw calls start to be an issue without them even noticing. HLODs seems generally more important for fixing environment art related performance issues.
Properly profiling and knowing what is happening behind the scenes is a giant rabbit hole, I'd normally say it's a bad idea for artists to make assumptions and optimize too early only based off assumptions and second hand info, gotta profile to really know what's causing impact.
Instanced static mesh just did not exist in older versions of the engine. It wasn't properly supported by hardware before DirectX 11. Even after implementation in DirectX some hardware still didn't support it.
Many tutorials aren't a realistic representation of a actual game workflow. They show some of the techniques but aren't taking into account the other things that you'd need to ship a game.
Were these "older pieces" a game? people don't usually optimize non-game art or worry too much about things like framerate unless it's a playable level.
if you're interested in this stuff for fun purposes I strongly recommend looking into older stuff - nothing really significant has changed since ue4 released, it's all iterative (if you ignore raytracing, which you should).
The dx7-9 era was a really interesting time IMO - people had to get really inventive back then