camera and frustum culling

Started by
0 comments, last by kburkhart84 18 years, 11 months ago
i am having a few issues with frustum culling with my app. i am rendering some terrain and i am breaking that terrain up into blocks,if a block is within the view frustum than i mark it visible if not than notvisisble. than when we render the terrain block's i only render those that are marked visible. This works and it does indeed cull away everything not in the viewing frustum BUT it does not work when i turn the camera with the mouse,i can see huge gpas where the blocks have been culled ...if i move the camera with the keyboard(forward or strafe) than it does update correctly. I am using frustum code from ultimategameprogramming and the camera class from the same place ....only difference is both the camera and frustum code is the older code before they changed there website ...it's the digiben one's! thanks for any help
Advertisement
One problem may be that the mouse is sensitive to movement so it moves quickly in rotation, so what may be happening is that you are moving too quick. Also, if you are using that same camera, make sure that the mouse updates update the same variables as the keyboard(strafe, etc...) updates. If the mouse doesn't update all of it like the keyboard does, than the culling that uses those variables will be off. I got my culling code from their too, and that may not be the problem, as I haven't had any problems with it. Mine gets the matrices directly from OpenGL, so it works regardless of how the rotation is done(keyboard or mouse) since the matrices are the same no matter how it was done(quaternions, XYZ).


This topic is closed to new replies.

Advertisement