unity – Unity3d custom Frustum Culling – find all points on the near side of a sphere
Scenario
I have a custom sphere of 1 million plus vertices that I’m using for an interactive. Looping through 1M+ points per mouse movement is exceedingly costly so I’ve decided to leverage frustum culling. This helps but all the points on the back-facing side of the sphere are still being looped through which is still very costly.
My plan is to cut the sphere in half with a plane that is perpendicular to the viewing camera’s angle. I’ll place the sphere origin at the 0,0,0
of the sphere and viola it’s cut in half.
Question
My issue is that if the plane is at an angle, which it will be 99.9% of the time, how can I verify that a given Vector3 is on the normal side of the plane?
extra
- I’m using
GeometryUtility.CalculateFrustumPlanes
to get the frustum bounds - While writing this question I thought (and plan) to prototype adding my plane “slice” to the frustum boundary planes then using
GeometryUtility.TestPlanesAABB
to determine which points should be rendrered
Read more here: Source link