Frustum Culling - Its culls too much!

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
TheC
Posts: 93
Joined: Fri May 05, 2006 7:50 am

Frustum Culling - Its culls too much!

Post by TheC »

Hi,

I have noticed that if I have a large mesh (I mean, very large)

If all corners of its bounding box are ouside the frustum, it will cull, even though I am looking at the object itself.

I tried changing the culling code in ::isCulled to the removed code (commented out) in the same method, but that just made the problem worse.

Has anyone seen this? Does anyone know of a fix that might work?

Thanks,
TheC
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

I have no problem creating and viewing the middle of a huge cube. The corners of the bounding box are not in view, but the cube is still rendered.

I can't reproduce your problem, but you might try calling transformBoxEx() instead of transformBox(). It will be slower, but the world bounding box you get by transforming the node box into world space is not correctly shaped and that could cause problems.

Travis
Post Reply