I have to put a long fence on the side of a road.
All fences are the same mesh.
My question is: what is more optimized?
500 instances of the same static mesh in the UE scene
I am not sure because I know 1 single fence will take a single place in memory to be instanced and should be better, but downside is having a lot of actors in the scene instead a single one or splitting into just a few groups.
or
all the fences collapsed into a single static mesh?
I can import all fences as single mesh from external software like blender and is a lot easier to make an array of fences, place along a spline, etc.
I know I can also collapse multiple meshes inside unreal into a single one, but my question is what is more expensive during gameplay: a lot of instanced static meshes (unreal static meshes in the scene are static mesh actors) or a single mesh with everything on it.
first option will take less memory as all the fences are just one with instances along the scene, option two has a single actor with a way bigger mesh in memory. Memory wise no doubt option one is better but performance wise I am not sure because the engine must deal with a lot of instances instead just one.