Search Unity

Efficient frustum culling for top-down RPG game

Discussion in 'General Graphics' started by AntonPetrov, May 17, 2020.

  1. AntonPetrov

    AntonPetrov

    Joined:
    Dec 27, 2013
    Posts:
    63
    Hey everyone!

    My game is an RPG with a top-down camera (like in Diablo) so obviously you can see only a small part of the entire scene at the moment. And baked occlusion culling will not work here because everything mostly lies out of camera frustum while visible objects are not occluded most of the time. In my own engine I would go with a quadtree or octtree optimization to minimize frustum checks for efficient rendering but what about Unity?

    1. Does anybody knows details on how frustum culling is implemented in Unity? Does it check every renderer every frame? Or are there some built-in optimizations?

    2. Is it okay to implement custom frustum culling using `Renderer.enabled` flag to show/hide renderers or this is a wrong way?

    Would be happy to hear from Unity staff.

    Thank you!