octree cube view frustrum
Posted 25 October 2009 - 12:16 PM
At the moment ive quickly written a corner testing algorythm, which tests the 8 corners with what side of the planes they are on, but if the octree node is large enough the frustrum could be contained within it, but the corners would all be tested as outside - and im kinda stuck.
Whats the solution?
Posted 25 October 2009 - 01:15 PM
This does lead to some false positives when the box is outside, but no single axis separates all vertices, but this is very rare, only happening at the edges of the frustum with large objects. Even then, many of those cases can be dispatched by doing a sphere test first.
Posted 25 October 2009 - 01:36 PM
Posted 25 October 2009 - 03:32 PM
A further optimization can be made by the fact that lots of boxes have the same 'x' value as their size is the same, so you're left with a single dotproduct per box.
Currently working on: the 3D engine for Tomb Raider.
Posted 25 October 2009 - 04:03 PM
Posted 26 October 2009 - 04:02 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users