Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 8 of 8

Thread: octrees with frustum culling question

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    germany
    Posts
    14

    octrees with frustum culling question

    hello,

    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,

    walantis

  2. #2
    Junior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    154

    Re: octrees with frustum culling question

    Yes, why not?

    If you dont place it where the player is (update it) the frustum will ofcourse cull the wrong stuff.

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    germany
    Posts
    14

    Re: octrees with frustum culling question

    Hello.

    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

    thanks,
    Walantis

  4. #4
    Junior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    154

    Re: octrees with frustum culling question

    You can just grab it from OpenGL directly. Check this: http://www.markmorley.com/

  5. #5
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,962

    Re: octrees with frustum culling question

    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.

  6. #6
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    germany
    Posts
    14

    Re: octrees with frustum culling question

    Hi,

    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...

    thanks,
    Walantis

  7. #7
    Junior Member Regular Contributor
    Join Date
    Feb 2000
    Posts
    154

    Re: octrees with frustum culling question

    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).]

  8. #8
    Junior Member Newbie
    Join Date
    Mar 2001
    Location
    germany
    Posts
    14

    Re: octrees with frustum culling question

    Hi,

    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).

    bye,
    Walantis

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •