Maya ® : Secrets of the Pros ™ Second Edition John Kundert-Gibbs Dariush Derakhshani et. al. San Francisco • London 4345_FM_p3.1.qxd 1/1/05 11:13 AM Page iii Maya: Secrets of the Pros Second Edition 4345_FM_p3.1.qxd 1/1/05 11:13 AM Page i 4345_FM_p3.1.qxd 1/1/05 11:13 AM Page ii Maya ® : Secrets of the Pros ™ Second Edition John Kundert-Gibbs Dariush Derakhshani et. al. San Francisco • London 4345_FM_p3.1.qxd 1/1/05 11:13 AM Page iii Publisher: Dan Brodnitz Acquisitions and Developmental Editor: Mariann Barsolo Production Editor: Elizabeth Campbell Technical Editor: Keith Reicher Copyeditor: Pat Coleman Compositor: Side by Side Studios CD Coordinator: Dan Mummert CD Technician: Kevin Ly Proofreaders: Nancy Riddiough, Jim Brook, Candace English, Katherine Perry Indexer: Nancy Guenther Book and Cover Designer: Mark Ong, Side by Side Studios Copyright © 2005 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501. World rights reserved. The author(s) created reusable code in this publication expressly for reuse by readers. Sybex grants readers limited permission to reuse the code found in this publication or its accompanying CD-ROM so long as the author(s) are attributed in any application containing the reusable code and the code itself is never distributed, posted online by elec- tronic transmission, sold, or commercially exploited as a stand- alone product. Aside from this specific exception concerning reusable code, no part of this publication may be stored in a retrieval system, transmitted, or reproduced in any way, including but not limited to photocopy, photograph, magnetic, or other record, without the prior agreement and written permission of the publisher. Library of Congress Card Number: 2004117988 ISBN: 0-7821-4345-8 SYBEX and the SYBEX logo are either registered trademarks or trademarks of SYBEX Inc. in the United States and/or other countries. Secrets of the Pros is a trademark of SYBEX Inc. Screen reproductions produced with FullShot 99. FullShot 99 © 1991-1999 Inbit Incorporated. All rights reserved. FullShot is a trademark of Inbit Incorporated. The CD interface was created using Macromedia Director, © 1994, 1997-1999 Macromedia Inc. For more information on Macrome- dia and Macromedia Director, visit http://www.macromedia.com. TRADEMARKS: SYBEX has attempted throughout this book to distinguish proprietary trademarks from descriptive terms by fol- lowing the capitalization style used by the manufacturer. The author and publisher have made their best efforts to prepare this book, and the content is based upon final release software whenever possible. Portions of the manuscript may be based upon pre-release versions supplied by software manufacturer(s). The author and the publisher make no representation or warranties of any kind with regard to the completeness or accuracy of the con- tents herein and accept no liability of any kind including but not limited to performance, merchantability, fitness for any particular purpose, or any losses or damages of any kind caused or alleged to be caused directly or indirectly from this book. Manufactured in the United States of America 10 9 8 7 6 5 4 3 2 1 Software License Agreement: Terms and Conditions The media and/or any online materials accompanying this book that are available now or in the future contain programs and/or text files (the “Software”) to be used in connec- tion with the book. SYBEX hereby grants to you a license to use the Software, subject to the terms that follow. Your purchase, acceptance, or use of the Software will constitute your acceptance of such terms. The Software compilation is the property of SYBEX unless otherwise indicated and is protected by copyright to SYBEX or other copyright owner(s) as indicated in the media files (the “Owner(s)”). You are hereby granted a single-user license to use the Software for your personal, noncommercial use only. You may not reproduce, sell, dis- tribute, publish, circulate, or commercially exploit the Software, or any portion thereof, without the written consent of SYBEX and the specific copyright owner(s) of any com- ponent software included on this media. In the event that the Software or components include specific license requirements or end-user agreements, statements of condition, disclaimers, limitations or warranties (“End-User License”), those End-User Licenses supersede the terms and conditions here- in as to that particular Software component. Your purchase, acceptance, or use of the Software will constitute your acceptance of such End-User Licenses. By purchase, use or acceptance of the Software you further agree to comply with all export laws and regulations of the United States as such laws and regulations may exist from time to time. Reusable Code in This Book The author(s) created reusable code in this publication expressly for reuse by readers. Sybex grants readers limited permission to reuse the code found in this publication, its accompanying CD-ROM or available for download from our website so long as the author(s) are attributed in any application containing the reusable code and the code itself is never distributed, posted online by electronic transmission, sold, or commercially exploited as a stand-alone product. Software Support Components of the supplemental Software and any offers associated with them may be supported by the specific Owner(s) of that material, but they are not supported by SYBEX. Information regarding any available support may be obtained from the Owner(s) using the information provided in the appropriate read.me files or listed else- where on the media. Should the manufacturer(s) or other Owner(s) cease to offer support or decline to honor any offer, SYBEX bears no responsibility. This notice concerning support for the Software is provided for your information only. SYBEX is not the agent or principal of the Owner(s), and SYBEX is in no way responsible for providing any support for the Software, nor is it liable or responsible for any support provided, or not provided, by the Owner(s). Warranty SYBEX warrants the enclosed media to be free of physical defects for a period of ninety (90) days after purchase. The Software is not available from SYBEX in any other form or media than that enclosed herein or posted to www.sybex.com. If you discover a defect in the media during this warranty period, you may obtain a replacement of identi- cal format at no charge by sending the defective media, postage prepaid, with proof of purchase to: SYBEX Inc. Product Support Department 1151 Marina Village Parkway Alameda, CA 94501 Web: http://www.sybex.com After the 90-day period, you can obtain replacement media of identical format by sending us the defective disk, proof of purchase, and a check or money order for $10, payable to SYBEX. Disclaimer SYBEX makes no warranty or representation, either expressed or implied, with respect to the Software or its contents, quality, performance, merchantability, or fitness for a particular purpose. In no event will SYBEX, its distributors, or dealers be liable to you or any other party for direct, indirect, special, incidental, consequential, or other damag- es arising out of the use of or inability to use the Software or its contents even if advised of the possibility of such damage. In the event that the Software includes an online update feature, SYBEX further disclaims any obligation to provide this feature for any specific duration other than the initial posting. The exclusion of implied warranties is not permitted by some states. Therefore, the above exclusion may not apply to you. This warranty provides you with specific legal rights; there may be other rights that you may have that vary from state to state. The pricing of the book with the Software by SYBEX reflects the allocation of risk and limi- tations on liability contained in this agreement of Terms and Conditions. Shareware Distribution This Software may contain various programs that are distributed as shareware. Copy- right laws apply to both shareware and ordinary commercial software, and the copyright Owner(s) retains all rights. If you try a shareware program and continue using it, you are expected to register it. Individual programs differ on details of trial periods, registration, and payment. Please observe the requirements stated in appropriate files. Copy Protection The Software in whole or in part may or may not be copy-protected or encrypted. How- ever, in all cases, reselling or redistributing these files without authorization is expressly forbidden except as specifically provided for by the Owner(s) therein. 4345_FM_p3.1.qxd 1/1/05 11:13 AM Page iv To all our family, friends, and colleagues And to Kristin, Joshua, and Kenlee —John Kundert-Gibbs And to Tirdad, an inspiration for me —Dariush Derakhshani 4345_FM_p3.1.qxd 1/1/05 11:13 AM Page v A work of this scope, involving so many, means that there are a great number of people to thank for their contributions and support. First, we would like to thank the wonderful crew at Sybex for their untiring efforts to get this book looking so great and out the door on time. We especially thank the book team: Mariann Barsolo, Elizabeth Campbell, Pat Coleman, Keith Reicher, Keith McNeil, Dan Mummert, and Kevin Ly. Thanks also to Mark Ong and Susan Riley at Side by Side Studios. At Alias, a special thanks to Danielle Lamothe, who always helps us find an answer, and to Duncan Brinsmead for taking the time to give us a hand and a thought. Our employers, who have generously allowed us the time and freedom to write, also deserve thanks. At Clemson University, special thanks to James Barker, Doris Helms, Bonnie Holaday, Robert Geist, and Mike Westall. At Sight Effects thanks to Alan, Melissa, and Rudy as well as the crew, and to Gary J for all his support. Finally, our family and friends deserve a great deal of credit for their untiring loyalty and support not only for this book, but of our chosen careers, which often involve late nights and weekends. We especially thank Kristin, Joshua, Kenlee, and Randi. Without the support of our family, friends, and colleagues, this book could never have been. Acknowledgments 4345_FM_p3.1.qxd 1/1/05 11:13 AM Page vi Dear Reader, Thank you for choosing the second edition of Maya Secrets of the Pros. This book is part of a new wave of Sybex graphics books, all written by outstanding authors—artists and teach- ers who really know their stuff and have a clear vision of the audience they’re writing for. It’s also part of our growing library of truly unique 3D graphics books. Founded in 1976, Sybex is the oldest independent computer book publisher. More than twenty-five years later, we’re committed to producing a full line of consistently excep- tional graphics books. With each title, we’re working hard to set a new standard for the industry. From the paper we print on, to the writers and photographers we work with, our goal is to bring you the best graphics books possible. I hope you see all that is reflected in these pages. I’d be very interested to hear your comments and get your feedback on how we’re doing. To let us know what you think about this, or any other Sybex book, please visit us at www.sybex.com. Once there, go to the prod- uct page, click on Submit a Review, and fill out the questionnaire. Your input is greatly appreciated. Please also visit www.sybex.com to learn more about the rest of our graphics line. Best regards, Dan Brodnitz Publisher Letter from the Publisher 4345_FM_p3.1.qxd 1/1/05 11:13 AM Page vii Maya Secrets of the Pros, Second Edition is the work of co-lead authors John Kundert-Gibbs and Dariush Derakhshani, along with a cadre of Maya professionals. John Kundert-Gibbs John Kundert-Gibbs is director of the Digital Production Arts program at Clemson Univer- sity, which prepares the technical directors of the future. Author of a number of publications on Maya, computer graphics, and dramatic literature, he directs students in producing ani- mated shorts, creates effects for live-action projects, and designs electronic media for theatri- cal productions. He is co-author of Maya 5 Savvy and Maya: Secrets of the Pros. He has a Bachelor of Arts degree in physics from Princeton University and a Ph.D. in dramatic litera- ture from The Ohio State University. Dariush Derakhshani Dariush Derakhshani is currently a digital effects supervisor and part-time teacher. He has worked in Los Angeles at Sight Effects, a prominent commercial effects house, as well as a CGI animator on a variety of projects in film and television. His writing credits include Maya: Secrets of the Pros, Maya 5 Savvy, and the best sell- ing Introducing Maya 6: 3D for Beginners as well as several print and online magazines. He has won the Bronze Plaque from the Columbus Film Festival and has shared hon- ors from the AICP and London International Advertising Awards. He has worked as a CGI animator and compositor on a variety of projects from films to television and was a Super- vising Technical Director for the South Park television series. Dariush spends his time con- sulting and teaching at a variety of schools and writing as frequently as he can. His works have appeared in CGW and Post magazines and on various sites of the digitalmedianet.com. Dariush holds a Bachelor of Arts in architecture and in theater from Lehigh University and a Master of Fine Arts in animation from USC Film School. He is bald and lists to one side. Tom Capizzi Tom Capizzi is currently the lighting director on a computer-generated feature film called The Barnyard at Omation Studios. Tom has more than 15 years’ experience creating digital content and has worked on more than 20 feature films. Some of the most recent films are Garfield, Scooby Doo 1 & 2, Daredevil, Elf, and X-Men 2. He has also taught digital model- ing at Art Center in Pasadena, CA; Center of Creative Studies in Detroit; Gnomon School of Visual Effects in Hollywood; and several other colleges. Tom is a published author and con- stantly stays up-to-date with cutting-edge digital production techniques. About the Authors 4345_FM_p3.1.qxd 1/1/05 11:13 AM Page viii Jake Carvey Jake Carvey has been producing and directing computer animation for broadcast, film, and games since 1994. 3D animation was a logical culmination of his passionate interest in diverse disciplines, from stage lighting to dramatic writing. He is obsessed with the develop- ment, practice, and teaching of techniques and strategies for consistently delivering high pro- duction values within small studio environments. As president of Spin Cycle Animation & FX, he led the animation team responsible for creating and producing well over 100 unique animated promos for Kids’ WB!, harvesting truckloads of industry awards along the way. Since 2000, Jake has been working as a freelance director and animator, continuing to deliver projects for Disney, NBC, ABC, PBS, Sony, Target, Wal-Mart, Circuit City, and many others. He works from a two-story loft in downtown Los Angeles, where his average com- mute is running down a single flight of stairs. Krishnamurti M. Costa Krishnamurti M. Costa, aka Antropus, is a 32-year-old, Brazilian, self-taught CG artist. Kris is a character animator on The Barnyard, a CG feature written and directed by Steve Oede- kerk and distributed by Nickelodeon Movies/Paramount Pictures. He started working in computer graphics about 12 years ago. He won the Anima Mundi Festival (the biggest ani- mation festival in Latin America) as an animator and art director. He is also working on a short-movie called SenzaAzione, still in progress, as a personal project. In 2004, he won the 3D main prize on CGTalk / CGNetwork’s “MachineFlesh Challenge,” competing with more than 1400 others in the 3D category. He is also known for his tutorial series published on his web site and other online CG resources. Please visit www.antropus.com for more informa- tion on Kris. Timothy A. Davis Timothy A. Davis is currently an Assistant Professor in the Computer Science Department at Clemson University and has played an active role in developing the interdisciplinary master’s program in Digital Arts Production, which trains students to produce special effects for entertainment and commercial projects. His teaching and research interests include par- allel/distributed rendering, ray tracing, spatio-temporal coherence, and nonphotorealistic rendering. He received his Ph.D. from North Carolina State University in 1998 and has worked in technical positions for the Environmental Protection Agency and NASA Goddard Space Flight Center. Petre Gheorghian Petre Gheorghian is a Senior Product Specialist at Alias, providing training and consulting to Maya users globally. His areas of focus include modeling, rendering, and character anima- tion. He is a Certified Maya Instructor and holds graduate degrees in both Fine Art and Engineering. Petre’s versatility, both as a technician and an artist, has allowed him to master the complexity in many aspects of Maya. Petre is also the author of the Alias learning tools Maya Techniques | Modeling a Human Head and Maya Techniques | Exploring Maya 5 Fea- tures and co-author of several other learning tools. He was an Alias MasterClass presenter at Siggraph 2003 and Siggraph 2004. 4345_FM_p3.1.qxd 1/1/05 11:13 AM Page ix [...]... Structure of Things 12 5 Pipeline Flow Control 12 6 The Import Pipeline 12 7 The Reference Pipeline 12 7 The Assembly Pipeline 12 7 The Importance of Naming 12 8 Using Spaces and Underscores in Object Names 13 1 The Golden Rules of a Successful Pipeline 13 3 Consistency 13 3 Ease of Use 13 5 Flexibility 13 6 Cleanliness 13 6 The Rigging Curtain 13 7 Defining a Character for the Pipeline 13 7 Creating a Ref Window 14 1 Expressions... Approach the Droid 96 Compositing the Passes 10 1 Illuminating Global Illumination 10 2 What Global Illumination Means 10 3 Practicing Practical Global Illumination 10 4 An IBL Real-World Application: Katana 10 8 Real-World Application: Research Lab 11 4 HDR versus LDR 11 4 Lighting CGI Props 11 5 Additional Things to Try 12 1 Essential Techniques 12 2 Always Learning 12 3 ■ Chapter 5 The Character Pipeline 12 5 The. .. Nodes in Rigs 14 4 Simple Tools You Should Be Using 14 8 Always Learning 14 9 Chapter 6 Hair Systems 15 1 Hair at a Quick Glance 15 2 Curve Types 15 2 Using Hair Curves as Deformers 15 5 The Breaking Rope Effect 15 8 Driving a Character’s Secondary Motion Setting Up the Rig 16 2 An Old Man on His Horse 16 6 Animating a Shark 16 6 16 2 Contents xv xvi ■ Contents A Dancing MP3 Player 17 1 Create the Cord 17 2 Dynamic... one-quarter the length of the skirtAttachCurve 2 Adjust the length, and tweak the shape of the curves to look similar to Figure 1. 4 The panel has a bit of a bell shape This will be significant later when you enable cloth simulation: gravity will pull the fabric down, giving a nice folding pattern along the bottom of the skirt Figure 1. 3: The skirt attach curve is offset away from the waist The ArcLength... the icon shown in Figure 1. 7 Second, it creates a polygon plane that matches the contour of the curves 2 Rename the garment to skirt_cloth Figure 1. 7: The Cloth Panel Icon Under Inputs for skirt_cloth in the Channel box (see Figure 1. 8), you will see several cloth-related items: cpSolver1, cpStitcher1, and cpCache1 These nodes give you control over various characteristics of the simulation and of the. .. Figure 1. 10) 6 Continue around the model, creating seams between all the panels (see Figure 1. 11) Be sure to close the mesh by creating a seam between leftPanelCurves_Instance and frontPanelCurves_Instance Figure 1. 8: The cloth garment inputs with the stitcher resolution increased Figure 1. 9: The same cloth mesh at resolution 25 on the left, 65 on the right ■ Figure 1. 10: The cloth seam used to join the. .. Making a Skirt 7 Figure 1. 11: The cloth garment extending across all panels and joined by seams Preparing the Garment for Simulation When you run the simulation on the garment, the solver calculates the position of each vertex for each frame based on the forces applied to it Although the skirt will settle in the general vicinity of the model’s waist, the goal is for the top of the skirt to wrap around... Collisions 17 6 Always Learning 17 7 Chapter 7 17 4 A Dynamics Collection: Flexible Objects 17 9 The Antenna: A Three-Pronged Approach 18 0 Using Soft Bodies 18 0 Dynamic Curves and the Antenna 18 3 Using Expressions for Simple Antenna Animation 18 7 Car Suspension Using Hair Dynamics 19 0 Raining Cats and Dogs 19 4 Using Springs to Create Ripples 19 6 Making Rain 19 8 Adding Splashes 200 The Ring 2 01 Setting Up the. .. those who do professional 3D work on a day-to-day basis and that we should feed this appetite! Many second edition books are simple rewrites of the previous title; not so with Maya: Secrets of the Pros, Second Edition Here we have nine all new chapters containing a whole new set of professional secrets arising from years of experience getting production quality results from Maya Thus, Secrets II makes... 232 Edge Loops 233 Modeling the Face 235 Laying Out the Image Planes in 3D 235 Creating a Wire Cage 236 Creating a Polygonal Cage 239 Details of the Head 2 51 Creating Subdivision Surfaces 258 Editing the Subdivision Model 260 Always Learning 266 Index 268 Contents xvii Introduction After the wild success of Maya: Secrets of the Pros, we began thinking about the future of the Secrets books Although it . iii Maya: Secrets of the Pros Second Edition 4345_FM_p3 .1. qxd 1/ 1/05 11 :13 AM Page i 4345_FM_p3 .1. qxd 1/ 1/05 11 :13 AM Page ii Maya ® : Secrets of the Pros ™ Second Edition John Kundert-Gibbs Dariush. Maya ® : Secrets of the Pros ™ Second Edition John Kundert-Gibbs Dariush Derakhshani et. al. San Francisco • London 4345_FM_p3 .1. qxd 1/ 1/05 11 :13 AM Page iii Maya: Secrets of the Pros Second. the rest of our graphics line. Best regards, Dan Brodnitz Publisher Letter from the Publisher 4345_FM_p3 .1. qxd 1/ 1/05 11 :13 AM Page vii Maya Secrets of the Pros, Second Edition is the work of