Optimising Frustum Culling

Started by
4 comments, last by Frank Henry 22 years, 2 months ago
Hi all. I''m using DigiBen''s (www.gametutorials.com) and Mark Morley''s (www.markmorley.com)Frustum Culling tutorials. Calculating everything each loop seems kinda expensive and so I''m wondering, is there a way to optimize it? Would calculating a generic Frustum at init/resize and then adding position, rotation and projection to it help? or are there any other way''s to optimize it? thanks frank
Advertisement
Frustum culling isn''t the only type of culling you''ll need. Using Mark''s examples to use bounding spheres or cubes is a step up. However, that doesn''t help much with terrain/levels/whatever. For those I''d suggest quadtrees, octrees, BSP trees, or some other higher level culling.

so a combination of (in my case) octree and culling would result in the greates gain.
i was asking about the optimisation of the frustum culling code because it seems like a lot of math to do each loop.

thanks

frank
quote:Original post by Frank Henry
i was asking about the optimisation of the frustum culling code because it seems like a lot of math to do each loop.

It''s only a lot when you''re not doing much each frame. The ''camera'' normally is expected to move each time, requiring the frustum planes to be updated. You''re also going to be doing a lot of rendering and calculations for physics. Both of those need to be optimized much more than some frustum plane generation code that only runs once per frame. His primitive testing routines could possible get a little better, but they''re pretty good considering that it''s better to have false positives than false negatives.

cool.
thanks again
>>Calculating everything each loop seems kinda expensive<<

notice the word ''seems'' ie u havn''t tested it, if u had of tested it u would find it takes less than 0.0001 seconds to do on a p90.

always test before u optimize, youll save yourself a lot of time

http://uk.geocities.com/sloppyturds/gotterdammerung.html

This topic is closed to new replies.

Advertisement