Announcement

Collapse
No announcement yet.

Not getting expected results with instanced meshes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Not getting expected results with instanced meshes

    Hi, I have a large scene that I have constructed with mesh instances in 3dsmax. It's comprised of the following;
    - I have one bay that is made up of about 6 meshes, that are then arrayed as instances 55 times.
    - I have 3 other bays that are each made up of about 11 meshes each, arrayed as instances 10 times.

    "Game Import" has correctly imported and positioned the instances, for a total of 38 unique meshes. I also imported the exact same FBX file via the normal import into another level, which created the expected amount of non-instanced meshes (600+). No problems in this regard. The statistics window has the same totals (meshes and total tri's), confirming everything worked.

    So at this point, I would expect the performance of the level using instances to be better. However, I get about 50fps in the instanced level, and 60fps in the non-instanced level. I have also attached the 'stat scenerendering' output for each of the 2 levels at the same view point, which does show the particular 'timings' that are affecting the fps. Can anyone explain why the performance is the way it is?

    PS: Each level uses the same materials as per the fbx, which are just a simple color (no textures or anything).
    Last edited by wilson_clough; 08-22-2018, 04:06 AM.

    #2
    I think I solved my own problem. Even though I had "Allow Static Lighting" disabled in the project settings (thus affecting all levels), the above performance was without "Build"-ing the levels. Once I built the levels, the fps for the instanced level jumped to 70fps, whereas the unique level stayed the same at 60fps.

    I would still be interested to hear comments regarding instancing, and if my use of instancing is advantageous or not?

    Comment


      #3
      Instanced Meshes have a downside you probably haven't considered:
      They all get drawn once an instance is not culled.

      Which means: if you have 100.000 instances and only one of these instances is in your vision, all 99.999 are also rendered and processed.

      You need to use an Hierarchical Instanced Static Mesh Component if you want to have them clustered.

      Comment


        #4
        The instancing you're talking about only saves on memory, if you want real performance improvement then you have to use them in a Blueprint as an Instanced Static Mesh which will manage batching the objects to lower draw calls. It doesn't do that by default.

        Comment


          #5
          Thanks for the info. I looked into ISMC and HISMC, but I'm not sure they are suitable for my use-case. I am making this model for an animation, and each mesh/actor needs to be controlled individually, so I presume that means using BP+Instances is not suitable, and the actor based approach is as good as it gets?

          Comment

          Working...
          X