Search Unity

Mesh culling question

Discussion in 'Editor & General Support' started by cbman, Aug 7, 2008.

  1. cbman

    cbman

    Joined:
    Oct 15, 2007
    Posts:
    23
    I'd like to know how meshes are culled. A mesh with a few different materials will of course need to have each material surface rendered separately.
    But how is the mesh culled? Is there one bounding volume for the entire mesh of several materials and all surfaces in the mesh are rendered or does each surface get its own bounding volume that is used for culling and only the surfaces in the mesh within the view frustum are rendered?
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Each MeshRenderer has one bounding volume.

    In practicate that means, if bounding volumes between different materials on a mesh are very different it would allow culling the object earlier, then you should avoid using multiple materials and use multiple meshes instead.
     
  3. cbman

    cbman

    Joined:
    Oct 15, 2007
    Posts:
    23
    Thanks for the quick reply. Yea I kind of thought this is the case and that's good to know. Not much difference on small objects but for level geometry it's something to keep in mind.