Results 1 to 6 of 6

Thread: Frustum Culling problem (With Octree)

  1. #1
    Member Contributor
    Join Date
    Jul 2001
    Location
    Sherbrooke
    Posts
    95

    Frustum Culling problem (With Octree)

    Hi guys.
    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 !

    ----------------------------------------
    Evil-Dog
    *Let's have a funny day*
    Let's have a funny day

  2. #2
    Senior Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    184

    Re: Frustum Culling problem (With Octree)

    All I managed to get with my current knowledge is the distance from the origin for each plane and their normals
    isn't this the position of your frustum? distance from the origin?

    b

  3. #3
    Member Contributor
    Join Date
    Jul 2001
    Location
    Sherbrooke
    Posts
    95

    Re: Frustum Culling problem (With Octree)

    Nope

    If you go 100 unit along the x axis or the z axis
    the distance is 100 unit in both case but the real position isn't given
    with the normal and the distance I can know where the clipping planes are I think...but what is the width and height of the near and far clipping plane ? with the width, height of the near and far plane and the normal and distance from origin I could have the 8 corners of my frustum.

    width/height(?)
    o------------o
    \ /
    \ /
    \ /
    o----o
    width/height(?)

    Beautiful ascii hehe

    Anyone can help ?

    ----------------------------------------
    Evil-Dog
    *Let's have a funny day*
    Let's have a funny day

  4. #4
    Member Contributor
    Join Date
    Jul 2001
    Location
    Sherbrooke
    Posts
    95

    Re: Frustum Culling problem (With Octree)

    woops...my ascii drawing doesn't show right...anyway

    you get the problem I need the width, height, normal and distance for the far and near clipping plane I think !
    If someone knows how I'd be glad.

    ------------------------------------------
    Evil-Dog
    *Let's have a funny day*
    Let's have a funny day

  5. #5
    Senior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    154

    Re: Frustum Culling problem (With Octree)

    http://www.markmorley.com/ has a tutorial on frustum culling, it might help. I use it in my frustum-octree culling anyway.

  6. #6
    Member Contributor
    Join Date
    Jul 2001
    Location
    Sherbrooke
    Posts
    95

    Re: Frustum Culling problem (With Octree)

    Thanks alot AndersO
    the link was very very useful
    With the sphere test is resolve the problem when the bounding box totally encloses the frustum !

    thanks again !

    ----------------------------------------
    Evil-Dog
    *Let's have a funny day*
    Let's have a funny day

Similar Threads

  1. problem in applying frustum culling + LOD
    By candy in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 02-08-2004, 09:31 PM
  2. Frustum culling problem
    By Stebet in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 04-16-2003, 07:06 AM
  3. Problem with frustum culling
    By owcs in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-10-2002, 12:32 AM
  4. Frustum culling problem
    By HemiMG in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-03-2001, 05:14 PM
  5. Poly Transformation with Octree/Frustum culling
    By soupnazi in forum OpenGL: Advanced Coding
    Replies: 20
    Last Post: 01-12-2001, 11:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean