Home Unreal Engine

Please explain difference between static mesh (instance) and an Instanced static mesh?

arcitek
polycounter lvl 2
Offline / Send Message
arcitek polycounter lvl 2

I have run into some confusion on when is a static mesh actually an instance where it is reducing its draw calls in the project. Every static mesh in the detail panel has the word (instance) after it. However, from what I have gathered, these are not the same as instanced static meshes (ISM) created with a BP actor.  Everything I have read on ISM's seems to be related to when one is wanting to create an array situation where many copies are to be made of the same static mesh. It seems that the copies are all created as instances within the ISM BP setup. What I am trying to figure out is what would be the most efficient way of of creating multiple copies of the same static mesh but not in high quantities. For example, if I have a wall sconce light with an associated point light and there will be maybe 22 copies of this in my scene, is there any draw call benefit setting this up in an ISM within a blueprint and then duplicating that BP ISM throughout the scene? I have used BP before to control the same repeated light type but I am looking for a way to reduce draw calls within a scene where I have various repeated objects but not in these large arrays. Frankly, I thought that duplicating the asset by selecting it and pressing ALT as I moved it was creating an instance (like in 3dsmax) but someone told me I am just creating a copy of the static mesh each time I do this. If I do it 9 times, the static mesh exists as itself with its associated draw calls 9 different times rather than 8 objects referencing back to one object.

Replies

  • rollin
    Options
    Offline / Send Message
    rollin polycounter

    Unreal in newer version does auto instancing where possible for same static meshes. Which in ideal situation yields the same result as instanced static meshes.

    But yes, basically anything you can select individually is probably not an instance as long as it is not something wrapped in some custom tool like foliage.

    If you want to be sure if you got instances and what is rendered in one batch and what not you should check out RenderDoc

  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter

    ISM means the geometry is loaded into the GPU once and instanced on the GPU - all instances are combined into a single mesh per material for rendering.

    Dynamic instancing takes a best guess at what can be instanced and is (imo) good enough.

    it will not instance meshes that are displaying a different lod (because different mesh) - which is why Hierarchichal ISMs exist


    there's a command/view flag for hiding showing ISMs if you want to skip renderdoc (can't remember what it is) - I'd still use renderdoc to be absolutely sure though


    This all basically goes away with Nanite - if you can use Nanite, turn it on. It's not just for high resolution assets.

  • arcitek
    Options
    Offline / Send Message
    arcitek polycounter lvl 2

    Rollin and poopipe, thank you for your responses. I have been trying different ways to work with the merge actor command which can create ISMs of the objects by clicking on the objects and applying the merge. The problem with that is I would do this to maybe 6 exactly similar meshes and then copy that set of ISM around to get more of these meshes but I got some render issue with size of the material being to large or something. If I simply merge the actors and copy those, that helps but they are not really ISM. That merge is just allowing me to create the set of merged actor's as 1 actor and 1 draw. Its good for performance but it merges them all into 1 actor which means you cant edit any of the individual meshes.

  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter

    HLODs should solve this problem since they merge actors at runtime.


    in ue4 this was wonderful and you could see what was happening and control the way it behaved. in ue5 you can't see what's happening or control how it behaves yet but it does still work (assuming you dont run out of memory while building them and if it doesn't just decide your project needs destroying).

  • arcitek
    Options
    Offline / Send Message
    arcitek polycounter lvl 2

    but it does still work (assuming you dont run out of memory while building them and if it doesn't just decide your project needs destroying).

    Now THAT is a comforting statement! Haha

Sign In or Register to comment.