No announcement yet.

Instanced Rendering

  • Filter
  • Time
  • Show
Clear All
new posts

    Sadly the term 'instancing' is being used in two ways in UE4.

    Instancing of components like UStaticMeshComponent: this means the components are all sharing the same *resource*, which is the UStaticMesh vertex and index data. This saves memory. As far as draw calls go, each element of a UStaticMeshComponent will issue a draw call in each mesh pass it is in (depth only, base pass, shadow depth pass, etc). Even though every element of every instance/component is a draw call, there's a lot less state setup for UStaticMeshComponent's of the same mesh and material and they can cost ~3x less than if every UStaticMeshComponent had a different mesh and material.

    Instancing as in UInstancedStaticMeshComponent: this is referring to *hardware* instancing, which is the GPU feature that you issue one draw call and a bunch of per-instance work is done in the vertex shader. It typically reduces rendering thread overhead, but increases GPU vertex cost and has a very limited feature set, because any per-instance features (all the rendering flags on UPrimitiveComponent) have to be done in the vertex shader. By rendering meshes with low poly counts, you can get huge performance savings with this. UE4 does not yet support lightmaps on UInstancedStaticMeshComponent, but they are coming.


      Thanks for the explanation Daniel, that makes sense.
      Storyteller - An immersive VR audiobook player

      Dungeon Survival - WIP First person dungeon crawler with a focus on survival and environmental gameplay ala roguelikes