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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Unity why is a Quad slower than a Cube?

Discussion in 'General Discussion' started by Arowx, Mar 22, 2013.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Hi I've developed a simple Cube based benchmark called Cubemark in Unity and I also made a simple Quad based version. The problem is I have now combined them into one web app and now there is a stark difference in performance (see) below in the number of Quads and the number of Cubes Unity can display.

    Quads: 10290
    Cubes: 20420

    The Quads are a 4 point, 2 triangle Quad created in Blender ( Add Cube, Chop off top).
    The Cubes are the default Unity Cubes.

    I'm looking into it but any ideas why this might be the case?
     
  2. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    I've got it I'm using StaticBatchingUtility.Combine to improve performance which works fine on the Cubes as it massively reduces the drawcalls but fails on Quads. Think I've got it still not getting comparable results Quads only up to 14k?
     
  3. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Did you optimize the mesh to make triangle strips? It would be interesting to know if cubes actually are faster than a custom quad mesh because that might provide a big speed boost to 2d games.
     
  4. CoalCzar

    CoalCzar

    Joined:
    Nov 25, 2012
    Posts:
    22
    I'd be interested to see if this has changed now that Unity doesn't need to import quads.
     
  5. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Just tried a test run and converted from imported quad to in built quad and there was no performance difference.

    It could be the difference in the test as the rotation goes from 3d to 2d this could impact the volume of cubes/quads being viewed/frustum culled.