Does Unreal auto-instance Blueprints containing instancers?

   2282   2   0
User Avatar
Member
38 posts
Joined: Feb. 2018
Offline
If I make a blueprint that contains an HDA that instances stuff, and then Instance that blueprint, say by making another HDA instancing the blueprint, is everything including all the nested instances automatically instanced by UE as expected? Or does that generate lots of unique geometry in UE?

E.g:
Blueprint contains a building static mesh.
HDA component added to the blueprint which instances greebles onto the building.
An HDA in the level contains a point cloud which copies that blueprint to every point.

Or would it be better to make an instancer in the level for the buildings and second instancer in the level for the greebles (doing all the greeble layout in Houdini).

I’d prefer the first option and be able to nest the greeble instancers in the blueprint, so that additional logic could live there, plus then individual blueprints can be placed by hand in the level if need be. However Im unclear if unreal actually expands all these instances correctly, or if it then treats it all as unique meshes, which would be bad for performance.
User Avatar
Member
38 posts
Joined: Feb. 2018
Offline
OK this is exciting, I did some crude testing:

scenario A:
Hero object.
1 x ~300,000 triangle object
-> instanced into the level 100 times -> ~30 fps

scenario B:
Main part of the object with the components instanced, assembled in a blueprint.
1 x Blueprint consisting of:
1 x ~10,00 triangle object
~300 x instances of a ~1,000 triangle object

> instanced into the level 100 times -> ~60 fps

scenario C:
The main part and component pieces instanced directly into the level:
1 X ~10,00 triangle object
instanced into the level 100 times
1 X ~1,000 triangle object
instanced into the level ~30,000 times

-> ~40 fps

The total triangles (not accounting for instancing) is the same in all 3 scenarios, but instancing the components in the blueprint, and then instancing the blueprint is definitely more performant, in this case. My guess is the difference is due to the batch sizes sent to the renderer for instancing, so performance here is probably is more about balancing the number of objects to be instanced with the number of triangles in each instance. No Lods were used in the test, which would probably improve performance again.

Btw, this is in UE 4.26 and will still be relevant for UE5 as in this use case the component pieces need to have vertex animation (so we cant take advantage of Nanite)

Edited by Eche - Aug. 30, 2021 20:04:46
User Avatar
Member
12 posts
Joined: Oct. 2020
Offline
Be sure to take advantage of LODs with VAT 3.0
Mai recently added them to the latest Github build.
  • Quick Links