Home Â» Computer Graphics Back Face Removal Algorithm

# Back Face Removal Algorithm

It is used to plot only surfaces which will face the camera. The objects on the back side are not visible. This method will remove 50% of polygons from the scene if the parallel projection is used. If the perspective projection is used then more than 50% of the invisible area will be removed. The object is nearer to the center of projection, number of polygons from the back will be removed.

It applies to individual objects. It does not consider the interaction between various objects. Many polygons are obscured by front faces, although they are closer to the viewer, so for removing such faces back face removal algorithm is used.

When the projection is taken, any projector ray from the center of projection through viewing screen to object pieces object at two points, one is visible front surfaces, and another is not visible back surface.

This algorithm acts a preprocessing step for another algorithm. The back face algorithm can be represented geometrically. Each polygon has several vertices. All vertices are numbered in clockwise. The normal M1 is generated a cross product of any two successive edge vectors. M1represent vector perpendicular to face and point outward from polyhedron surface

Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  N1=(v2-v1 )(v3-v2)
Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  If Â  Â  Â  Â  N1.Pâ‰¥0 visible
Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  N1.P<0 invisible

1. It is a simple and straight forward method.
2. It reduces the size of databases, because no need of store all surfaces in the database, only the visible surface is stored.

## Back Face Removed Algorithm

Repeat for all polygons in the scene.

1. Do numbering of all polygons in clockwise direction i.e.
Â  Â  Â  Â  Â  Â  Â  v1 v2 v3â€¦..vz
2. Calculate normal vector i.e. N1
Â  Â  Â  Â  Â  Â  Â  N1=(v2-v1 )*(v3-v2)
3. Consider projector P, it is projection from any vertex
Â  Â  Â  Â  Â  Â  Â  Calculate dot product
Â  Â  Â  Â  Â  Â  Â  Dot=N.P
4. Test and plot whether the surface is visible or not.
Â  Â  Â  Â  Â  Â  Â  If Dot â‰¥ 0 then
Â  Â  Â  Â  Â  Â  surface is visible
Â  Â  Â  Â  Â  Â  else
Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Not visible

Next TopicZ-Buffer Algorithm