# Frustrum culling

• 01-20-2013, 03:27 AM
bobtedbob
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
• 01-20-2013, 07:12 AM
Nowhere-01
Quote:

Originally Posted by bobtedbob
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.
• 01-20-2013, 11:32 AM
bobtedbob
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)