#### Archived

This topic is now archived and is closed to further replies.

# backface culling w/ 3normals

This topic is 5410 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

the way my engine handles it, every triangle has six points and three texels. the six points are for the 3 location and 3 normals, and the three texels are for the texture coordinates. i would like to implement backface culling in object space... so far what my engine does is for each polygon called, the normal points are rotated into view by being multiplied by reverse global rotation matrix. then, this is the part im messed up on- most.. actually all backface culling algorithms ive seen so far take in 3 coordinates of the polygon and create a cross(v0-v1, v0-v2) vector. i dont wnana do this. i wanna use the normals that the polygon''s are already defined with, that i rotated using the reverse rotation matrix. so what ive done was create a new normal that is the average of the three normals of the polygon. then i pass this to a dot product test with the cam-polycoord0 (object space) vector. the results are supradic and all over the place... help!

##### Share on other sites
In order to do backface culling with normals, you need the face normal, not the vertex normals. since the vertex normals are (generally) the average of the face normals of all the faces that share that vertex, the is NO WAY to determine the face normal from the vertex normals. Thats why most systems use the cross product of (v1-v0) and (v2-v0); since both of those vertices are, by definition, in the same plane as the face they describe, their cross product is always perpendicular to the face, i.e. similar to the face normal. The problem with this is, of course, that the vertex wining becomes important. If this is unacceptable, your only option is to store the face normal as part of the triangle structure.

1. 1
2. 2
3. 3
Rutin
19
4. 4
5. 5

• 14
• 12
• 9
• 12
• 37
• ### Forum Statistics

• Total Topics
631424
• Total Posts
3000008
×