Appendix A
The Bottom Line

Each of “The Bottom Line” sections in the chapters suggests exercises to deepen skills and understanding. Sometimes, there is only one possible solution, but often you are encouraged to use your skills and creativity to create something that builds on what you know and lets you explore one of many possibilities.

Chapter 1: Working in Autodesk Maya

Work with Color Management.  Color Management lets you switch between sRGB and linear color space. You can also switch to many other common color space environments. The Color Management system makes it easy to render your images to be color-corrected within your favorite compositing package.

Master It  Establish a color space for a new project.

Solution  Open Windows ➣ Settings/Preferences ➣ Preferences. Choose the Color Management Category. Turn on Color Management and set the Rendering Space and View Transform.

Understand transform and shape nodes.  DAG nodes have both a transform node and a shape node. The transform node tells where an object is located; the shape node describes how it is made. Nodes can be parented to each other to form a hierarchy.

Master It  Arrange the nodes in the miniGun_v03.ma file in a hierarchical structure so that the barrels of the guns can rotate on their z-axis, the guns can be aimed independently, and the guns rotate with the turret.

Solution  In the Outliner, MMB-drag the left_gunBarrels node onto the left_housing node. MMB-drag the left_housing node onto left_mount, and then MMB-drag the left mount onto the turret node. Do the same for the right_gunBarrels, housing, and mount nodes. Graph the node structure on the Hypergraph, and examine the network.

Create a project.  Creating a project directory structure keeps Maya scene files and connected external files organized to ensure the animation project is efficient.

Master It  Create a new project named Test, but make sure the project has only the scene, source images, and data subfolders.

Solution  Use the New button in the Project Window dialog box to create a new project named Test; delete the text in all of the fields except for Scenes, Source Images, and Data. Name the folders in these fields scenes, sourceImages, and data, respectively.

Chapter 2: Introduction to Animation

Use inverse kinematics.  Inverse kinematics creates a goal object, known as an end effector, for joints in a chain. The joints in the chain orient themselves based on the translation of the goal. The IK Handle tool is used to position the end effector.

Master It  Create an inverse kinematic control for a simple arm.

Solution  Create a simple arm using three joints—one for the upper arm, one for the forearm, and one for the wrist. Rotate the forearm slightly so that the IK solver understands which direction the joint should rotate. Freeze transformations on the joints. Activate the IK Handle tool, click the first joint (known as the root), and then click the wrist joint. Move around the IK Handle to bend the joint.

Animate with keyframes.  A keyframe marks the state of a particular attribute at a point in time on the timeline. When a second keyframe is added to the attribute at a different point in time, Maya interpolates the values between the two keyframes, creating animation. There are a number of ways to edit keyframes using the timeline and the Channel Box.

Master It  Create a number of keyframes for the Translate channels of a simple object. Copy the keyframes to a different point in time for the object. Try copying the keyframes to the Scale channels. Try copying the keys to the Translate channels of another object.

Solution  After creating keys for the object, Shift+drag a selection on the timeline. Use the arrows in the selection box to move or scale the keys. RMB-click the keys, and choose Copy. Move to a different point in time on the timeline, and paste the keys. Copying, pasting, and duplicating keys to another object can be accomplished by selecting the channels in the Channel Box and using the options that appear when you RMB-click the channels.

Use the Graph Editor.  Sophisticated animation editing is available using the animation curve-editing tools on the Graph Editor.

Master It  Create a looping animation for the mechanical bug model using as few keys as possible. The bug should leap up repeatedly and move forward with each leap.

Solution  Create keyframes on the bug’s Translate Y and Translate Z channels. Set four keys on the Translate Y channel so that the bug is stationary and then moves up along the y-axis, moves back down to 0, and then holds for a number of frames. In the Graph Editor, set the Post-Infinity option for the Translate Y channel to Cycle. Create a similar set of keyframes for the Translate Z channel on the same frames. Set the Post-Infinity option for Translate Z to Cycle With Offset.

Preview animations with a playblast.  A playblast is a tool for viewing the animation as a flipbook without actually rendering the animation. FCheck is a utility program that is included with Maya. Playblasts can be viewed in FCheck.

Master It  Create a playblast of the mechBugLayers_v04.ma scene.

Solution  Open the mechBugLayers_v04.ma scene from the chapter2scenes directory at the book’s web page. Rewind the animation, and create a playblast by choosing Windows ➣ Playblast. Watch the playblast in FCheck.

Animate with motion paths.  Motion paths allow you to attach an object to a curve. Over the course of the animation, the object slides along the curve based on the keyframes set on the motion path’s U Value.

Master It  Make the bug walk along a motion path. See whether you can automate a walk cycle based on the position along the path.

Solution  Draw a curve in a scene with the fully rigged mechanical bug. Attach the bodyCtrl curve to the curve using Constraint ➣ Motion Paths ➣ Attach To Motion Path. Create set-driven keys for the leg animation, but instead of using the Translate Z of the bodyCtrl curve, use the U Value of the motion path node.

Use animation layers.  Using animation layers, you can add new motion that can override existing animation or be combined with it.

Master It  Create animation layers for the flying bug in the mechBug_v08.ma scene in the chapter2scenes folder at the book’s web page. Create two layers: one for the bodyCtrl curve and one for the legsCtrl curve. Use layers to make the animation of the wings start with small movements and then flap at full strength.

Solution  Open the mechBug_v08.ma scene. Select the bodyCtrl curve. In the animation layers, create an empty layer. Select the BaseAnimation layer, select the bodyCtrl curve, and choose Layers ➣ Extract Selected Objects. Do the same for the legsCtrl curve and the wing motors. Set keyframes on the weight of the layer that contains the wing motors. Keyframe the weight from a value of 0 to a value of 1 over 20 frames.

Chapter 3: Hard-Surface Modeling

Understand polygon geometry.  Polygon geometry consists of flat faces connected and shaped to form three-dimensional objects. You can edit the geometry by transforming the vertices, edges, and faces that make up the surface of the model.

Master It  Examine the polygon primitives in the Create ➣ Polygon Primitives menu.

Solution  Create an example of each primitive shown in the menu. Switch to vertex selection mode, and move the vertices of each primitive to create unique shapes.

Understand NURBS surfaces.  NURBS surfaces can be created by lofting a surface across a series of curves. The curve and surface degree and parameterization affect the shape of the resulting surface.

Master It  What is the difference between a one-degree (linear) surface, a three-degree (cubic) surface, and a five-degree surface?

Solution  The degree of the surface is determined by the number of CVs per span minus one. Thus a one-degree surface has two CVs per span, a three-degree surface has four CVs per span, and a five-degree surface has six CVs per span. Linear and cubic surfaces are the ones used most frequently.

Understand subdivision surfaces.  Any polygon object can be converted to a subdivision surface directly from its Attribute Editor. Maya offers three different methods for subdivision.

Master It  Convert a polygon model to a subdivision surface model. Examine how the polygon object changes in shape.

Solution  Create various polygon primitives. Open their Attribute Editor and expand the Smooth Mesh rollout. Deselect Use Global Subdivision Method. Change Subdivision Method to OpenSubdiv Catmull-Clark.

Employ image planes.  Image planes can be used to position images for use as a modeling guide.

Master It  Create image planes for side, front, and top views for use as a model guide.

Solution  Create reference drawings or use photographs taken from each view. Save the images to your local disk. Create image planes for the front, side, and top views, and apply the corresponding reference images to each image plane. Use the settings in each image plane’s Attribute Editor to position the image planes in the scene. Use display layers for each plane so that their visibility can be turned on and off easily.

Model with NURBS surfaces.  A variety of tools and techniques can be used to model surfaces with NURBS. Hard-surface/mechanical objects are well-suited subjects for NURBS surfaces.

Master It  Create the spokes of the bike.

Solution  Draw a cubic CV curve to the length of a single spoke. Extrude a circle along the curve to generate the spoke.

Model with polygons.  Booleans can be a great way to quickly cut holes into polygon surfaces. It is important, however, to establish a clean surface for the Boolean to cut into or intersect with. When you’re using multiple objects, doing so becomes even more important.

Master It  Create the hub for all of the bicycle spokes to come into. Each spoke should have its own hole.

Solution  Create a polygon cylinder. Resize it to match the shape of the hub. Extrude a thin lip where all of the spokes come into the hub. Duplicate numerous cylinders where the spokes enter into the hub. Select all of the cylinders and the hub. Perform a Boolean Difference.

Chapter 4: Organic Modeling

Implement box modeling.  Box modeling allows you to start with a simple primitive that you can extrude to create a complex form.

Master It  Starting from a smoothed cube, use box modeling techniques to create a head.

Solution  Extrude the two adjacent faces on the bottom of the smoothed cube for the character’s chin. Insert edge loops horizontally to define the center lines for the eyes, nose, and mouth. Extrude locally inside existing faces to create the eye and mouth loops.

Employ build-out modeling.  From a single polygon, you can extrude edges to create smaller sections of a larger object.

Master It  Use the build-out method to model an ear.

Solution  Create a polygon with the Create Polygon tool. Use the polygon for the outer loop of the ear. Extrude edges to complete the loop. Create a separate loop of polygons for the inner ear canal. Use Bridge to connect the two pieces.

Sculpt polygons.  The sculpting tools allow you to shape your geometry as if it were clay.

Master It  Use the sculpting tools to shape muscle definition into the female model.

Solution  Increase the geometry of the female model from female_v03.ma. Choose the Sculpting shelf to reveal the sculpting tools. Use the various tools to add definition to the female body.

Use retopology tools.  Highly detailed, sculpted models are impractical to take through the production pipeline. Instead, the high-resolution model is retopologized to a lower, more manageable resolution.

Master It  Use Quad Draw to create a low-polygon game model of the hand in hand_v01.ma.

Solution  Make the hand a live surface. Choose Quad Draw from the Modeling Toolkit. Draw quads on the surface. Try to keep the overall polygon count to fewer than 500 triangles.

Chapter 5: Rigging and Muscle Systems

Create and organize joint hierarchies.  A joint hierarchy is a series of joint chains. Each joint in a chain is parented to another joint, back to the root of the chain. Each joint inherits the motion of its parent joint. Organizing the joint chains is accomplished by naming and labeling the joints. Proper orientation of the joints is essential for the joints to work properly.

Master It  Create a joint hierarchy for a giraffe character. Orient the joints so that the x-axis points down the length of the joints.

Solution  Draw joint chains for each appendage of the animal. Draw another joint chain for the giraffe’s spine. Parent the root of each joint chain appendage to the appropriate joint on the spine.

Use Human Inverse Kinematics rigs.  Human Inverse Kinematics (HIK) creates IK Handles that control an entire bipedal or quadrupedal skeleton rather than using multiple IK chains on individual limbs.

Master It  Define the giraffe skeleton, and apply the HIK system to it.

Solution  Select the skeleton’s root joint. Choose Skeleton ➣ HumanIK to open the Character Controls panel. Define the skeleton and then create the control rig.

Apply skin geometry.  Skinning geometry refers to the process in which geometry is bound to joints so that it deforms as the joints are moved and rotated. Each vertex of the geometry receives a certain amount of influence from the joints in the hierarchy. This can be controlled by painting the weights of the geometry on the skin.

Master It  Paint weights on the giraffe model to get smooth-looking deformations on one side of the model. Mirror the weights to the other side.

Solution  Select the giraffe geometry. Open Skin ➣ Paint Skin Weights. Paint values on the geometry based on the proximity of the influencing joint. Use the smooth brush and the Weight Hammer to polish the look of the deformations. When finished, choose Skin ➣ Mirror Skin Weights.

Use Maya Muscle.  Maya Muscle is a series of tools designed to create more believable deformations and movement for objects skinned to joints. Capsules are used to replace Maya joints. Muscles are NURBS surfaces that squash, stretch, and jiggle as they deform geometry.

Master It  Use Maya Muscle to create muscles for the hind leg of the giraffe. Use the muscle system to cause skin bulging and sliding.

Solution  Use Deform ➣ Muscle ➣ Muscle/Bones ➣ Muscle Creator to generate the proper musculature. Shape the muscles to fit under the geometry. Paint different muscle weights to achieve various sliding effects.

Chapter 6: Animation Techniques

Work with deformers.  Maya has a multitude of deformers that can be used to animate or model any object with control points. Deformers provide real-time results, making them easy and flexible to work with.

Master It  Create a planet with a terrain filled with craters.

Solution  Create a primitive polygon sphere. Add a texture deformer with the 3D Crater texture. Change Point Space to World and Direction to Normal. Increase the amount of geometry on the sphere through its polySphere1 construction history node until you achieve the desired effect.

Animate facial expressions.  Animated facial expressions are a big part of character animation. It’s common practice to use a blend shape deformer to create expressions from a large number of blend shape targets. The changes created in the targets can be mixed and matched by the deformer to create expressions and speech for a character.

Master It  Create blend shape targets for the amanda character. Make an expression where the brows are up and another where the brows are down. Create a rig that animates each brow independently.

Solution  Create two duplicates of the neutral amanda character. Use the modeling tools to model raised eyebrows on one copy and lowered eyebrows on the other. Add these targets to the amanda model. Use the Paint Blend Shape Weights tool to make four additional targets: leftBrowUp, leftBrowDown, rightBrowUp, and rightBrowDown. Add these new targets to the amanda model. Create a custom control using the Curve tool. Connect the control to the Blend Shape controls using driven keys.

Animate nonlinear deformers.  Nonlinear deformers apply simple changes to geometry. The deformers are controlled by animating the attributes of the deformer.

Master It  Animate an eel swimming past the jellyfish you animated in this chapter.

Solution  Model a simple eel using your favorite tools and techniques. Apply a sine deformer to the eel. Create an expression that animates the offset of the sine wave. Group the eel and the deformer, and animate the group moving past the jellyfish.

Add jiggle movement to an animation.  Jiggle deformers add a simple jiggling motion to animated objects.

Master It  Add a jiggling motion to the belly of a character.

Solution  Create a rotund character. Animate the character moving. Add a jiggle deformer to the character. Use the Paint Jiggle Weights tool to mask the jiggle weights on the entire character except for the belly.

Apply motion capture.  Maya comes with several motion-capture animations. You can access them through the Visor.

Master It  Switch between multiple motion-capture examples on the same character.

Solution  Import another motion-capture example into the mocap_v01.ma scene file. In the Character Controls window, change Source to the newly imported motion-capture animation.

Chapter 7: Lighting with mental ray

Use shadow-casting lights.  Lights can cast either depth map or raytrace shadows. Depth map shadows are created from an image projected from the shadow-casting light, which reads the depth information of the scene. Raytrace shadows are calculated by tracing rays from the light source to the rendering camera.

Master It  Compare mental ray depth map shadows to raytrace shadows. Render the crystalGlobe.ma scene using soft raytrace shadows.

Solution  Depth map shadows render faster and are softer than raytrace shadows. Raytrace shadows are more physically accurate. Create a light and aim it at the crystalGlobe. Enable Raytrace Shadows, and increase the Shadow Rays and Light Radius settings.

Render with global illumination.  Global illumination simulates indirect lighting by emitting photons into a scene. Global illumination photons react with surfaces that have diffuse shaders. Global illumination works particularly well in indoor lighting situations.

Master It  Render the rotunda_v01.ma scene, found in the chapter7scenes folder at the book’s web page, using global illumination.

Solution  Create a photon-emitting area light, and place it near the opening in the top of the structure. Set its Intensity to 0. Create a shadow-casting direct light, and place it outside the opening in the ceiling. Turn on Emit Photons for the area light, and enable Global Illumination in the Render Settings window. Increase Photon Intensity and the number of photons emitted as needed.

Render with Final Gathering.  Final Gathering is another method for creating indirect lighting. Final Gathering points are shot into the scene from the rendering camera. Final Gathering includes color bleeding and ambient occlusion shadowing as part of the indirect lighting.

Master It  Create a fluorescent lightbulb from geometry that can light a room.

Solution  Model a fluorescent lightbulb from a polygon cylinder. Position it above objects in a scene. Apply a Lambert shader to the bulb, and set the incandescent channel to white. Enable Final Gathering in the Render Settings window, increase the Scale value, and render the scene. Adjust the settings to increase the quality of the render.

Use image-based lighting.  Image-based lighting (IBL) uses an image to create lighting in a scene. High dynamic range images (HDRIs) are usually the most effective source for IBL. There are three ways to render with IBL: Final Gathering, global illumination, and the light shader. These can also be combined if needed.

Master It  Render the bicycle scene using the Uffizi Gallery probe HDR image available at http://ict.debevec.org/~debevec/Probes.

Solution  Create an IBL node in the bicycle scene using the settings in the Render Settings window. Download the Uffizi Gallery light probe image from http://ict.debevec.org/~debevec/Probes. Apply the image to the IBL node in the scene (use Angular mapping). Experiment using Final Gathering, global illumination, and the IBL light shader. Use these in combination to create a high-quality render.

Render using the Physical Sun and Sky network.  The Physical Sun and Sky network creates realistic sunlight that’s ideal for outdoor rendering.

Master It  Render a short animation showing the street corner at different times of day.

Solution  Add the Physical Sun and Sky network to the scene using the settings in the Render Settings window. Make sure that Final Gathering is enabled. Keyframe the sunDirection light rotating on its x-axis over 100 frames. Render a sequence of the animation.

Understand mental ray area lights.  mental ray area lights are activated in the mental ray section of an area light’s shape node when the Use Light Shape option is enabled. mental ray area lights render realistic, soft raytrace shadows. The light created from mental ray area lights is emitted from a three-dimensional array of lights as opposed to an infinitely small point in space.

Master It  Build a lamp model that realistically lights a scene using an area light.

Solution  Build a small lamp with a round bulb. Create an area light, and place it at the center of the bulb. In the area light’s shape node settings, enable Use Light Shape in the mental ray settings and set the shape’s Type to Sphere. Scale down the light to fit within the bulb. Enable Raytrace Shadows, and render the scene.

Chapter 8: mental ray Shading Techniques

Understand shading concepts.  Light rays are reflected, absorbed by, or transmitted through a surface. A rough surface diffuses the reflection of light by bouncing light rays in nearly random directions. Specular reflections occur on smooth surfaces; the angle at which rays bounce off a smooth surface is equivalent to the angle at which they strike the surface. Refraction occurs when light rays are bent as they are transmitted through the surface. A specular highlight is the reflection of a light source on a surface. In CG rendering, this effect is often controlled separately from reflection; in the real world, specular reflection and highlights are intrinsically related.

Master It  Make a standard Blinn shader appear like glass refracting light in the jellybeans_v01.ma scene in the chapter8scenes folder on the book’s web page.

Solution  Open the jellybeans_v01.ma scene in the chapter8scenes folder on the book’s web page. Open the Hypershade, and select the glass material—this is a standard Maya Blinn shader. In the Raytrace Options of the glass shader’s Attribute Editor, turn on Refractions, and set Refractive Index to 1.1. Create a test render.

Apply reflection and refraction blur.  Reflection and Refraction Blur are special mental ray options available on many standard Maya shading nodes. You can use these settings to create glossy reflections when rendering standard Maya shading nodes with mental ray.

Master It  Create the look of translucent plastic using a standard Maya Blinn shader.

Solution  Apply a Blinn shader to an object. Increase transparency and reflectivity. Enable Refractions in the Raytrace Options settings. In the mental ray section, increase the Mi Reflection Blur and Mi Refraction Blur settings. Render with mental ray.

Understand mila shading layers.  The layering shaders are separate components of a traditional shader that can easily be stacked and blended on top of one another. Layered shaders allow you to add an infinite amount of detail to a single shader.

Master It  Create a mix layer and blend two colored diffuse layers together.

Solution  Create a mila_material shader. Add a weighted Diffuse Reflection layer. Click +Mix to add another layer and mix its values with the first Diffuse Reflection layer. Change the color of the first layer to blue. Change the color of the second layer to red. The colors mix together to form purple.

Chapter 9: Texture Mapping

Create UV texture coordinates.  UV texture coordinates are a crucial element of any polygon or subdivision surface model. If a model has well-organized UVs, painting texture and displacement maps is easy and error-free.

Master It  Map UV texture coordinates on the giraffe’s body.

Solution  Select the faces making up the giraffe’s body. Use a cylindrical projection to establish the UV shell. Smooth out the UVs with the Unfold UV and Smooth UV tools.

Work with bump, normal, and displacement maps.  Bump, normal, and displacement maps are ways to add detail to a model. Bump maps are great for fine detail, such as pores; normal maps allow you to transfer detail from a high-resolution mesh to a low-resolution version of the same model and offer superior shading and faster rendering than bump maps. Displacement maps alter the geometry.

Master It  Create high-resolution and low-resolution versions of the model, and try creating a normal map using the Transfer Maps tool. See whether you can bake the bump map into the normal map.

Solution  Open the Transfer Maps window. Load your low-resolution model to the Target Meshes rollout. Load your high-resolution model to the Source Meshes rollout. Select an Output Map, and change the settings to meet your specifications. Bake the map.

Create a subsurface scattering layering shader.  The subsurface scattering layering shader can create extremely realistic-looking skin.

Master It  Bake the subsurface scattering shader into texture maps. Map the baked textures to the original Blinn shaders on the giraffe, and compare its look to the rendered subsurface scattering look.

Solution  Open the Transfer Maps window. Load your low-resolution model to the Target Meshes rollout. Load your Sub-Surface Scattering mapped model to the Source Meshes rollout. Select the Custom output map. Enter the Sub-Surface Scattering shader’s name into the Custom Shader field. Bake the map.

Work with ShaderFX.  ShaderFX offers the ability to create advanced shaders using the ShaderFX Editor. Maya provides a physical-based shader and a universal shader called the ubershader.

Master It  Using the ubershader, add maps to the giraffe using the giraffeUber_v01.ma scene file. You can find the ubershader in the Maya installation directory under presetsShaderFXScenesUberShaderGraph.sfx.

Chapter 10: Paint Effects

Use the Paint Effects canvas.  The Paint Effects canvas can be used to test Paint Effects strokes or as a 2D paint program for creating images.

Master It  Create a tiling texture map using the Paint Effects canvas.

Solution  Choose a brush from the Visor, such as the downRed.mel brush from the feathers folder. On the canvas toolbar, select the Horizontal and Vertical Wrap options. Paint feathers across the canvas; strokes that go off the top or sides will wrap around to the opposite side. Save the image in the Maya IFF format, and try applying it to an object in a 3D scene.

Paint on 3D objects.  Paint Effects brushes can be used to paint directly on 3D objects as long as the objects are either NURBS or polygon geometry. Paint Effects brushes require that all polygon geometry have mapped UV texture coordinates.

Master It  Create a small garden or jungle using Paint Effects brushes.

Solution  Model a simple landscape using a polygon or NURBS plane. Create some small hills and valleys in the surface. Make the object paintable, and then experiment using the Brush presets available in the Visor. The plants, plantsMesh, trees, treesMesh, flowers, and flowersMesh folders all have presets that work well in a garden or jungle setting.

Understand strokes.  Many nodes are associated with a Paint Effects stroke. Each has its own set of capabilities.

Master It  Create a stroke and then manually move control vertices on the Paint Effects curve to alter the brush’s placement.

Solution  Choose a brush from the Visor, such as the brassTacks.mel brush from the objectsMesh folder. Paint the stroke in a new scene. Open the Hypergraph and find the curve associated to the stroke. Turn on its visibility. Choose control vertices on the curve, and transform them around the scene.

Design brushes.  Using a preset brush as a starting point, you can create custom Paint Effects brushes. You can alter the settings on the brush node to produce the desired look for the brush.

Master It  Design a brush to look like a laser beam.

Solution  Use one of the neonGlow brushes found in the glows folder in the Visor. Paint the brush in a 3D scene, paint as straight a line as possible, or attach the stroke to a straight curve using the options in the Generate ➣ Curve Utilities menu in the Modeling menu set. Open the Attribute Editor for the neon brush, and adjust the Color and Glow settings in the Shading section of the Brush attributes. Set the Stamp Density value in the Brush Profile section to a low value to create a series of glowing dots.

Create complexity by adding strokes to a curve.  Duplicating a Paint Effects curve allows you to add an additional effect to an existing stroke.

Master It  Choose a flower brush from the Visor and add grass around it.

Solution  Paint a stroke with several flowers on the grid plane. Select the stroke and duplicate it. Choose a grass brush from the Visor and apply it to the duplicated stroke.

Shape strokes with behavior controls.  Behaviors are settings that can be used to shape strokes and tubes, giving them wiggling, curling, and spiraling qualities. You can animate behaviors to bring strokes to life.

Master It  Add tendrils to a squashed sphere to create a simple jellyfish.

Solution  Use the slimeWeed brush in the grasses folder of the Visor. Paint on the bottom of the sphere. Adjust the look of the tendrils by modifying the Noise, Curl, Wiggle, and Gravity forces in the Behavior section of the Brush attributes.

Animate strokes.  Paint Effects strokes can be animated by applying keyframes, expressions, or animated textures directly to stroke attributes. You can animate the growth of strokes by using the Time Clip settings in the Flow Animation section of the Brush attributes.

Master It  Animate blood vessels growing across a surface. Animate the movement of blood within the vessels.

Solution  Use any of the treeBare presets from the Trees folder in the Visor as a starting point for the blood vessels. Use the Shading attributes to add a red color. Animate the growth of the vessels by selecting Time Clip in the Flow Animation attributes. To animate the blood in the vessels, set Texture Type to Fractal for the color in the Texturing section and select Texture Flow in the Flow Animation attributes.

Render Paint Effects strokes.  Paint Effects strokes are rendered as a postprocess using the Maya Software Renderer. To render with the mental ray software, you should convert the strokes to geometry.

Master It  Render an animated Paint Effects tree in mental ray.

Solution  Choose the Tree Sparse stroke from the Trees folder of the Visor. Draw the tree in the scene, and add animation using the Turbulence controls (choose Tree Wind turbulence). Convert the tree to polygons and render with mental ray.

Chapter 11: Rendering for Compositing

Use render layers.  Render layers can be used to separate the elements of a single scene into different versions or into different layers of a composite. Each layer can have its own shaders, lights, and settings. Using overrides, you can change the way each layer renders.

Master It  Use render layers to set up alternate versions of the coffeemaker. Try applying contour rendering on one layer and Final Gathering on another.

Solution  In the Layer Editor, copy the masterLayer twice. Rename one copy for contour shading and the other for Final Gathering. To create the layer for contour shading, make that layer active. RMB-click the contour shading layer, and choose Overrides ➣ Create New Material Override. Select a new lambert shader to be created from the list. Enable contour rendering in the shading group of this new lambert. In the Configuration tab of the Render Settings window, enable contour rendering under the Contours rollout. (Be sure to enable Show Advanced Settings at the top of the menu.)

Use render passes.  Render passes allow you to separate material properties into different images. These passes are derived from calculations stored in the frame buffer. Each pass can be used in compositing software to rebuild the rendered scene efficiently. Render pass contribution maps define which objects and lights are included in a render pass.

Master It  Create an Ambient Occlusion pass for the bicycle scene.

Solution  Under the Passes rollout tab, located in the Cameras rollout in the Render Settings window, check Ambient Occlusion.

Perform batch renders.  Batch renders automate the process of rendering a sequence of images. You can use the Batch Render options in the Maya interface or choose Batch Render from the command prompt (or Terminal) when Maya is closed. A batch script can be used to render multiple scenes.

Master It  Create a batch script to render five fictional scenes. Each scene uses layers with different render settings. Set the frame range for each scene to render frames 20 through 50. The scenes are named myScene1.ma through myScene5.ma.

Solution  You can use additional rendering flags, but the script should follow this basic template:

render -r mr -s 20 -e 50 -cam renderCam1 myScene1.mb
render -r mr -s 20 -e 50 -cam renderCam1 myScene2.mb
render -r mr -s 20 -e 50 -cam renderCam1 myScene3.mb
render -r mr -s 20 -e 50 -cam renderCam1 myScene4.mb
render -r mr -s 20 -e 50 -cam renderCam1 myScene5.mb

Use mental ray quality settings.  Controlling the quality of your renders is a joint venture between using approximation nodes and render settings. Unified Sampling offers a simplified approach to adjusting the quality of your renders. Combine this with progressive IPR, and you can quickly refine your renders.

Master It  Set up an IPR render of the coffeeMakerComposite_v04.ma scene. Focus in on half of the coffeemaker and force the render to last only 20 seconds. Adjust the quality for the best results.

Solution  Under the Configuration tab, under Preferences ➣ Interactive Rendering, choose IPR only for the Progressive Mode setting. In your Render View window, choose IPR ➣ IPR Quality ➣ IPR Progressive Mode. Render an IPR image, and then draw a region around half of the helmet.

Chapter 12: Introducing nParticles

Create nParticles.  nParticles can be added to a scene in a number of ways. They can be drawn using the nParticle Tool, spawned from an emitter, or they can fill an object.

Master It  Create a spiral shape using nParticles.

Solution  Create a NURBS cylinder. Use a twist deformer to make the surface isoparms spiral. Choose Curves ➣ Duplicate Surface Curves to extract a curve from the cylinder. Use the extracted curve as a volume curve field and emit nParticles into it.

Make nParticles collide.  nParticles can collide with themselves, other nParticles, and polygon surfaces.

Master It  Make nParticles pop out of the top of an animated volume.

Solution  Use the forge_v02.ma scene from the chapter12scenes folder. Animate the scale X and Z of the insideTub node to push the nParticles out the top.

Create liquid simulations.  Enabling Liquid Simulations changes the behavior of nParticles so that they act like water or other fluids.

Master It  Create a flowing stream of nParticles that ends in a waterfall.

Solution  Emit water nParticles with a cylindrical volume. Use the Volume Speed settings to emit the nParticles along the axis of the cylinder. Create a polygon plane, and make the nParticles collide against it. Move the emitter close to the edge of the plane to have the nParticles flow over the side.

Emit nParticles from a texture.  The emission rate of an nParticle can be controlled using a texture.

Master It  Create your own name in nParticles.

Solution  Create a texture with your name. Use the texture as the Texture Rate on a surface emitting nParticles.

Move nParticles with Nucleus wind.  The wind force on the Nucleus node can be used to push nParticles.

Master It  Blow nParticles off a surface using wind.

Solution  Sketch numerous nParticles onto a polygon plane with the nParticle Tool. Make the plane a passive collider. Animate the wind parameters to move the nParticles across the plane slowly. Increase the wind rapidly to create a gust.

Use force fields.  nParticles and collision objects can emit force fields, creating interesting types of behavior in your scenes.

Master It  Add a second nParticle object emitted from the base of the generator. Enable its force field so that it attracts some of the original energy nParticle.

Solution  Create an emitter and move it under one of the conductors. Set the nParticles radius to 0.01. Change its Point Field Magnitude value to -0.01.

Chapter 13: Dynamic Effects

Use nCloth.  nCloth can be used to make polygon geometry behave dynamically to simulate a wide variety of materials. Using the presets that come with Maya, you can design your own materials and create your own presets for use in your animations.

Master It  Create the effect of a cube of gelatinous material rolling down the stairs.

Solution  Create a polygon cube with a minimum of five subdivisions for the width and height. Make the cube an nCloth object. Use wind to blow the cube down the stairs. Alter the Compression Resistance on the nCloth node to achieve different effects.

Combine nCloth and nParticles.  Because nCloth and nParticles use the same dynamic systems, they can be combined easily to create amazing simulations.

Master It  Make a water balloon burst as it hits the ground.

Solution  Model a water balloon and convert it to nCloth. Assign the waterBalloon preset to the nCloth geometry. Fill the balloon with nParticles using the Fill Object settings. Use a Tearable Surface constraint on the nCloth balloon. Add a primitive plane to the scene, and have the balloon collide against it.

Use nParticles to drive instanced geometry.  Modeled geometry can be instanced to nParticles to create a wide variety of effects.

Master It  Create the effect of a swarm of insects attacking a beach ball.

Solution  Create a simulation of nParticles. Replace the nParticles with instanced geometry of a small insect. Create a beach ball using nCloth. Make the nCloth beach ball a goal to the nParticles.

Create nParticle expressions.  nParticle expressions can be used to further extend the power of nParticles. Using expressions to automate instanced geometry simulations is just one of the ways in which expressions can be used.

Master It  Improve the animation of the insects attacking the beach ball by adding different types of insects to the swarm. Randomize their size, and create expressions so that larger insects move more slowly.

Solution  Use per-particle attributes and the Expression Editor to create a relationship between the insects’ scale and the particle’s velocity.

Create a soft body simulation with Bullet.  Bullet physics are fast and accurate. In addition to creating rigid body simulations, you can use Bullet to create clothlike effects with its soft bodies.

Master It  Drape a tablecloth over a table using soft body physics.

Solution  Model a basic table. Create a primitive plane, and translate it a few units above the table. Convert the plane to a soft body. Increase the resolution of the plane to improve the look of the simulation.

Chapter 14: Hair and Clothing

Add XGen descriptions to characters.  XGen is a primitive generator that adds realistic short hairs to the surface of character. The placement, length, and other attributes of the hairs can be controlled by painting on the surface using the XGen grooming tools.

Master It  Create eyebrows for the head used at the beginning of this chapter.

Solution  Open the hairstyle_v03.ma scene from the chapter14scenes folder at the book’s web page. Add a new description to the female collection. Use the grooming brushes to remove hairs to get the shape of an eyebrow.

Create dynamic curves.  A standard Maya curve can be made dynamic by using the Make Dynamic Curves action in the Hair menu. A copy of the curve is created that will respond to dynamic motion and forces. The curve can be used in skeletons for IK Spline tools, as a source for Paint Effects strokes, as a modeling tool, or for any other effect that requires curves.

Master It  Create a flag using dynamic curves.

Solution  Create two parallel curves, and make both dynamic. Set the Point Lock attribute on both curves to Base. Loft a NURBS surface between the dynamic curves. Edit the dynamic properties of the curves, and apply fields to the curves to create a flapping motion for the flag.

Add hair to characters.  Hair is created using Paint Effects strokes that are controlled by follicles. The follicles are dynamic curves that respond to forces and movement. Follicles can be applied to polygon or NURBS surfaces as a grid or by painting on the surface. The Visor contains a number of hair presets that can be imported into a scene.

Master It  Add hair to the top of the giraffe’s head from Chapter 9.

Solution  Open the giraffeUV_v07.ma scene from the chapter9scenes folder at the book’s web page. Create a scalp surface for the giraffe by duplicating selected faces on the head. Paint follicles on the head to suggest hair growing from the top of the head. Use Thinning and other hair properties to create the look of long and wispy hair.

Style hair.  Hair can be styled by painting attribute values on follicles or by directly editing the CVs of start or rest curves.

Master It  Create an avant-garde hairdo for the nancy character by painting attributes.

Solution  Open the nancyHair_v06.ma scene from the chapter14scenes folder. Apply a turbulence field to the hairSystem1 node. Set Magnitude to a high value (10 to 20), and set Attenuation to 0. Play the animation. When the hair achieves an interesting state, select the follicles and set the state as the hair’s rest position (and start position). Delete the field, and increase the hair’s Start Curve Attract attribute.

Paint nCloth properties.  Properties such as Bounce, Stretch, and Wrinkle can be painted onto nCloth objects using either texture or vertex painting techniques. When painting properties, you may need to alter the Min and Max Value ranges in the Artisan interface to allow for values beyond the range of 0 to 1. Vertex maps have the advantage that the values are not stored in an external texture file.

Master It  Add starch to the simple man’s shirt by painting a Rigidity value on the shirt geometry.

Solution  Open the simpleMan_v06.ma scene from the chapter14scenes folder. Select the surface, and paint a vertex map. Choose Rigidity as the property that you want to paint. Set Max Value in the Artisan Tool options to 30. Set the Max Color slider in the Artisan Display options to 30. Set the Paint value to somewhere between 20 and 30, and paint on the surface where you want the shirt to be stiff. Adjust the values as needed.

Chapter 15: Maya Fluids

Use fluid containers.  Fluid containers are used to create self-contained fluid effects. Fluid simulations use a special type of particle that is generated in the small subunits (called voxels) of a fluid container. Fluid containers can be 2D or 3D. Two-dimensional containers take less time to calculate and can be used in many cases to generate realistic fluid effects.

Master It  Create a logo animation that dissolves like ink in water.

Solution  Create a 2D fluid container. Add a surface emitter using a NURBS plane, and add an emission map for the diffusion attribute of the emitter. Use a file texture created from a logo. Set the Buoyancy value of the fluid to 0. Use dynamic fields to push the logo to create the dissolving motion. Try using Turbulence, Drag, and Vortex fields on the logo.

Create a reaction.  A reaction can be simulated in a 3D container by combining temperature with fuel. Surfaces can be used as emitters within a fluid container.

Master It  Create a chain reaction of explosions using the Paint Fluids tool.

Solution  Create a 3D fluid container. Use the Paint Fluids tool to paint small blobs of fuel separated by short distances. The painted fuel blobs should be arranged so that they create a chain reaction when lit. Add an emitter that emits temperature, and place it below the first fuel blob in the container. Set the Ignition Temperature, Reaction Speed, and Heat Released attributes in the Fuel section of the container so that the fuel burns and emits heat when a certain temperature is reached. Set Shaded Display to Temperature so that you can see the reaction.

Render fluid containers.  Fluid containers can be rendered using Maya Software or mental ray. The fluids can react to lighting, cast shadows, and self-shadow.

Master It  Render the TurbulentFlame.ma example in the Visor so that it emits light onto nearby surfaces.

Solution  Create a scene that has simple modeled surfaces such as a floor and some logs. Import the TurbulentFlame.ma scene from the Fire folder of the Visor (on the Fluid Examples tab). Set the renderer to mental ray. Under the Quality tab set the Indirect Diffuse (GI) Mode to Final Gather. Disable the Default Light under the Render Options rollout of the Common tab of the Render Settings window. Play the animation, and render a test frame when the fire is burning.

Use fluids with nParticles.  Fluid simulations can interact with nParticles to create a large array of interesting effects.

Master It  nCloth objects use nParticles and springs to simulate the behavior of cloth. If fluids can affect nParticles, it stands to reason that they can also affect nCloth objects. Test this by creating a simulation where a fluid emitter pushes around an nCloth object.

Solution  Create a 3D fluid container and an emitter that emits density and temperature. The fluid should rise in the container, and the Swirl attribute in Velocity should be set to 10 so that there is a turbulent motion. Create a polygon sphere, and place it inside the fluid container above the emitter. Convert the sphere to an nCloth object. Use the Silk preset for the nCloth object, and set Gravity in the Nucleus tab to 0.1. Play the animation, and experiment with the settings in the fluid container and on the nCloth object until the fluid pushes the nCloth object around.

Create an ocean.  Ocean effects are created and edited using the Ocean shader. Objects can float in the ocean using locators.

Master It  Create an ocean effect that resembles stormy seas. Add the capsule geometry as a floating object.

Solution  Import the WhiteCaps.ma scene from the Ocean Examples tab of the Visor. Import the capsule_v01.ma scene from the chapter15scenes folder at the book’s web page. Use the Float Selected Objects command to make the capsule float on the surface of the water. Look at the settings in the Ocean shader node to see how the stormy sea effect was created.

Chapter 16: Scene Management and Virtual Filmmaking

Use assets  An asset is a way to organize the attributes of any number of specified nodes so that the attributes are easily accessible in the Channel Box. This means that members of each team in a pipeline only have to see and edit the attributes they need to get their job done, thus streamlining production.

Master It  Create an asset from the nodes in the miniGun_v04.ma scene in the chapter1scenes folder. Make sure that only the Y rotation of the turret, the X rotation of the guns, and the Z rotation of the gun barrels are available to the animator.

Solution  Make a container that holds the turretAim and turret nodes (and their child nodes). Use the Asset Editor to publish the Rotate Y, Rotate X, and barrelSpin attributes of the turretAim curve node to the container. Set the container to Black Box mode so that the animator can’t access any of the attributes of the contained nodes.

Create file references  File references can be used so that as part of the team works on a model, the other members of the team can use it in the scene. As changes to the original file are made, the referenced file in other scenes will update automatically.

Master It  Create a file reference for the miniGun_v04.ma scene; create a proxy from the miniGun_loRes.ma scene.

Solution  Create a new scene, and reference the miniGun_v04.ma file in the chapter1scenes directory. Use the Reference Editor to make a proxy from the miniGun_loRes.ma scene in the same folder at the book’s web page.

Determine the camera’s image size and film speed  You should determine the final image size of your render at the earliest possible stage in a project. The size will affect everything from texture resolution to render time. Maya has a number of presets that you can use to set the image resolution.

Master It  Set up an animation that will be rendered to be displayed on a high-definition progressive-scan television.

Solution  Open the Render Settings, and choose the HD 1080 preset under the Image Size rollout on the Common tab. Progressive scan means that the image will not be interlaced (rendered as alternating fields), so you can render at 24 frames per second. Open the Preferences window, and set the Time value under Settings to Film (24 fps).

Create and animate cameras  The settings in the Attribute Editor for a camera enable you to replicate real-world cameras as well as add effects such as camera shaking.

Master It  Create a camera setting where the film shakes back and forth in the camera. Set up a system where the amount of shaking can be animated over time.

Solution  Enable the Shake Overscan attribute on a camera. Attach a fractal texture to the Shake Overscan attribute, and edit its Amplitude settings. Create an expression that sets the Alpha Offset to minus one-half the Alpha Gain setting. Set keyframes on Alpha Gain to animate the shaking of the Shake Overscan attribute over time.

Create custom camera rigs  Dramatic camera moves are easier to create and animate when you build a custom camera rig.

Master It  Create a camera in the car-chase scene that films from the point of view of chopperAnim3 but tracks the car as it moves along the road.

Solution  Create a two-node camera (Camera and Aim). Attach the camera to a NURBS curve using a motion path, and parent the curve to chopperAnim3. Parent the aim of the camera to the vehicleAnim group. Create an asset for the camera so that the position of the camera around the helicopter can be changed, as can the position of the aim node relative to the vehicleAnim group.

Use depth of field and motion blur  Depth of field and motion blur replicate real-world camera effects and can add a lot of drama to a scene. Both are expensive to render and therefore should be applied with care.

Master It  Create a camera asset with a built-in focus distance control.

Solution  Create the same camera and focus distance control as shown in this chapter. Select the camera, camera shape node, and distance controls, and place them within a container. Publish the Z Translation of the distToCam locator to the container. Publish the F-Stop and Focus Region Scale attributes as well.

Create orthographic and stereo cameras  Orthographic cameras are used primarily for modeling because they lack a sense of depth or a vanishing point. A stereoscopic rig uses three cameras and special parallax controls that enable you to render 3D movies from Maya.

Master It  Create a 3D movie from the point of view of the driver in the chase scene.

Solution  Create a stereo camera rig, and parent it to the car in the chase scene. Use the center camera to position the rig above the car’s cockpit.

Use the Camera Sequencer  The Camera Sequencer can be used to edit together multiple camera shots within a single scene. This is useful when blocking out an animatic for review by a director or client.

Master It  Add a fourth camera from the point of view of the car, and edit it into the camera sequence created in the section “Using the Camera Sequencer” in this chapter.

Solution  Create a new camera, and parent it to the car. Name the new camera driverCam. Position and aim driverCam so that it shows the point of view of the driver. In the Camera Sequencer, choose Create ➣ Shot ➣ ❒ to add a new shot. Set the Shot Camera menu to driverCam. Set Start Time to 130 and End Time to 160. Use the Sequencer editor to position the new shot in the sequence.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset