Jump to content
  • Advertisement
Sign in to follow this  
zacaj

Sphere vs AABB vs OBB frustum culling performance

This topic is 2502 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

I was wondering if anyone's ever done a test in a realistic enviorment of how frustum culling using different shapes affected performance. Which one is fastest? Does the ability of aabbs or obbs make up for the increasing amount of calculations necessary?

Share this post


Link to post
Share on other sites
Advertisement
Yes, but it comes down to trade offs which heavily depend on the type of environment you are culling. The additional cost of a tighter volume on objects needs to be weighed up against the GPU cost of the pointless draw calls / state setting that the better culling will provide.

If you are trying to draw 100 animated/skinned characters with 10,000 verts and your culling is making false-postives of even 1/3 of those, then thats a lot of GPU time to burn on hidden objects - and so a tighter culling system (including occlusion culling) is probably going to help your cause.

If you are using DirectX, then PIX is your friend - get used to him pointing out your problems.

Share this post


Link to post
Share on other sites
for me, culling performance was best with AABBs, in an optimized frustum culling code, it's just slightly more work than for testing a sphere, but due to the hierarchy (AABB-Tree), I end up rejecting more, so it's faster in the end.
Although OBBs are tighter fitting, my frustum is in 99% of the time not rotated along the z-axis, so the frustum plane checks against AABBs result in (nearly) the same as checking against the vertices of an OBBs -> not more culled, but more expensive to test. (One reason is also, that nobody does a very accurate tests like SAT, as this would be too expensive).
Another reason to use AABBs is that you can easily construct a tree, when ppl use OBBs/Spheres, they usually anyway use some orthogonal trees (AABBs or Octrees).

From my experience, you end up with about 95%-98% of the drawn objects really touching the screen area, culling 5% more won't result in a framerate boost, you would far more benefit from investing your time into some occlusion culling, it can often reduce the drawcall/pixel count down to 30%-40%.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!