Graphics Reference
In-Depth Information
Fig. 9.5 Incorrect extrude on left , correct on right
intersect and bounce off of a 3D model. To produce the effect of a hard edge, as in
the corner of a box, two normals are needed, one for each side of the corner. This
ensures that the product of the algorithm is different for either side of the edge
where two connected faces meet. The faces will contrast with each other along the
edge, creating the appearance of hardness. To make a soft edge, the normals on
either side of an edge are averaged into one normal. This eliminates the contrast at
the edge that would otherwise be present (Fig. 9.6 ).
Hard shading would typically be used to defi ne the sharp corners of a table.
Smooth shading would be used on every edge of a ball, to prevent a faceted appear-
ance. Improper smoothing causes shading anomalies when rendered. These resemble
out-of-place streaks of dirt or unexpected shadows. Depending on textures, the effect
may not be prominent, but often it disrupts the surface of an object enough that it is
undesirable.
If you do not pay attention to the smoothing values of the edges in your model,
it is easy to unintentionally create hard edges where they should be smooth and
smooth edges when they should be hard. There are automatic tools designed to fi x
this kind of problem. They analyze the angle of every face pair, and then adjust the
smoothness based on whether the angle is larger or smaller than a user-set smooth-
ing angle. This method rarely sets the smoothing values correctly on every edge in
a model because there are other criteria beyond the angle of face pairs that affect
whether an edge should be hard or soft.
If an airplane has an incised panel for a gas tank, that panel should have hard
edges, but an automatic tool would make them soft because there is no change in the
angle of faces on either side of the inset boundary. Some characters have been der-
ezed to such a degree that hard edges would appear on edges that should be soft.
Because these mistakes are common, a good working practice is to estimate what
type of edges are most common in your model, hard or soft, and then make the
entire model one or the other. After doing this, you can go through it manually to
fi nd and fi x individual edges that should be changed.
Search WWH ::




Custom Search