Download

Instanced Mesh questions

Hello, I’ve got just a few questions on inctanced meshes that I can’t seem to find elsewhere.

  1. Since instanced meshes all take 1 draw call, are they all rendered together no matter what?
    So if I instance all the rocks on my entire map, are they all being rendered even if I’m not looking at them, or only looking at at one?

  2. Because of #1, is it better to instance every rock on the map for less draw calls but more guarenteed rendering, or should I instance smaller sections of them,
    so there’s more draw calls but it’s not rendering rocks on the opposite end of the map?

  3. Instanced meshes don’t display their collision in 4.13. I assume this is just a bug?

  1. Instanced meshes display an odd color in lightmap density. Is this another bug or does that color symbolize very high density or something?

Thanks!

I can only help you with number 4.

That color either means the mesh is movable and doesn’t have baked lighting, or the light just hasn’t been baked yet, for a static mesh.

Just use Hierarchical Instanced Static Mesh Components for all rocks… this way the engine will automatically group the rocks into smaller batches, where each batch can have a different LOD (with purely instanced meshes, all instances use always the same LOD). The foliage painting tool in UE4 is using Hierarchical Static Mesh Components by default.

Thanks guys!

To answer your numbers 1 and 2: ISMs and HISMs will still be culled like other objects. However they will always only take up a single draw or no draw cells if all of the instances are culled and occluded. What you should practice is making use of ISM and HISMs when you multiple instances of the same mesh being rendered on screen at the same time.

So for example, say you place a single table in a room and place another instance on the other end of your map. In this scenario, at no possible position or angle will both instances be rendered on screen at the same time. In this case, setting up an ISM/HISM blueprint for that table won’t provided any benefit. Because in every situation you’ll only ever see one table, which would also only ever take up one draw cell.

However, if wanted to turn that room into, say, a banquet hall. You’d probably need more than a single table. You’d probably need maybe 10, 20, or 30 tables. This is where ISM/HISMs are godsends. You’d be able to create a BP for the ISM/HISMs place 20+ tables which are all being rendered at the same because all of them are in view of the camera and/or are not being occluded. In that case those 20 would all only take up a single draw cell. It’s more a matter of what is in the immediate vicinity most of the time.