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 3 of 3

Thread: Frustrum culling

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2011
    Location
    Surrey
    Posts
    15

    Frustrum culling

    Hi

    I can't seem to get this right in my head at the moment

    Lets say I have a frustrum with the near plane distance setup as 0.1 and the far plane distance setup as 10000

    If I want to cull I work out the box shape and position (very small near near the camera and very large at the far plane). I test each plane of this with with the shapes I want to render and then exclude on demand. This sounds fine and I have something that does this but I am getting lots of strange culling of objects close to me.

    I think this is because I have used a value of 0.1 for the near plane distance. So he come the questions :

    Is the near plane meant to be where my computer screen is in the scene?
    Is 0.1 a good value? It produces a very tiny near plane and any objects close by get culled because of this

    I've seen diagrams so I understand the gist of things but not sure where the computer screen comes in to the picture vs my eye. The screen is not a tiny plane with respect to the scene

    Thanks

    BobTedBob

  2. #2
    Member Regular Contributor Nowhere-01's Avatar
    Join Date
    Feb 2011
    Location
    Novosibirsk
    Posts
    251
    Quote Originally Posted by bobtedbob View Post
    I've seen diagrams so I understand the gist of things but not sure where the computer screen comes in to the picture vs my eye. The screen is not a tiny plane with respect to the scene
    it is, if near plane is 0.1, screen is kind of really tiny plane(if some polygon is very close to near plane it fills your view, even if it's pretty small). ideally, it could be a point, but if you set near plane o 0.0, it will cause division by zero and undefined results. your values are ok. you should post your code, because you have a mistake somewhere in it.

  3. #3
    Junior Member Newbie
    Join Date
    Nov 2011
    Location
    Surrey
    Posts
    15
    I was basically following this tutorial

    http://www.lighthouse3d.com/tutorial...culling/index/

    I think I definitely made a mistake somewhere, was just trying to get a better visual in my head of what everything meant (which you have helped me with)

    I think my set of frustrum planes are correct, just need to tweak the intersection formula I guess. (I'm doing sphere, plane intersection)

Posting Permissions

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