Advanced Texturing and Lighting Second Edition... Dear Reader,Thank you for choosing Advanced Maya Texturing and Lighting, Second Edition.. 234 Chapter Tutorial: Creating Eye Glow with
Trang 2Wiley Publishing, inc.
Advanced
Texturing and Lighting
Second Edition
L e e L a n i e r
Trang 3Advanced
Texturing and Lighting
Second Edition
Trang 5Wiley Publishing, inc.
Advanced
Texturing and Lighting
Second Edition
L e e L a n i e r
Trang 6Acquisitions Editor: Mariann Barsolo
Development Editor: Susan Herman
Technical Editors: Keith Reicher, Eric Keller
Production Editor: Laurel Ibey
Copy Editor: Liz Welch
Production Manager: Tim Tate
Vice President and Executive Group Publisher: Richard Swadley
Vice President and Executive Publisher: Joseph B Wikert
Vice President and Publisher: Neil Edde
Project Manager: Laura Moss-Hollister
Assistant Producer: Kit Malone
Book Designer: Franz Baumhackl, Lori Barra
Compositor: Kate Kaminski, Happenstance Type-O-Rama
Proofreader: Ian Golder, Word One
Indexer: Nancy Guenther
Cover Designer: Ryan Sneed
Cover Image: Lee Lanier
Copyright © 2008 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-0-470-29273-0
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
complete-ness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitcomplete-ness 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
situa-tion This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services If
profes-sional assistance is required, the services of a competent profesprofes-sional 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
informa-tion does not mean that the author or the publisher endorses the informainforma-tion the organizainforma-tion or Website may provide or recommendainforma-tions 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
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 Maya is a registered trademark of Autodesk, Inc All other
trade-marks are the property of their respective owners Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.
10 9 8 7 6 5 4 3 2 1
Trang 7Dear Reader,
Thank you for choosing Advanced Maya Texturing and Lighting, Second Edition This book is part
of a family of premium quality Sybex books, all written by outstanding authors who combine practical
experience with a gift for teaching
Sybex was founded in 1976 More than thirty years later, we’re still committed to producing consistently exceptional books With each of our graphics titles we’re working hard to set a new stan-
dard for the industry From the writers and artists we work with to the paper we print on, our goal is
to bring you the best graphics books available
I hope you see all that reflected in these pages I’d be very interested to hear your comments and get your feedback on how we’re doing Feel free to let me know what you think about this or any other
Sybex book by sending me an email at nedde@wiley.com, or if you think you’ve found an error in this book,
please visit http://wiley.custhelp.com Customer feedback is critical to our efforts at Sybex
Best regards,
Neil EddeVice President and PublisherSybex, an Imprint of Wiley
Trang 8To all the dreamers and artists out there
Trang 9My thanks to the excellent editorial, production, and compositing staff at Sybex and Wiley & Sons, including Acquisitions Editor Mariann Barsolo, Development Editor Susan Herman, Production Editor Laurel Ibey, Technical Editors Keith Reicher and Eric Keller, Copy Editor Liz Welch, and Proofreader Ian Golder
Special thanks to the faculty, staff, and students at the Art Institute of Las Vegas and Westwood College Online for inspiring me to perfect my craft Special thanks also
to my family and friends who supported my wild ambitions And the biggest thanks to
my beautiful wife, Anita, who encouraged me all the way, despite all those late, late 3D nights
Several of the photos in this book were provided by the photographers of Stock XCHNG (www.sxc.hu) This is a wonderful site that provides royalty-free, restriction-free material simply out of love of the medium Additional models were purchased from Turbo Squid (www.turbosquid.com), another excellent service
Trang 10About the Author
played in more than 200 film festivals, museums, and galleries worldwide Before directing the shorts “Millennium Bug,” “Mirror,” “Day Off the Dead,” “Weapons of Mass Destruction,” and “13 Ways to Die at Home,” Lee served as a senior animator in
the Lighting and Modeling Departments of Pacific Data Images on Shrek and Antz He
got his start in 3D at Buena Vista Visual Effects at Walt Disney Studios, where he
cre-ated digital special effects for such films as Mortal Kombat Lee currently lives in Boulder
City, Nevada, where he serves as manager of BeezleBug Bit, LLC (www.BeezleBugBit.com) and director of the Dam Short Film Festival (www.DamShortFilm.org)
Trang 11Understanding the Art of Lighting 2
Understanding Color and Composition 22
Step-by-Step: 3D Lighting Examples 32
Maya Light Types 38
Linking and Unlinking Lights 53Using Light Fog and Light Glow 54
A Note on Environment and Volume Fog 57
Chapter Tutorial: Lighting an Interior .62
Rendering Depth Maps 70
Raytracing Shadows 87Linking and Unlinking Shadows 88Creating Effects Shadows 88
Trang 12Shadowing with Maya Fur 92
Chapter Tutorial: Lighting a Flickering Fire Pit with Shadows 99
Reviewing Shading Models and Materials .104
Reviewing 2D Textures 117
Mastering Extra Map Options 122
Stacking Materials and Textures 126Mastering the Blinn Material 129
Applying Environment Textures 1552D Texture Projection Options 158
Chapter Tutorial: Creating Skin with Procedural Textures 165
Mastering the Hypershade Window 170
Trang 13Chapter Tutorial: Creating a Custom Paint Material .196
Employing Samplers 202
Tying into Nonmaterial Nodes 218
Connecting Multiple Materials in One Network 224Using the Studio Clear Coat Utility 225Chapter Tutorial: Building a Custom Cartoon Shading Network 227
Math Utilities 234
Chapter Tutorial: Creating Eye Glow with Advanced Math Utilities 260
Light Linker
Default Render Utility List Default Light Set
Render Partition
Trang 14Chapter 9 Improving Textures through Custom UVs, Maps, and Sliders 265
Preparing UV Texture Space 266
Using the 3D Paint Tool 284
PSD Support 287Bump and Displacement Mapping .289
Custom Sliders .295Chapter Tutorial: Preparing the UVs of a Polygon Model 296
Determining Critical Project Settings 302
Mastering the Render Settings Window 311
Rendering with the Command Line 318Organizing the Render 319
Selecting Image Formats and Render Resolutions 321
Creating Depth of Field 325Applying Motion Blur 328Industry Examples: Splitting Up a Render .331
Maya Software vs mental ray 338Raytracing with Maya Software 338
Trang 15Setting Up a Raytrace 342
Raytracing with mental ray 349
Reproducing Water 359
Reproducing Glass .366
Chapter Tutorial: Texturing and Rendering an Ice Cube .371
Chapter 12 Working with Global Illumination, Final Gather, and mental ray Shaders 375
Understanding Indirect Illumination 376
Applying Caustics 385Applying mental ray Shaders 389
Using Final Gather 400
Fine-Tuning mental ray Renders 405
Chapter Tutorial: Creating Caustics with Final Gather .411
Adding Realism with HDRI 416
An Introduction to RenderMan For Maya 431
Trang 16Creating Textures with the Transfer Maps Tool 433
Managing Renders with the Render Layer Editor 438
Step-by-Step: Creating the Cover Illustration 445
What You’ll Find on the CD 454
System Requirements .454Using the CD 455Troubleshooting .455
Trang 18I should stress that I am self-taught In 1994, I sat down at a spare seat of Alias PowerAnimator 5.1 and started hacking away After several years and various trials by fire, 3d became a livelihood, a love, and an obsession Along the way, I was fortunate enough to work with many talented artists at Buena Vista Visual Effects and Pacific data Images In 2000, I switched from PowerAnimator to Maya and have since logged tens of thousands of hours with the subject of this book.
due to the unusual combination of an informal and professional background, I
do not profess to know everything there is to know about Maya In fact, you may find
a better, quicker, more efficient way to achieve some of the texturing and lighting niques described in this book that’s the beauty of Maya there are probably a dozen ways to tackle every problem or challenge If anything, I hope this book provides you with the theory, the background, and the basic approach you need to come up with
tech-your own creative solutions.
Second Edition
the first edition of Advanced Maya Texturing and Lighting was written with Maya 7.0
and published in 2006 this edition represents a major revision, with every chapter updated for the most recent Maya release and the latest trends and techniques in the animation industry In addition, material covering fundamental theory that underpins computer animation and the natural world it tries to re-create has been expanded
Who Should Read This Book
Advanced Maya Texturing and Lighting, Second Edition, is designed for anyone with
a working knowledge of Maya Specifically, this book was written with the following people in mind:
Trang 19also assumes that you have a basic knowledge of such image manipulation programs
as Adobe Photoshop and compositing programs as After Effects
How to Use This Book
Advanced Maya Texturing and Lighting, Second Edition, is divided into 14 chapters
Thirteen of these chapters are in the book one of the chapters is provided as a bonus
PdF file on the companion cd
chapter 1 discusses lighting history, technique, and application, as well as basic color and composition theory naturalistic, stylistic, 1-point, 2-point, and 3-point
lighting are covered in detail If you are new to lighting, this is the best place to start
chapters 2 and 3 detail Maya lights and shadows and how to properly apply them Specialized effects, such as Environment Fog, Light Fog, the Toon renderer,
Maya Fur, Maya Hair, and ncloth, are also covered
chapters 4 through 8 delve deeply into Maya materials and utilities Most Maya books barely scratch the surface in this area If you’ve ever wondered what each
Maya node actually does, check out these chapters custom networks are also
dis-cussed at length numerous examples are provided with clearly labeled illustrations,
and you’ll find that the examples are easy to follow (as much as such a complex subject
allows)
chapter 9 takes a detour and discusses uV texture space uV preparation is
a critical component of texturing, but it is often ignored by texturing and lighting
cover illustration is also provided
If you’re fairly new to Maya or 3d in general, I suggest starting with chapter 1, then working your way through the book If you’re experienced with Maya, I recom-
mend hitting the chapters that contain information that’s poorly documented by other
sources In this case, chapters 6, 7, and 8 should prove the most interesting If you’d
like to take your Maya knowledge even further, an Additional_Techniques.pdf file is
included on the companion cd The file includes extra sections that cover shading
net-works, nurBS preparation, and advanced rendering techniques
Each chapter of Advanced Maya Texturing and Lighting, Second Edition,
contains either a tutorial or examples of industry work The tutorials are in-depth
methods of practicing advanced techniques Each tutorial is accompanied by ample
illustrations and completed Maya scene files The industry examples, on the other
hand, present renders from completed animations and explain the process of their
creation These sections often include “quick and dirty” techniques that were born in
the face of production deadlines
Trang 20The cd included in the back of the book is an important part of learning
with Advanced Maya Texturing and Lighting, Second Edition A bonus
chap-ter, sample scenes, shading networks, QuickTime movies, and texture bitmaps are included to help you perfect your knowledge The included materials match many of the illustrations in this book; check the illustration captions for file-names
As for Maya file locations, the following directory structure is used on the cd:
Project_Files\chapter_1\scenes scene files and shading networks
Project_Files\chapter_1\images background and HDR images Project_Files\chapter_1\textures texture bitmaps
Project_Files\chapter_1\movies sample QuickTime movies
Maya Versions
The scene files included on the cd are saved in the Maya 8.5 .ma format The files have been tested with versions 8.5 and 2008 All the techniques dis-cussed in the book have been tested with versions 8.5 and 2008; any signifi-cant differences between the two versions have been noted in the text
Shading Network Figures
A number of figures in this book illustrate custom shading networks The nections are labeled with the output and input channels As such, the output channel name is indicated by its placement on top of the connection line (closer
to the top of the node icon) The input channel name is placed below the nection line (see Figure I.1) details concerning attributes, channels, custom connections, nodes, and shading networks are provided
con-Input Output
Figure I.1 An example shading network