Do i take a serious performance hit when turning off back-face culling?

Started by
6 comments, last by Promit 22 years, 3 months ago
Im not noticing anything major on my own system, but i dunno. How much does back-face culling increase performance?(I am having some problems with certain non-closed models) ----------------------------- The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Advertisement
You''ll need to draw a lot of triangles before you can see any big difference between back-face culled and non-culled scenes. Try copying each triangle a few times, you''ll see

For the ''open'' objects: add a flag telling if the triangle is co-planar or not (double sided or only one-sided).
In an ideal back face culling situation, back face culling almost doubles polygon drawing. If your models are not balanced or you aren''t fill rate limited, you may not see an improvement, though.
quote:Original post by CheeseGrater
In an ideal back face culling situation, back face culling almost doubles polygon drawing.


Could you clarify that comment please?
It depends on the system.

For instance, on the Playstation2, its actually faster not to backface cull and just draw everything. The reason is that the microcode that transforms the polygons into screen space must do the backface culling. This in effect makes the inner-loop slower because of the extra math needed to check to see if you want to draw this particular polygon or not.
quote:Original post by Anonymous Poster
i]Original post by CheeseGrater
In an ideal back face culling situation, back face culling almost doubles polygon drawing.

Could you clarify that comment please?


Sure.

If you grab a model of a sphere for example, only half of the polygons making up the sphere will be visible from any given angle. You could draw a hemi sphere ''pointing'' at the camera and never know the difference. Most models are going to occulde their back half, in other words.

This means that each model is getting a built in region of overdraw the same size and shape as it''s projection onto your screen. This eats fill rate, because this is all area that''s getting scanfilled and zbuffered an extra time.

Since this eats fillrate, and fillrate is in limited supply, backface culling was introduced as a quick per polygon operation that would cut overdraw in half.

If you''re geometry limited or CPU bound, backface culling doesn''t buy you much, since you still need to send the polygon gemoetry down the pipe. If you''re limited by fill rate, culling can net you a big benefit.

An ideal backface culling situation would be a large number of symetrical models that fill the viewing volume.

Since backface culling is a super cheap operation (usually done with either polygon winding or a single dotproduct operation of eye and normal vectors) it usually makes sense to leave it on in all situations, even if it isn''t improving your bottom line very much.

In Promit''s case here, I''d probably leave it on and put extra polygons on the interior of his open model, since if he''s doing what I think he might be doing, he''s going to end up with objects built from less than paper-thin material, which usually isn''t what you want in a game or sim.
quote:Original post by Anonymous Poster
It depends on the system.

For instance, on the Playstation2, its actually faster not to backface cull and just draw everything. The reason is that the microcode that transforms the polygons into screen space must do the backface culling. This in effect makes the inner-loop slower because of the extra math needed to check to see if you want to draw this particular polygon or not.


Huh? Obviously you don''t want to backface cull if your drivers are going to do it a second time anyway. Systems like openGL where you can turn it on and off are more in line with what''s being discussed here.
And even on the PS2, backface culling *is* effective, because of the fillrate cutting. Although some people may believe something else, the PS2 has not unlimited fillrate BF culling is even effective on monster SGI graphics supercomputers with billions of polys per second, that''s why it was introduced, and still is part of OpenGL.

In other words, always leave it on, if your geometry uses closed face sets.
- AH

This topic is closed to new replies.

Advertisement