PDA

View Full Version : Backface highlighting


Gernot
11th May 2005, 04:09 AM
Hi,

I have to be very pecise about normal directions for game programming, It's always a lot of work getting normals corrected after work - don't know why they are not correct btw, but that might be my fault.
The normal vertices are sometimes a bit difficult if you have slim objects, the normals of the oppositing surfaces point out, making it look as if it were good.

Now, if you could offer a more, where you draw only the front faces (GL_FACE_CULL), and then draw all the backfaces, with inverted material color, it would be very obvous to see which triangles are still wrong order. Do you know what I mean? Could you implement such a mode?

Best regards,
Gernot

Andy
11th May 2005, 04:45 AM
Well you can just set everything to be one sided and look for holes or, if your object is very complicated, try this:

select all surfaces and make sure they are 1-sided (press '1S').

Press control+c and then control+v to copy and paste a duplicate in the same position.

use Surface->flip-normals to reverse the new surfaces

set a bright color that you are not using e.g. yellow.

Now, if you can see yellow surfaces, those are the areas where your surface normals probably need flipping. You'll need to remove the duplicate of course.