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?
Sphere vs AABB vs OBB frustum culling performance
Started by zacaj, Feb 06 2012 05:07 PM
2 replies to this topic
Ad:
#2 Members - Reputation: 398
Posted 06 February 2012 - 06:26 PM
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.
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.
-Shaun Stamper, Graphics Programmer / Tools Ninja @ Big Ant Studios
#3 Members - Reputation: 1382
Posted 06 February 2012 - 07:31 PM
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%.
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%.






