[ Pobierz całość w formacie PDF ]
.Today, with computational speed high enough to usethe most sophisticated forms of shading, Phong shading and an even moreaccurate method called Blinn shading are the included default ways mostanimation programs render polygons.All this talk about shading so far has been concerned with smoothing thesharp edges of polygons where they meet.But what about edges that youwant to remain sharp? Let s say the cutting edge of that Ginsu knife that isotherwise smooth and rounded along the blade must stay sharp.For situa-tions like this, you need a method to tell the computer which edges you don twant smoothed by Mr.Phong or Mr.Blinn.Some programs offer a limiter,based on the angle (of the surface normal) formed by any two adjacentpolygons.For instance, if you want every angle less than 90 degrees to besmoothed, you could set a maximum smoothing angle to be 89.5 degrees.If the computer sees anything less than that, the edge is smoothed.If theedges meet at 90 degrees or more, the edge is left as is.Smoothing parame-ters can save you the effort of creating two or more smoothed surfaces andthen joining them along the sharp edge, which would be the hard way ofmaking that darned Ginsu blade.As computer science further developed, creative individuals began tooffer new methods of shading, now generically called shaders, for a widevariety of specific purposes.Some shaders are named after their creators,such as Strauss (good for metals) and Oren Nayar Blinn (good for creatingfuzzy effects), whereas others are named for what they do best.Aniso-tropic renders a kind of brushed metallic reflection, and shag furshaders make a surface look like shaggy fur.Many shaders are now available for LightWave, Maya, and 3ds max fromthird-party vendors as plug-ins.For instance, Darktree Shaders (www.darksim.com) make excellent plug-ins for 3ds max, LightWave, C4D, Hash,and True Space animation programs that enable you to zoom in on anobject.Darktree Shaders are yours, free on the CD I ve included in thisbook! Because the shader recalculates its parameters at all focal points,large texture maps are not needed, and they tend to slow the renderinganyway.Finally, because each of the key animation programs offer some level ofopen architecture, which means you can write your own code for certainareas of the program, many animators with programming experience writetheir own shaders. 05_200505_Avg_ch05 9/5/03 11:30 AM Page 253Objects and Surfaces253Advanced Shading Techniques When the computer starts to render asurface, it examines the tables of information that have been assembled bythe animation program and that are derived from your inputs in the con-trol screens.Creative programmers have examined the process by whichthe surface is generated and have introduced certain software proceduresthat enable unusual effects to be created without a great deal of labor onthe part of the operator.Take, for instance, the issue of hair on a character s head.In the past, asingle hair could be expressed in some 3-D computer programs as a cylin-der with a small diameter and in others as a two-point polygon.Such astrand would have to be duplicated hundreds, if not thousands, of times tocover a human s head, and even more to cover the skin of an animal figure.Such hairs would remain fixed, either straight like needles or bent in somefashion, unless some keyframable deformation could be expressed on each.Later, you ll see how we accomplish this with arms and legs, but hair?Millions of hairs? I don t think so.You can imagine the complexity that hair can represent if each hair mustbe created as a single object.This problem challenged many animatorsbefore you.Then some brilliant programmers came up with the idea of deal-ing with hair as a shader issue.Instead of creating an individual pixel at a particular point on the sur-face of an object, the computer creates a strand of hair at predeterminedintervals on the surface pixels.This strand, like all other strands emanat-ing from the object, will have a root point (the same as the pixel the strandreplaces), a set length (determined by the operator), and certain flow prop-erties.Flow properties might include the original direction, stiffness (orresistance to movement of the underlying skin), and memory (or the ten-dency to return to the same original direction).See Figure 5-12.Shaders are currently considered one of the most advanced levels of com-puter animation and may not be found in all animation programs.Look forthese features as optional plug-ins that may be offered by third-party ven-dors for your animation program.Other animation programs enable anexperienced software engineer to write code that will work as a proceduralor shader effect.Surface Names Now that we can shade a surface well enough to renderrealistic curves, what are the attributes that you might want to impart onthose curved surfaces? The first and most important attribute of a surfaceis its name.As mentioned before, an object can have many surfaces 05_200505_Avg_ch05 9/5/03 11:30 AM Page 254Chapter 5254Figure 5-12Examples of hairshading using athird-party plug-infrom Digimation sShag: Hair ($495)for 3ds max.Knight image,copyright 1999 byMagicPictures,image created byMakoto Chiba.Eeevil Guy,copyright 19962003 Digimation,Inc.All rightsreserved [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • czarkowski.pev.pl
  •