effects software is a top choice for film and video artists, game developers, and 3D design professionals Now you can learn to build, animate, texture, and light your own digital models and scenes, and start developing professional-level Maya animation skills with Introducing Maya 2009 A perennial favorite and bestseller, this latest edition is the ideal initiation to 3D and Maya Starting with the basics, it builds from the ground up, combining straightforward text with practical examples that make it easy to learn Maya’s core tools while introducing the latest Maya Create a simple animation of the planets in the solar system Experiment with modeling a starfish, a red wagon, and a locomotive Explore the basics of organic surfaces, polygons, and subdivision surfaces Discover the nuances of shading and texturing Rig a locomotive model for automated animation Light your red wagon with HDR images and render with mental ray® and Final Gather while you learn by doing using a wealth of hands-on files in the full-color insert to inspire you Use Maya’s Render Layers and an Ambient Occlusion pass for greater reality Experiment with IBL (image-based lighting) and HDR images with mental ray Learn how to create particles such as smoke, and adjust them to the size and shape you want provided on the CD You’ll also find compelling examples Dariush Derakhshani is an award-winning 3D animator, author, and educator He has worked on movies such as The Fantastic Four and Pan’s Labyrinth, the South Park TV series, and numerous commercials and music videos He teaches Maya and 3D animation and is the author of all the Introducing Maya books and coauthor of Mastering Maya 8.5 and Introducing 3ds Max 2008, all from Sybex US $39.99 / CAN $43.99 ISBN: 978-0-470-37237-1 ® 2009 features Follow clear-cut, step-by-step lessons Learn to navigate the Maya 2009 interface Introducing Maya 2009 The Academy Award®–winning Maya® 3D animation and The enclosed CD features images, movies, and scene files that let you view material from the book The support files will enable you to complete all of the tutorials Derakhshani ENTER A NEW DIMENSION WITH MAYA 2009 INTRODUCING MAYA 2009 ® Dariush Derakhshani www.sybex.com www.autodesk.com/maya COMPUTERS/Computer Graphics/Design 72371ffirs.indd 11/14/08 1:25:01 PM Introducing Maya 2009 ® Dariush Der akhshani 72371ffirs.indd 11/14/08 1:25:00 PM A c q u i s i t i o n s E d i t o r : Mariann Barsolo D e v e l o p m e n t E d i t o r : Gary Schwartz Te c h n i c a l E d i t o r s : Keith Reicher and Tim Turner P r o d u c t i o n E d i t o r : Angela Smith C o p y E d i t o r : Kathy Carlyle P r o d u c t i o n M a n a g e r : Tim Tate V i c e P r e s i d e n t a n d E x e c u t i v e G r o u p P u b l i s h e r : Richard Swadley V i c e P r e s i d e n t a n d P u b l i s h e r : Neil Edde M e d i a A s s o c i a t e P r o j e c t M a n a g e r : Jenny Swisher M e d i a A s s o c i a t e P r o d u c e r : Angie Denny M e d i a Q u a l i t y A s s u r a n c e : Kit Malone B o o k D e s i g n e r : Caryl Gorska C o m p o s i t o r : Chris Gillespie, Happenstance Type-O-Rama P r o o f r e a d e r : Jen Larsen, Word One I n d e x e r : Ted Laux C o v e r D e s i g n e r : Ryan Sneed C o v e r I m a g e s : Dariush Derakhshani Copyright © 2009 by Wiley Publishing, Inc., Indianapolis, Indiana Published simultaneously in Canada ISBN: 978-0-470-37237-1 No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600 Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose No warranty may be created or extended by sales or promotional materials The advice and strategies contained herein may not be suitable for every situation This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services If professional assistance is required, the services of a competent professional person should be sought Neither the publisher nor the author shall be liable for damages arising herefrom The fact that an organization or website is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or website may provide or recommendations it may make Further, readers should be aware that Internet websites listed in this work may have changed or disappeared between when this work was written and when it is read For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S at (800) 762-2974, outside the U.S at (317) 572-3993 or fax (317) 572-4002 Wiley also publishes its books in a variety of electronic formats Some content that appears in print may not be available in electronic books Library of Congress Cataloging-in-Publication Data is available from the publisher TRADEMARKS: Wiley, the Wiley logo, and the Sybex logo are trademarks or registered trademarks of John Wiley & Sons, Inc and/or its affiliates, in the United States and other countries, and may not be used without written permission Autodesk and Maya are registered trademarks of Autodesk, Inc in the USA and/or other countries All other trademarks are the property of their respective owners Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book 10 72371ffirs.indd 11/14/08 1:25:00 PM To Max Henry Acknowledgments As this book goes into its sixth edition, I am thrilled that Introducing Maya 2009 is a favorite resource for students and teachers of Maya I have always thought that education is the foundation for a happy life and, with that in mind; I’d like to thank the outstanding teachers from whom I have had the privilege to learn You can remember what you’ve been taught or, more important, you can remember those who have taught you Of course I also want to thank my students, who have taught me as much as they have learned themselves Juan Gutierrez, Victor J Garza, Robert Jauregui, and Peter Gend deserve special thanks for helping me complete the models and images for this book. ■ Thanks to the student artists who contributed to the color insert and, of course, thanks to my bosses, colleagues, and friends at work for showing me everything I’ve learned and making it interesting to be in the effects business. ■ Special thanks to Dell for their support and keeping me in the cutting edge of workstations. ■ Thanks kindly to my editors at Sybex and the folks at Autodesk for their support and help and for making this process fun Thanks to the book team for bringing it all together: Mariann Barsolo, Gary Schwartz, Angela Smith, and Kathy Carlyle My appreciation also goes to technical editors Keith Reicher and Tim Turner Finally, special mad props go to my friends Bill, Mark, Frank, Terry, and Brett. ■ Thank you to my mom and brothers for your strength, wisdom, and love throughout. ■ And a special thank you to my lovely wife, Randi, and our son Max Henry, for putting up with the long nights at the keyboard; the grumpy, sleep-deprived mornings; and the blinking and buzzing of all my machines in our apartment Family is where it’s at, man! 72371ffirs.indd 11/14/08 1:25:01 PM About the Author Dariush Derakhshani is a Creative Director and Head of CG for Radium|ReelFX - Santa Monica, a creative and design studio with offices in Dallas, Texas; San Francisco; and Santa Monica, California Dariush has been working in CG for over twelve years and teaching classes in CG and effects production for close to ten He is the best-selling author of a handful of books, including the popular Introducing Maya series Dariush started using CAD software in his architecture days, then migrated to using 3D programs when his firm’s principal architects needed to show their clients design work on the computer Starting with Alias PowerAnimator version 6, which he encountered when he enrolled in the University of Southern California Film School’s Animation program, Dariush has been using Alias animation software for the past twelve years He received an M.F.A in Film, Video, and Computer Animation in 1997 from USC Dariush also holds a B.A in Architecture and Theatre from Lehigh University in Pennsylvania and worked at a New Jersey architecture firm before moving to L.A for film school He has worked on feature films, music videos, and countless commercials as a 3D animator, CG lead, and sometimes compositor He is bald and has flat feet 72371ffirs.indd 11/14/08 1:25:01 PM CO N T E N T S at a glance Introduction ■ xiii Chapter ■ Introduction to Computer Graphics and 3D Chapter ■ Jumping in Headfirst, with Both Feet 33 Chapter ■ The Maya 2009 Interface 71 Chapter ■ Beginning Polygonal Modeling 109 Chapter ■ Modeling with NURBS, Subdivisions, and Deformers 163 Chapter ■ Building the Red Wagon 219 Chapter ■ Maya Shading and Texturing 281 Chapter ■ Introduction to Animation 345 Chapter ■ More Animation! 387 Chapter 10 ■ Maya Lighting 437 Chapter 11 ■ Maya Rendering 475 Chapter 12 ■ Maya Dynamics and Effects 541 ■ 579 ■ 583 ■ 589 Appendix Glossary Index 72371ffirs.indd 11/14/08 1:25:01 PM 72371ffirs.indd 11/14/08 1:25:01 PM Contents Introduction 72371ftoc.indd Chapter 1 ■ Introduction to Computer Graphics and 3D xiii Art? Computer Graphics The Stages of Production The CG Production Workflow Core Concepts 13 Summary 31 Chapter 2 ■ Jumping in Headfirst, with Both Feet 33 You Put the U in UI 34 Project Overview: The Solar System 39 The Preproduction Process: Planning 39 Creating a Project 40 The Production Process: Creating and Animating the Objects 42 Maya Object Structure 57 The Solar System Resumed 61 Outputting Your Work 68 Summary 70 Chapter 3 ■ The Maya 2009 Interface 71 Navigating in Maya 72 Maya’s Layout 72 Panels and Frequently Used Windows 84 Customizing Maya 102 Summary 107 11/13/08 8:57:52 PM Chapter 4 ■ Beginning Polygonal Modeling 109 Planning Your Model 110 Polygon Basics 116 Poly Editing Tools 118 Putting the Tools to Use: Making a Simple Hand 122 Creating Areas of Detail on a Poly Mesh 128 Modeling Complex Objects: The Classic Steam Locomotive 137 Suggestions for Modeling Polygons 161 Summary 161 Chapter 5 ■ Modeling with NURBS, Subdivisions, and Deformers NURBS! 163 164 Using NURBS Surfacing to Create Polygons 175 Converting a NURBS Model to Polygons 176 Editing NURBS Surfaces 177 Patch Modeling: A Locomotive Detail 180 Using Artisan to Sculpt NURBS 191 Modeling with Simple Deformers 193 The Lattice Deformer 197 Animating Through a Lattice 201 Subdivision Surfaces 203 Creating a Starfish 204 Building a Teakettle 209 Summary 217 Chapter 6 ■ Building the Red Wagon 72371ftoc.indd 219 Beginning the Project 220 Using Reference Planes 220 Modeling the Side Panels 228 Modeling the Wagon Body 249 11/13/08 8:57:52 PM A B OV E : This pool table was modeled by Victor Garza to demonstrate modeling techniques in an introductory Maya class and to show the students how to be creative when combining surfaces to form a complex object Once Garza modeled the table, he and Dariush Derakhshani textured and lit the scene B E LO W : Dariush Derakhshani created this box full of marbles to test indirect lighting options with mental ray for Maya The scene is made of very simple geometry, with the majority of the work going into lighting and rendering using mental ray for Maya A B OV E : A color render and an ambient occlusion render of the living room scene The room was modeled by Huyen Dang of The Art Institute of California–Los Angeles for a lighting class, and it was lighted by Dariush Derakhshani using Global Illumination in mental ray The color render will be enhanced with the addition of an ambient occlusion pass to add detail and contact shadows B E LOW : The ambient occlusion render creates contact shadows and some further detail in the dark areas of the image to enhance the look of the color render itself This pass is multiplied in a compositing package to add realism A B OV E : A photo of the real wagon modeled in Chapter 6, lit in Chapter 10, and finally rendered with mental ray for Maya in Chapter 11 B E LO W : The model of the wagon from Chapter is lit and rendered with mental ray for Maya This image was composited with an ambient occlusion pass to generate the contact shadows and more details in the form of the object A B OV E : Alex Irish of Piedmont Community College created this architectural model with polygons, with additional detail added in the textures and rendering Irish applies painted texture maps to the apartment building model that was created and rendered using Physical Sun and Sky in mental ray B E LO W : Alex Irish also created these characters for an animation exercise for his classes In this scene, the environment and characters are stylized to focus on the animation of the scene A B OV E : Adam Anders of The Art Institute of California–Los Angeles created this image of the street racers as a side project outside of his schoolwork This sort of dedication is what makes a better artist B E LO W : Sepehr Dehpour from University of Southern California’s John C Hench Division of Animation and Digital Arts (DADA) used this model he built and imported into Maya as a texture exercise, creating the dirty microwave with maps he painted He lit and rendered the image with indirect lighting and ambient occlusion in mental ray as a single pass A B OV E : Arjun Rihan of USC’s DADA created these stills from his thesis project Using models he’s acquired and added to, he textured and lit the locomotive scene with Maya and rendered through Pixar’s RenderMan for Maya B E LO W : Rihan’s character animation began as captured motion capture data and was assembled/finessed in Autodesk Motion Builder to import into Maya The entire project was then composited with Adobe After Effects A B O V E : David Rodriguez created and animated this CG robot to wreak havoc in his back yard This short was made for his final project in 3D Visual Effects class at The Art Institute of California–Los Angeles B E LO W : Rodriguez animated, lit, and rendered the robot in Maya to match the lighting from his live action video shoot He directed the short to show how mischievous his robot could be, as he knocks over the garbage can and scares the person peering from the window A B OV E : Quinzhu Chen of The AI of Ca created this room with a terrific eye for detail The soft lighting and slight volumetric fog in the scene gives off a nice relaxing atmosphere for this study B E LO W : Jeremy Pozensky created an animation for his 3D Animation course at The Art Institute of California–Los Angeles for instructor David J Sung, who designed the character’s animation rig expressly for his class The animation has the character climbing up the cliff to fetch a bird’s egg, only to fall at the very end, much like an old school cartoon A B OV E : Jay Hwang created this model for a modeling course at The Art Institute of California–Los Angeles Beginning with a concept drawing, Jay studied the form of his character and modeled it to a fine detail It sports a killer tail! This image was rendered with a soft Final Gather lighting B E LO W : A close-up of Hwang’s character shows how much detail Jay decided to model into the geometry, laying the groundwork for an even more detailed creature once textures and maps are added A B OV E : Brian Lee of USC’s DADA created these images from a short animation piece The background was blurred in composite, and the rain was added as Maya particles His hope was to create a night look using elements shot in the day and then altering their look in composite where he combined live action with CG elements B E LO W : This moody warehouse render was also created by Brian Lee The use of chains hanging from the ceiling makes this a creepy place, heightened by his use of volumetric lighting through the huge warehouse windows Rendering in passes helped Lee with his final look because he had the utmost in control in composite A B OV E : Ruben Morales created these environments for his 3D Environments class at The Art Institute of California–Los Angeles This machine room was modeled and textured to be an environment for a game animation B E LO W : This courtyard was created by Morales to match a food court across the street from school for his 3D Environments class The advantage to using an existing location to match is that the student can closely study the location when they try to re-create it in CG A B OV E : Michael Gaglione created this skyscraper model for his Piedmont Community College (PCC) courses A render of the skyscraper shows off the material choices Gaglione made for this architectural model B E LO W : This cocktail lounge was first modeled in Autodesk 3ds Max 2008 and then transferred to Maya for finishing The lighting shows off a moody environment created by PCC students Travis Harville and Rob Regan A B OV E : Robert Kim’s assignment in his Advanced Texture and Lighting course taught by Rosa Farre at The Art Institute of California–Los Angeles was to match a live action photo with CG To the left we see the original photo, and the right is rendered CG B E LO W : Quinzhu Chen of The Art Institute of California–Los Angeles created a cute glow worm scene to composite into a live action photo In the animation, the worm interacts with the background objects, which were re-created in CG to give them motion A B OV E : Trevion Overton The Art Institute of California–Los Angeles created this dramatic angle of his car render through mental ray using Final Gather B E LO W : Overton’s car was modeled, textured and lit in Maya The depth of field effect, where the background gets blurry, was created with a Z-Depth render pass and a blur filter in After Effects effects software is a top choice for film and video artists, game developers, and 3D design professionals Now you can learn to build, animate, texture, and light your own digital models and scenes, and start developing professional-level Maya animation skills with Introducing Maya 2009 A perennial favorite and bestseller, this latest edition is the ideal initiation to 3D and Maya Starting with the basics, it builds from the ground up, combining straightforward text with practical examples that make it easy to learn Maya’s core tools while introducing the latest Maya Create a simple animation of the planets in the solar system Experiment with modeling a starfish, a red wagon, and a locomotive Explore the basics of organic surfaces, polygons, and subdivision surfaces Discover the nuances of shading and texturing Rig a locomotive model for automated animation Light your red wagon with HDR images and render with mental ray® and Final Gather while you learn by doing using a wealth of hands-on files in the full-color insert to inspire you Use Maya’s Render Layers and an Ambient Occlusion pass for greater reality Experiment with IBL (image-based lighting) and HDR images with mental ray Learn how to create particles such as smoke, and adjust them to the size and shape you want provided on the CD You’ll also find compelling examples Dariush Derakhshani is an award-winning 3D animator, author, and educator He has worked on movies such as The Fantastic Four and Pan’s Labyrinth, the South Park TV series, and numerous commercials and music videos He teaches Maya and 3D animation and is the author of all the Introducing Maya books and coauthor of Mastering Maya 8.5 and Introducing 3ds Max 2008, all from Sybex US $39.99 / CAN $43.99 ISBN: 978-0-470-37237-1 ® 2009 features Follow clear-cut, step-by-step lessons Learn to navigate the Maya 2009 interface Introducing Maya 2009 The Academy Award®–winning Maya® 3D animation and The enclosed CD features images, movies, and scene files that let you view material from the book The support files will enable you to complete all of the tutorials Derakhshani ENTER A NEW DIMENSION WITH MAYA 2009 INTRODUCING MAYA 2009 ® Dariush Derakhshani www.sybex.com www.autodesk.com/maya COMPUTERS/Computer Graphics/Design ... you finish Introducing Maya 2009, you’ll have some solid skills for using Maya When you’re ready to move on to another level, be sure to check out other Maya titles from Sybex at www .sybex. com... Animating the Objects 42 Maya Object Structure 57 The Solar System Resumed 61 Outputting Your Work 68 Summary 70 Chapter 3 ■ The Maya 2009 Interface 71 Navigating in Maya 72 Maya s Layout 72 Panels... introduces you to Maya and shows how you can work with Maya to create your art, whether it is animated or static in design This book is part of the Maya Press series, a collaboration between Sybex and