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 [...]... 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... 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 at... the character’s left side Rename the other instance rightPanelCurves_Instance, and move it to the character’s right side 4 Adjust the relative positions of the instanced curves so that they do not overlap but remain close to the model If you want to adjust the shape of a panel, tweak the CVs of the original panel curves, which are still orthographic When finished, your scene should look similar to the. .. 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 251 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 was originally... attachLocators.mel places locators on the top row of the cloth mesh and on the attach curve Constraining the Skirt to the Guide Locators The locators on the attach curve are uniformly spaced around the skirtAttachCurve, and there are an equivalent number of locators on the cloth mesh and on the curve Now it is time to connect the locators such that the transition onto the attach curve will be smooth Before you... will move from their position on the cloth mesh smoothly to the attach curve When the simulation runs, the top row of cloth vertices will follow these locators to their designated spot on the attach curve Making the Model a Collision Object In order for the skirt to drape around the model, you must tell the solver that the garment should collide against this object To do so, follow these steps: 1 Select... XFORM_attachSkirtCurve* 4 Select the top row of the skirt’s vertices, Shift+select the character mesh, Inuyasha_skin, and choose Constraints → Mesh This constraint maintains the offset between a cloth vertex and the model’s surface as it animates The result will look as if the top of the skirt is attached to the model The character is now ready for animation Animating the Skirt After you develop the skirt, you can... locators were not animated to the character’s motion By using a mesh constraint, you can assign the top of the skirt to follow the waist of the model But, first, let’s do some cleanup 1 In the Outliner, expand the hierarchy of skirt_cloth Delete all the transform constraints that were created by the attachLocator.mel script 2 Delete all the locators named attachSkirtLoc_* 3 Delete all the locators named XFORM_attachSkirtCurve*... longer has the boxlike shape of the panel curves but looks like the skirt at the frame where you performed the Save As Initial State Any new simulation will begin using this shape as a starting point for the first frame’s solve If the cache is deleted or the timeline is set at or before the solver start frame, the garment defaults to the initial state One consequence of this action is that the cache... always more to learn, and the joy of learning is half the fun of working in this profession We have all been inspired and amazed by one another’s work and have been witness to one of the greatest aspects of working in the graphics community: the openness, generosity, and willingness to share As you sample the chapters in this book, recall that someone is delivering years of hard-won experience with . 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. 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. xvii 4345_FM_p3.1.qxd 1/1/05 11:14 AM Page xvii After the wild success of Maya: Secrets of the Pros, we began thinking about the future of the Secrets books. Although it was originally conceived as a single,