Você está na página 1de 4

Back Face Removal

A simple object space algorithm is Back-Face removal (or back face cull) where no faces on the back of the object are displayed. Since in general about half of the faces of objects are are back faces this algorithm will remove about half of the total polygons in the image.
Look at a left handed viewing system If C > 0 then N is in the direction of +z, and it faces away from the VRP, therefore, if C > 0 then it is a back face (for a Left handed system). It is just the opposite condition for a right handed viewing system. Therefore, if C < 0 then a back face in a right-

handed system.

So the algorithm (for Left-handed system): 1. Compute N for every face of Object 2. If C (z component) > 0 then a back face and don't draw Note that we must be able to identify the polygons for the object.

This simple method is only correct for an orthographic projection. For a perspective projection, it is a little more complicated. For the scene below, the visible surfaces are different for orthographic or perspective projection. The sides will be invisible for an orthographic projection, but not for a perspective projection.

For a perspective projection, we must determine if the Center of Projection (COP) is inside or outside of the planes of the polygons of the object. If the COP is inside then that plane is not visible, if the COP is outside then it is visible. There are two methods to compute this:

1.

Put COP into plane equation and determine if inside or outside. Note: must compute plane equation before the perspective transformation.

2.

If the angle between the plane normal (N) and the vector from any point on the plane to the COP, V is > 90? (N? < 0) then that plane is not V visible.

Limitations on Back-face removal algorithm


1.

It can only be used on solid objects modeled as a polygon mesh. This is the most general modeling construct for scan line graphics systems. Even if objects are defined in a different manner, e.g. by parametric cubic patches or implicit equations, the renderer usually converts everything to polygons to render.

2. It works fine for convex polyhedra but not necessarily for concave polyhedra as shown below in the example of a partially hidden face, that will not be eliminated by Back-face removal.

Even if we use another algorithm for visible surface determination, the backface cull is a good pre-processing step., once it removes about half of the polygons in the scene. Also, for color shading we must compute the normal for all of the polygons anyway.

Você também pode gostar