I was just stress testing the engine and wanted to see how much i could profit using instanced meshes. Turned out i could not, because my framerate was half when i used instanced static mesh.
i first duplicated a static mesh in the viewport till i had 1000 meshes,
then i had a construction script to add 1000 instances,
non instanced static meshes ran faster than the instanced static meshes i distrubuted with the method below.
i added a boolean to add non instanced static meshes inside construction script too but the result did not change.
I basically connected a couple blueprints to calculate locations needed for my meshes to be in a square in the construction script,
then i added a boolean to test these 2 conditions.
-
Add instances to the instanced static mesh component with given locations
(1000 instances inside 1 instanced static mesh component in 1 actor)
-
Add static mesh component to the actor itself with given locations
(1000 static mesh components in 1 actor).
you can see on bottom right of both images, in details panel, “instanced?” boolean is enabled and disabled, and you can see the difference in fps.
my static mesh contains around 13k verts and both instanced and non instanced static meshes were 30 million triangles each
So Non instanced static meshes ran faster… what is the purpose of instanced static mesh if non instanced is better? isnt there a faster way to render non instanced meshes by instancing properly?
my hardware is
AMD Radeon RX 590 Nitro GPU
AMD Ryzen 5 2600x
16GB RAM
Please ask me if you need any further explanation or testing. But you can replicate the same issue with configuring a similar blueprint and have a random 13k vert mesh.
EDIT: HISM With no LOD’s are also the same with ISM’s
More meshes with simpler geometry seems to work better on instanced meshes
I do not use nanite because it also impacts fps alot.