Search Unity

Occlusion culling doesn't seem to be working properly

Discussion in 'General Graphics' started by ilusomu, Oct 10, 2015.

  1. ilusomu

    ilusomu

    Joined:
    May 28, 2015
    Posts:
    24
    I'm messing around with using occlusion culling to improve performance in my scene. It's helped a lot, but one thing I've noticed is that the tris/verts count does not decrease to the point I thought it would. For example, I have a building with a lot of objects inside it that are marked as batch static (most), occluder static (some), and occludee static (all). For purely testing purposes, I put an occluder wall (a probuilder wall tagged as occluder static) between the player and the building that completely prevents the player from looking at the building. According to Unity, here are the results of what happens when the camera looks at the occluder wall:
    • Occlusion Culling on: 2.8-3M tris
    • Occlusion Culling off: 1-1.3M tris
    • Occlusion Culling off, building objects removed from scene entirely (only the walls and exterior objects are present): 507k tris
    When I'm running the game in-editor and occlusion culling is on, it's not loading any of the contents inside the building (great!), but it's still rendering more than if the objects weren't in the building at all (not great). Why is that? Shouldn't occlusion culling prevent the game from rendering those objects in the first place? Am I misunderstanding a fundamental part of occlusion culling?