Quake3 and front face culling

Hi

It seems that Quake 3 uses front face culling to render both levels and models. It seems to me that using back face culling is the normal thing to do, so I was wondering if anyone knew the reason why they chose to use front face culling.

-Anders

maybe because they used a differend winding order for their triangles than openGL usualy uses ?

a backface culled triangle with indicies 0 1 2
looks similiar to a frontface culled triangle with indicies 2 1 0

another reason could be: when the triangles are created in an left-handed coordinate system and are displayed in a right-handed one, the normals of the trianlge are inverted. and therefore one must reverese the winding oder or the culling function to display them correctly.

AdrianD’s first guess was right. Quake3 uses front face culling because the windings that it gives to OpenGL are backwards to the way that OpenGL has its default windings. Back face culling by any other name is still the same (though it may be more confusing).

Originally posted by Coriolis:
Quake3 uses front face culling because the windings that it gives to OpenGL are backwards to the way that OpenGL has its default windings.

This might be a tie-over from using LW as their modeller - LW also has it’s winding “backwards” when compared to OpenGL’s default.

It’s one thing to cull front faces versus back faces; it’s another to decide that front faces are clockwise winding vs counterclockwise.

Personally, I find it less confusing to say “quake seems to treat clockwise winding as front faces” because then when you say “render back faces into the shadow buffer” it still is unambiguous :slight_smile:

Oh no! I said shadow buffer!

(bonus points if you get the reference)

Just curious to know if anybody sees a reason why they (ID soft.) did not use ‘glFrontFace(GL_CW)’ instead of using ‘glCullFace’ ?

compability ? performance ?


jwatte: has it something to do with corinne and her showdown

You were referring to this perhaps? Or were you talking about item buffer shadows? Yuck.

Originally posted by Nicolas Lelong:
Just curious to know if anybody sees a reason why they (ID soft.) did not use ‘glFrontFace(GL_CW)’ instead of using ‘glCullFace’ ?

i guess, this is just because the original quake and its formats wasn’t designed for OpenGL. (quake was a SOFTWARE RENDERED game, and had nothing to do with openGL)

Why would that have anything to do with OpenGL calls? I know that Quake1 was designed for software rendering at first and that the triangle vertices thus were specified in another order than the “normal” OpenGL order. But wouldn’t you still have the choice between using glFrontFace(GL_CW) and glCullFace(GL_FRONT)? I don’t know wether one should prefer the one above the other wrt. performance.

Meybe he did it to confuse us.

i believe there was a debate about 4 months ago over the correct term for the technique

My personal guess is laziness overcame pedantics.

Nicolas got the reference.