Fewer plane checks in frustum test
- Dominant language
- JavaScript
- Stars
- 15.7k
- Forks
- 3.9k
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 34
Description
When the view frustum is symmetric around x/y (which is always the case for Cesium except for picking and VR), the frustum can be divided into eight octants, the octant for the bounding volume can be found, then only three instead of six frustum checks are required.
Catches
* The plane test for spheres is so fast that this was found not to help; we could test for ourselves. Could also be a nice win for OBBs.
* The distance from the center of the frustum to the closest point on the frustum must be greater than the object's radius.
* We are already reducing the number of plane tests when doing [hierarchical culling](http://cesiumjs.org/2015/08/04/Fast-Hierarchical-Culling/). How much more does this help?
See [Optimized View Frustum Culling Algorithms for Bounding Boxes](http://www2.in.tu-clausthal.de/~zach/teaching/cg_literatur/vfc_bbox.pdf).
Contributor guide
Research direction
Start by locating the frustum-culling and hierarchical-culling code, then inspect the existing sphere and OBB plane tests. Evaluate the proposed octant approach against the stated catches, including whether it reduces work in practice; done requires validated correctness and a measurable benefit.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100