unity3d Bounding distances


You can add bounding distances on top of culling point radius. They are in a manner additional trigger conditions outside the culling points' main radius, like "close", "far" or "very far".

cullingGroup.SetBoundingDistances(new float[] { 0f, 10f, 100f});

Bounding distances affect only when used with a distance reference point. They have no effect during camera culling.

Visualising bounding distances

What may initially cause confusion is how bounding distances are added on top of the sphere radiuses.

First, culling group calculates the area of both the bounding sphere and the bounding distance. The two areas are added together, and the result is the trigger area for the distance band. The radius of this area can be used to visualise the bounding distance field of effect.

float cullingPointArea = Mathf.PI * (cullingPointRadius * cullingPointRadius);
float boundingArea = Mathf.PI * (boundingDistance * boundingDistance);
float combinedRadius = Mathf.Sqrt((cullingPointArea + boundingArea) / Mathf.PI);