i’ve finally combined octree partitioning with frustum culling. everything seems to work fine. i process a scene with 10.000 triangles and the player moves thourgh the scene (in first person view).
but i have a question: should the FOV be updated when the player moves ?
because sometimes some groups get clipped away but they should be there, normally.
can anybody help ?
thanks in advance,
Yes, why not?
If you dont place it where the player is (update it) the frustum will ofcourse cull the wrong stuff.
Is there a sophisticated way to calc. the FOV angle, near and far plane values ?
until now, i tried out some values which made my scene look good
You can just grab it from OpenGL directly. Check this: http://www.markmorley.com/
Why would the fov change as the eye moves?
It sounds like you have a bug. The culling frustum should match your projection matrix glFrustum in the frame it is culling for. If you still have missing data then you have a culling bug. Perhaps the position is incorrect or the culling frustum, or there is a more fundamental problem with your algorithm.
so it’s common that the fov angle and the near and the far plane values should stay constant (in fact, that would be the easiest method).
then i have to check again my frustum code…
Uhm… Maybe I got it all wrong.
But if the player moves, why dont you need to update atleast the “d” component in the plane equation on the planes that makes up the frustum?. Since the those planes distance to the origin is changing. (Assuming we are talking in world coordinates here).
I’ve actually never checked the planes I get from OpenGL in my culling functions. I’ll check “d” component later when I move my view, and get back here.
The frustum planes normals (abc components) would ofcourse not need to be updated when only moving though.
Also, if you move along some of the frustum planes you dont need to update that planes distance to origin. Odd case though.
[This message has been edited by AndersO (edited 02-04-2002).]
I’ve solved the problem. I made some logical errors when drawing the octree (I draw every leaf 8x ).
So there where no culling errors but overdraw errors (which looked like culling errors).