Mastering Autodesk Maya 2011 phần 9 pdf

105 317 0
Mastering Autodesk Maya 2011 phần 9 pdf

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

addIng Fur to CharaCters | 811 I prefer doing much of my texture map painting in Pixologic’s ZBrush because of its intuitive poly- gon painting workflow. I like to use ZBrush to carefully paint the baldness and other fur attribute maps, especially when doing something such as creating whiskers for a character’s face. You can just as easily use Mudbox to paint these maps as well. Editing the Fur Description: Direction You can use the Artisan Brush interface to comb the fur by painting the Direction attribute. 1. Continue with the scene from the previous section, or open the hound_v03.ma scene from the chapter15\scenes directory on the DVD. You’ll notice that there is no Direction or Comb attribute listed in the attributes for the houndFur node. Painting the Direction attribute is the same as painting the Polar attribute. 2. In the houndFur node’s Attribute Editor, set Inclination to 1, and move the Polar slider back and forth. The Polar slider determines the direction in which the fur strands face, but you’ll notice that the direction is not uniform across the surface. Inclination Sets the angle at which the hair stands from the surface. A value of 0 is per- pendicular to the surface; a value of 1 causes the fur to lie flat against the surface. If the value is 0, then the fur strand sticks straight up, so changing its direction has no visible effect. Roll Rotates the fur around its root. A value of 0 is -90 degrees; a value of 1 is 90 degrees. Base Curl and Tip Curl Determine the amount of curling applied to the base and tip of the hair. A value of 0.5 produces straight hair; a value of 0 or 1 curls the hair from one side or the other. 812 | CHAPTER 15 Fur, haIr, and ClothIng The change in direction created by the Polar attribute is based on the direction of the UV texture coordinates. This means that a value applied to fur on one part of the model has a different result than a value applied on another part of the model. To comb the hair correctly, you use the Direction attribute in the Paint Fur Attributes tool to apply a Polar value based on the direction that you drag across the surface. So when you choose to paint the Direction attribute in the Paint Fur Tool options, you’re really painting values for the Polar attribute but in a way that is a bit more intuitive. When painting the direction, set Inclination to a value other than 0, and the Roll value must be something other than 0.5. The Base Curl and Tip Curl values must be something other than 0.5 as well. If these values are not set properly, painting the Direction has no effect. In addition, Color Feedback has no bearing on the direction of the fur, so you can turn this option off in the options for the Artisan tool. 3. Open the Attribute Editor for the houndFur node, and use the following settings: Inclination: 0.8 Roll: 0.2 Base Curl: 0.7 Tip Curl: 0.3 4. Select the houndHead surface. Choose Fur  Paint Fur Attributes Tool  Options. Wait a few moments for Maya to update. 5. In the Options box for the Artisan tool, scroll to the bottom. In the Display options, turn off Color Feedback. 6. In the pop-up options for the Paint Fur Attributes Tool settings, set Fur Attribute to Direction. Make sure Fur Description is set to houndFur and Attribute Map Width and Height are set to 1024. The Paint Operation or Value settings in the Artisan options do not affect how the fur is combed. 7. Drag across the surface to push the fur in the general direction you want it to go. Use Figure 15.10 for reference. Figure 15.11 shows how the paint stroke influences the direc- tion of the fur on the model. Paint lightly and slowly using repeated strokes to make the fur point in the desired direc- tion. Combing the fur requires some patience and practice. It’s helpful to increase the U and V samples on the FurFeedback node so that you can see more fur as you are painting. It can be difficult to maintain a consistent direction across UV seams. The fewer seams you have in your UV texture coordinates, the easier it will be to paint the direction of the fur. The Direction attribute responds to the direction in which you move the cursor over the surface. 8. Save the scene as hound_v04.ma. To see a version of the scene to this point, open the hound_v04.ma scene from the chapter15\ scenes directory. addIng Fur to CharaCters | 813 Figure 15.10 Observe the direc- tion of the fur in this photo of an Ameri- can foxhound. Figure 15.11 Paint the direc- tion of the fur on the surface of the hound. Increase the U and V Samples in the fur feedback node to 256 to make it easier to see details in the fur direction. 814 | CHAPTER 15 Fur, haIr, and ClothIng Painting Across UV Texture Borders As you paint across UV borders on the model, you’ll see the hair suddenly flip around. Since fur relies on UV texture coordinates to determine how the Polar attribute affects direction, as you move from one part of the texture space to another, the polarity of the fur can suddenly change (a good example of this occurs on the back of the hound’s head). This may drive you crazy. To help deal with these problems, select the model, and choose Display  Polygons  Texture Border Edges. This makes the border edges of the UV coordinates visible as bold lines on the surface of the model. You can also reduce the size of the brush so that you can more easily paint specific areas along the border. With some patience and work, you’ll be able to make the direction of the fur consistent across the UV texture border. Editing the Fur Description: Length You can edit the Length attribute using the Paint Attributes tool as well. When editing lengths, you need to pay attention to the values used in the options for the Artisan Brush. For the hound, the fur is shorter near the end of the nose, is medium length on the face, and is long on the back of the head and neck. 1. Continue with the scene from the previous section, or open the hound_v04.ma scene from the chapter15\scenes directory. 2. In the houndHead_furFeedbackShape tab, set U and V Samples to 128. 3. Select the houndHead object, and choose Fur  Paint Fur Attributes Tool. addIng Fur to CharaCters | 815 4. In the pop-up menu for the Paint Fur Attributes Tool settings, set Fur Attribute to Length. Make sure Fur Description is set to houndFur and Attribute Map Width and Height are set to 1024. 5. In the options for the Artisan Brush, set Paint Operation to Replace and Value to 0.5. 6. Paint around the area of the neck. You’ll see the fur become longer as you paint (Figure 15.12). 7. Set Value to 0.25, and paint on the ears, under the ears, the top of the head, and the upper part of the throat. 8. Set Value to 0.1, and paint the area near the nose and the front of the snout near the lips. 9. To even out the transition between the fur lengths, set Paint Operation to Smooth, and paint the areas on the border between the different lengths of fur. 10. Save the scene as hound_v05.ma. To see a version of the scene to this point, open the hound_v05.ma scene from the chapter15\ scenes directory. After painting fur lengths you may decide to touch up the Direction attribute of the fur as well. You can change the paint operation mode (from Length to Direction, for example) in the Paint Fur Attributes Tool Settings pop-up whenever you need to, but remember that Maya may pause for a few moments to update the maps when you change attributes. Figure 15.12 Edit the length of the hair by paint- ing on areas of the houndHead surface. 816 | CHAPTER 15 Fur, haIr, and ClothIng Baking Textures into Maps You can use a procedural texture node (such as a ramp, fractal, or checker) as a starting place for a fur attribute map, as shown here. This works well when you are painting fur applied to a NURBS surface, since the UV texture coordinates are based on the parameterization of the surface itself. The following steps demonstrate how to do this. 1 . Create a new scene in Maya. 2 . Create a NURBS sphere. 3 . Select the sphere, and choose Fur Attach  Fur Description  New. 4 . Open the Attribute Editor for the FurDescription1 node. 5 . Right-click the field next to Baldness, and choose Create New Texture. 6 . From the Create Texture Node window, choose the ramp texture. The fur on the sphere disappears. 7 . Open the Attribute Editor for the ramp texture. Change the colors of the ramp so that the top is black and the bottom is white. Delete the color marker in the center. The fur display returns. If you move the markers on the ramp up and down, you’ll notice that the fur display does not change. In order to use the ramp values to affect the Baldness setting, you need to bake the ramp. 8 . Move the black marker halfway down the ramp, and set Interpolation to None. 9 . In the Attribute Editor for the FurDescription node, set Bake Attribute to Baldness, and leave Map Width and Height set to 256. Click the Bake button. The fur becomes sparse on part of the sphere. This sparse area corresponds to the black part of the ramp. You can select the ramp texture in the Hypershade and connect it to the Color channel of the sphere’s shader if you’d like to see a visual representation of the placement of the ramp on the sphere. addIng Fur to CharaCters | 817 1 0 . Move the Black color marker down. The fur on the sphere will not update until you bake the texture again. 1 1 . In the Attribute Editor for Fur Description, click the Bake button. The fur on the sphere updates. To see this example, open the rampBaldness.ma scene from the chapter15\scenes directory on the DVD. A good use for this technique would be for applying fur as grass to a NURBS plane. You can use a frac- tal texture to create procedural variation in baldness or length to make the grass appear patchy. Test Render Fur Now that you have the basic fur description created for the houndHead, you may want to see what it looks like when rendered. You can render the scene using either mental ray or Maya Software. The results should be fairly similar. In this example, you’ll use mental ray. 1. Continue using the scene from the previous section, or open the hound_v05.ma scene from the chapter15\scenes folder. 2. Open the Render Settings window, and set the Render Using menu to mental ray. 3. On the Quality tab, set Quality Presets to Production: Rapid Fur (see Figure 15.13). This preset uses the Rasterizer as the primary renderer instead of raytracing. For more infor- mation on rendering with mental ray, consult Chapter 12. Figure 15.13 Choose the Rapid Fur preset on the Quality tab of the Render Settings window. 818 | CHAPTER 15 Fur, haIr, and ClothIng 4. Open the Render View window, and create a test render using the perspective camera. You’ll notice immediately that the fur does not look very realistic (see the upper-left image in Figure 15.14). It is very sparse and bright red. You need to increase the Density setting of the fur so that enough hair covers the surface of the model. 5. Set Density in the houndFur tab to 100,000, and create another test render (see the upper- right image in Figure 5.14). The fur is much denser without adding too much to the render time. To improve the look of the fur, you can edit the base and tip widths as well as the basic color. 6. In the houndFur tab in the Attribute Editor, click the color swatch next to Base Color, and use the Color Chooser to set the color to a dark brown. 7. Set Tip Color to a light brown. 8. Make sure Base Opacity is set to 1, and use the following settings: Tip Opacity: 0.1 Base Width: 0.01 Tip Width: 0.005 9. Create another test render (see the lower-left image in Figure 5.14). Figure 15.14 Create test renders of the fur as you adjust the settings. addIng Fur to CharaCters | 819 10. Raise Density to 500,000, and create another test render (see the lower-right image in Figure 5.14). 11. Save the scene as hound_v06.ma. To see a version of the scene, open the hound_v06.ma scene from the chapter15\scenes di rectory. The fur should cover the model completely; however, you will notice that some attributes, such as the baldness map and the direction, may require further editing. Applying a Color Map Adding a texture map to the color greatly helps the realism of the fur. You can increase the effi- ciency of the render by applying the same file texture to the fur color and the shader as applied to the model. This technique should work as long as the model does not get extremely close to the camera. A texture map that has been carefully painted in Photoshop or in a 3D texturing program works better than a map created by painting color on the fur. In this case, ZBrush was used to create the color texture map for the hound model. 1. Continue with the scene from the previous section, or open the hound_v06.ma scene from the chapter15\scenes directory on the DVD. 2. Open the Hypershade, select the houndShader material, and open its Attribute Editor. 3. Click the checkered button next to the Color channel to open the Create Texture Node window. 4. Click the File button to create a file texture node. 5. In the Attribute Editor for the file node, click the folder icon next to File Name. 6. Use the browser to select the houndBaseColor file texture from the chapter15\ sourceimages directory on the DVD. 7. Press the 6 key to switch to textured view so you can see how the color is placed on the model. 8. Keep the Hypershade window open. In the Outliner, expand the FurFeedback group, and select the houndHead_FurFeedback node. 9. In the Attribute Editor, select the houndFur tab. 10. In the Hypershade, switch to the Textures tab. MMB-drag the file1 texture onto the Base Color swatch in the Attribute Editor for houndFur (see Figure 15.15). 11. In the Hypershade, create a second file texture node (Create 2D Texture  File). 12. In the Attribute Editor for file2, load the houndTipColor texture. This is a lighter, less- saturated version of the base color. 13. Attach this file to the Tip Color channel in the houndFur node. 820 | CHAPTER 15 Fur, haIr, and ClothIng 14. Lower Specular Color to a dark gray, and set Specular Sharpness to 80. This makes the specular highlight on the fur smaller and less reflective. 15. Set the Density value of the fur to 250,000 in the houndFur tab, and create a test render (see the left image in Figure 15.16). 16. To increase the realism of the fur, turn on shadows for the scene lights: a. Select the spotlight1 object, and open its Attribute Editor. b. Under Shadows, turn on Use Depth Map Shadows. c. Set Resolution to 1024, and turn off Use Auto Focus. d. Create another test render (see the right image in Figure 15.16). 17. Save the scene as hound_v07.ma. To see a version of the scene, open the hound_v07.ma scene from the chapter15\scenes di rectory. Figure 15.15 Drag the file1 node from the Textures tab of the Hypershade onto the Base Color channel of the houndFur node. Figure 15.16 Add a color map to the fur description (left image), and render the scene shadows (right image). [...]... inherited by the fur Rendering Fur Using mental ray You can render fur using mental ray or Maya Software When rendering with Maya Software, you’ll need to add a fur shadowing node to the lights in the scene In this section, you’ll learn how to render fur with mental ray, which generally produces a more realistic result than Maya Software If you plan to use depth map shadows, use the Production: Rapid Fur preset... your machine (see Figure€15.21) 13 Save the scene as hound_v 09. ma To see a finished version of the scene, open the hound_v 09. ma scene from the chapter15\ scenes directory on the DVD You can continue to improve the look of the fur by improving the texture maps applied to the fur description as well as by improving the lighting in the scene Maya Fur does a pretty good job creating fur effects for many... 838â•… Fur, Hair, and Clothing 8 In the Turbulence settings, enter the following settings: Intensity: 0.8 Frequency: 1 Speed: 1 9 Set the timeline to 300, and play the scene The curves appear to move a bit like some undersea plant life (see Figure€15. 29) Figure€15. 29 Paint a hair system on a model of the ocean floor Set the dynamics to simulate undersea plant life Hair Curve Display Settings You... little hard to see; this will be more obvious in the next step) 9 Stop the playback, and switch to the hairSystem1 tab 10 In the Dynamics rollout panel, set the Stiffness value to 0, and play the scene You’ll see the dynamic curve droop a little As the scene is playing, increase Length Flex | Animating Using Dynamic Curves â•… 8 29 The Stiffness setting controls the rigidity of the curve A higher... Fur, Hair, and Clothing Figure€15. 19 Select surface points at the top of the sphere 6 Click the Create Hairs button to make the hairs The hair curves appear as longer curves coming out of the surface of the sphere 7 Open the Outliner, and select the hairSystem1 node 8 Switch to the Rendering menu set, and choose Fur  Attach Hairsystem To Fur  FurDescription1 9 Set the timeline to 200, and play... playing, increase the Collide Over Sample value This setting adjusts how often collisions are calculated per time step Higher values increase accuracy but slow down playback in Maya Set the value to 6 | Adding Hair to a Character â•… 8 39 You’ll notice that the hair sticks to the sphere as it passes This is a common problem when using geometry to collide with hair There are some techniques you can use to... scene Maya Fur does a pretty good job creating fur effects for many typical situations For truly stunning fur and hair effects, you may want to consider using the Shave and a Haircut plug-in developed for Maya by Joe Alter This plug-in has been used for many feature films and television shows For more information, visit www.joealter.com Figure€15.21 Render the hound using ray trace shadows Animating Using... NURBS surfaces, curves used as IK splines, curves used as particle emitters, and so on, can be made dynamic, thus opening up a large number of possibilities for creating additional dynamic effects in Maya Furthermore, | Animating Using Dynamic Curves â•… 827 dynamic curves calculate fairly quickly compared to nCloth, making surfaces created from lofted dynamic curves a useful alternative to nCloth... spotlight, and open its Attribute Editor 6 Under Shadows, turn on Use Ray Trace Shadows The Fur/Shadowing attributes listed below the Use Ray Trace Shadows settings are used specifically when rendering with Maya Software, which requires that the shadow-casting lights be connected to the fur description This is not necessary when rendering with mental ray 7 Create a directional light Rotate the light so that... 5 Set another keyframe This is a good way to create the effect of a cable or rope snapping 18 Select the follicle node, and set the Translate channels to 0 to return the curve to its start position 19 With the follicle selected, turn on Point Snapping 20 Hold the d key, and use the Move tool to move the pivot point of the follicle to the end of the curve on the side where the dynamic curve is still . direction has no visible effect. Roll Rotates the fur around its root. A value of 0 is -90 degrees; a value of 1 is 90 degrees. Base Curl and Tip Curl Determine the amount of curling applied to the. 0.005 9. Create another test render (see the lower-left image in Figure 5.14). Figure 15.14 Create test renders of the fur as you adjust the settings. addIng Fur to CharaCters | 8 19 10 the fur. Rendering Fur Using mental ray You can render fur using mental ray or Maya Software. When rendering with Maya Software, you’ll need to add a fur shadowing node to the lights in the scene.

Ngày đăng: 09/08/2014, 11:21

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan