This topic is 2201 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hy there,
as you can read i still need some hints with the bounding-topics. Some quick information about the stuff i'm trying to do.
I'm coding a small planetary engine with procedural landscapes. Thats working well so far and so i want to implement view dependent LoD. That means i calculate each turn all patches which i have to render. To allocate the concerned patches i need the information whether the patch is in view frustum (camera view) or not.

My camera class is calculating the bounding frustum each turn via multiplying the view and projection matrix. You can see the matrices on the debug messages from the screenshots. The screenshots are showing three states.
1) - Start phase, the patch have to be rendered - you can see the bounding box of it
2) - I'm moving on the x-Axis but the patch is still in view
3) - I'm moving further on the x-Axis and the patch disappears from the view, but the BoundingFrustum doesnt detect that fact. You can see this on the bottom of the debug information (third-last line)

This behaviour is odd and i dont know why. There are less examples for the bounding-topic - especially for BoundingFrustum. So i have to ask you to share your experiences with that topic.

Up vector is y-Axis, and i have a mouseLook camera which is calculating the view matrix from quaternions.

##### Share on other sites
Ok, i found out, that the Frustum is working correctly if i check the containment against a single point. So I'll have to do some researches about the BoundingBoxes. How annoying.. -.-

##### Share on other sites
One thing I like to do when debugging frustum culling issues is to add a "freeze culling mode", where the bounding frustum gets locked in place but you can still move the camera around. Then if you draw the frustum and the bounding boxes/spheres, you can see whether or not they actually intersect. Drawing a frustum is pretty easy: just take 8 points that start on the unit cube (-1 <= x <= 1, -1 <= y <= 1, 0 <= z <= 1) and transform them by the inverse of your view * projection matrix, and you'll have the 8 points of the frustum.

##### Share on other sites
Nice formula, i will try that. I will compare the result of this with the computed frustum of xna -> frustum.getCorners() should deliver the same values.

##### Share on other sites
[color=#000000][font=arial, sans-serif]

1. 1
Rutin
25
2. 2
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 14
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631757
• Total Posts
3002141
×