I got a question here.
I’m using octree to do my frustum culling and someday I’ll do my collision detection too with it.
for now my octree is almost working.
the only problem is that when I check if the bounding box of an octree is in my frustum, it may return a false result if the bounding box is so large that it’s my frustum that is entirely inside the bounding box.
for exemple, in the first subdivision, my bounding boxes width may be like 1000 units, and if I’m standing in the middle of it and if my far viewing distance is like 200, well none of the bounding boxes corners will be in my frustum because the bounding box is too big (so the box is not in the frustum it’s the frustum that is in the box you know what I mean ?)
I hope you understand the problem…
My guess is to get, by some way I don’t know (that’s my question in fact), the 3d position of the 8 frustum corner. (using the position of my camera and the far and near clipping distance and an angle I guess…)
this way, I could do this test (pseudo-code)
if(Box is indide(entirely or partially) the frustum OR frustum is inside the box (entierly or partially)
then render(or go in a deeper octree level.
So i need to know the geometric position of my frustum…All I managed to get with my current knowledge is the distance from the origin for each plane and their normals…
Any one can help ?
thanks a lot !
Let’s have a funny day