Archived

This topic is now archived and is closed to further replies.

Optimising Frustum Culling

This topic is 5780 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
>>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

Share this post


Link to post
Share on other sites