Texture Memory?

Would it be possible to have like 1000-2000 instanced static mesh without having any problem with memory or frames? In this case its simple a 1024x1024 texture with some normal maps and etc for each mesh

Its not 1000-2000 instanced static mesh for one single mesh, but where each instanced static mesh has a mesh on its on with different material and shape.

If they all have a different material and shape, then it’s not instancing :wink:

Example

  1. I have 1000 Different mesh in my project
  2. If i then make an instance for each of them i would have 2000 mesh in my scene now
  3. I still only have 1000 mesh that is its own mesh and material and not a copy
  4. Draw calls wouls only be 1000 * 2 (1 mesh 1 material)

Does that effect memory or anything else? Even if i go above 10-20k instanced static mesh (again only 1000 Uniqe meshes)

The benefit of instancing is when there are a lot of instances of the same mesh. If I understand correctly you have 1000 mesh and you’re duplicating each one of them one time which makes it 2000 meshes, in this case you’re not going to benefit from instancing.

Now when it comes to performance it depends on where these meshes are in your scene, are they all in one place or scattered across the map, it depends on the PC specs. I’d say have some fun and give it a try maybe on a test level, and analyze the data through the various tools the engines offers.

I could test but ill have to get my hands on many meshes, i dont have 1000 meshes in my project it was just an example :smiley:

Would 1000 meshes require alot lf memory useage? Or anything else? Beside draw calls and vertex count

The materials would be 1024x1024 with normal map etc etc (an avarge mesh material)

  1. All of them are rended in one scene where the camera can see them. Would that take alot of memory or anything else?

  2. Would adding 10x instance static mesh of those 1000 diffeent mesh do anything differrner in regards to using more memory or anything else?

Something you might try, if you’re experimenting, is to make a blueprint which sets the mesh and material in construction.

I had a level recently where I replaced about 200 quite high poly ISMs with a blueprint, and things got a lot faster. It makes no sense… :slight_smile:

All these 1000 meshes will have unique textures right ? in that case all of those textures will be loaded in memory, you can do the math to get an estimate of required memory, for example if each mesh has 5mb worth of textures then that would be 5GB without taking compression into account.

Multiple meshes in the scene using the same textures will not load the same textures again in memory, they will all use the same resources that is already loaded, so in that regard it’s not a problem, the extra memory will come from other things as you add more meshes to the scene but it will not be as big.