Search Unity

Question Occlusion Group API - what are sweet spots?

Discussion in 'General Graphics' started by sergiusz308, Nov 2, 2022.

  1. sergiusz308

    sergiusz308

    Joined:
    Aug 23, 2016
    Posts:
    235
    Hi, anyone has an experience with this: what's the sweet spot for OG API for static objects?

    In the docs They mention 10k objects that can be processed by OG:

    upload_2022-11-2_10-5-49.png

    - should I treat this as a threshold beyond which in general I should not go?

    It works with spheres, so I presume it should be quite fast on math side :thinking_face

    Question about asynchronicity - I understand that it culls objects per rendering cycle, so we're looking here at one-frame delay, correct?

    Question about gameplay integration - I understand that if I don't want to have visible pop-up (i.e. changing material or whatever once it become visible) I'd need to make bounding sphere little bit bigger than actual renderer so it would kick-in earlier, to allow for several frames of delay to obscure any changes so that once renderer become actually visible it will be in a desired state already, correct?

    Thanks,
    S.
     
  2. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    Using the API for renderers would be redundant because renderers in the scene are already culled by Unity. Unless you're using it for direct mesh rendering that doesn't involve GameObjects, of course. In that case, get the bounding sphere from the mesh bounds: that'll give you a sphere that fully encompasses the mesh.

    AFAIK the culling group API allows you to tap into Unity's internal culling process for arbitrary purposes.
     
    sergiusz308 likes this.