BACK-FACE DETECTION






                                              A fast and straightforward object-space technique for distinctive the rear faces of a solid is predicated on the "inside-outside" tests. A point (x, y, z) is "inside" a plane figure surface with plane parameters A, B, C, and D if

                              Ax + By + Cz + D < zero

When an enclosed purpose is on the road of sight to the surface, the plane figure should be a back face (we area unit within that face and can't see the front of it from our viewing position).
We can modify this check by considering the conventional vector N to a plane figure surface, that has philosopher elements (A, B, C). In general, if V may be a vector within the viewing direction from the attention (or "camera") position, then this plane figure may be a back face if

                                V . N > 0

Furthermore, if object descriptions are born-again to projection coordinates and our viewing direction is parallel to the viewing metallic element. axis, then V = (0, 0, Vz) and

                          V . N = Vz . C

So that we tend to solely have to be compelled to contemplate the sign of C, the z part of the
conventional vector N in an exceedingly right-handed viewing system with viewing direction on the negative Zv, axis (Fig. 13-21, the plane figure may be a back face if C < zero. Also, we tend to cannot see any face whose traditional has z part C = zero, since our viewing direction is grazing that plane figure. Thus, in general, we are able to label any plane figure as a back face if its nor- mal vector features a z part value:

                                C <= 0

Similar ways will be employed in packages that use a left-handed viewing system. In these packages, plane parameters A, B, C and D will be calculated from plane figure vertex coordinates laid out in a clockwise  direction (instead of the counterclockwise direction employed in a right-handed system). difference 13-1 then remains a sound check for within points. Also, back faces have traditional vectors that time removed from the viewing position and area unit known by C >= zero once the viewing direction is on the positive z, axis.

By examining parameter C for the various planes process associate degree object, we are able to directly determine all the rear faces. For one polyhedron, like the pyramid during this check identifies all the hidden surfaces on the item, since every surface is either utterly visible or utterly hidden. Also, if a scene contains solely no overlapping broken-backed solid, save for all hidden surfaces area unit known with the back-face technique.

For alternative objects, like the polyhedron, additional tests have to be compelled to be applied to work out whether or not there area unit extra faces that area unit entirely or partially obscured by alternative faces. And a general scene will be expected to contain overlapping objects on the road of sight. we tend to then have to be compelled to verify wherever the obscured objects area unit part or utterly hidden by alternative objects. In general, back-face removal will be expected to eliminate regarding 1/2 the plane figure Surfaces in an exceedingly scene from additional visibility tests.

Comments

POPULAR POSTS

POPULAR POSTS