Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

CombineMeshes and verts rendered

Discussion in 'Scripting' started by sstrong, Nov 27, 2016.

  1. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,183
    CombineMeshes appears to render more verts/triangles than the original meshes. When combining a single mesh (with no submeshes) and a single material, render stats jumps considerably.

    For example, a mesh with 83 verts and 122 tris when instantiated 490 times gives 40670 verts. If CombineMeshes() is used the resulting single mesh has the expected 40670 verts and 59780 tris. However the render stats will jump by 649,000 verts and 957,000 tris which doesn't seem to make much sense.

    Not sure what CombineMeshes() is actually doing.
     
  2. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    661
    Check the meshes which have been created, maybe those are incorrect. Without code we can't help.
     
  3. sstrong

    sstrong

    Joined:
    Oct 16, 2013
    Posts:
    2,183
    Yep, meshes look fine in the scene. Just wondering if anyone had seen this behavior before using mesh.CombineMeshes(..)
     
  4. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    817
    Do you maybe still render the old meshes too?

    Doublecheck using the frame debugger.
     
  5. ThermalFusion

    ThermalFusion

    Joined:
    May 1, 2011
    Posts:
    906
    You may also be affected by larger meshes being shadowed or being hit by a projector. Both these cause meshes to be drawn additional times. Like said, frame debugger is an awesome tool to find out.