Table of Contents

Cover

Title Page

Copyright

Publisher's Note

Acknowledgments

About the Author

Introduction

Who Should Buy This Book

How This Book Is Structured

A Note on Rendering and UV Manipulation

Maya and Photoshop Versions

Hardware Requirements

The Companion DVD

Naming Conventions

How to Contact the Author

Chapter 1: Texturing and Lighting a Product, Part 1

Project: Reviewing the Scene File

Material Types and Critical Attributes

Hypershade Functionality

Project: Assigning Materials

Lighting Techniques and Maya Light Types

Project: Creating Lights and Shadows

2D and 3D Procedural Textures

Project: Applying Textures

Scanline and Raytraced Rendering

Project: Raytracing Reflections

Chapter 2: Texturing and Lighting a Product, Part 2

Project: Accentuating the Logos

Batch Rendering

Project: Adding Strategic Fill Light

Project: Splitting Material Assignments

Project: Fine-Tuning the Shadow

Light Width

Project: Switching to mental ray

Anti-Aliasing Theory

Project: Blurring Reflections

The Final Gathering System

Project: Activating Final Gathering

Optimizing the Scene

Project: Creating the Final Render

Chapter 3: Texturing and Lighting a Character, Part 1

Project: Preparing the Scene

Project: Assigning Materials

1-, 2-, and 3-Point Lighting

Project: Roughing in the Lighting

Examining the UVs of NURBS Surfaces

Translucence

Project: Roughing in the Textures

Project: Creating a Custom Skin Bitmap

Project: Switching to mental ray

Chapter 4: Texturing and Lighting a Character, Part 2

Custom Connections in the Hypershade

Project: Adjusting the Skin-Shading Network

Project: Activating Image-Based Lighting

Project: Deactivating Shadows

Project: Addressing Texture Warp

Project: Fine-Tuning

Color Space and Monitor Calibration

Maya Color Profiles

Chapter 5: Texturing and Lighting a Vehicle, Part 1

Project: Preparing the Scene

UV Maps

Project: Assigning Materials

Project: Roughing in the Lighting

Project: Creating a Sky in Maya

Project: Roughing in the Textures

Displacement Maps

Project: Displacing the Hill

Paint Effects

Project: Painting Grass

Chapter 6: Texturing and Lighting a Vehicle, Part 2

Project: Completing the Texture Maps

Project: Refining the Materials

Motion Blur

Project: Adding Motion Blur

The Render Layer Editor

Project: Breaking the Scene into Render Layers

Project: Adding Reflectivity

Project: Creating the Final Render

Chapter 7: Texturing and Lighting an Environment, Part 1

Project: Preparing the Scene

mental ray Shaders

Project: Assigning Materials

Physical Sun and Sky and Portal Lights

Project: Setting Up the Skylights

Project: Adding Textures

Global Illumination

Project: Activating Global Illumination

Chapter 8: Texturing and Lighting an Environment, Part 2

Project: Preparing the Scene

Ambient Occlusion

Project: Adding Occlusion

Multirender Passes

Project: Creating Multirender Passes

Project: Fine-Tuning the Render

Stereoscopic 3D

Project: Setting Up a Stereoscopic Camera

Appendix: About the Companion DVD

What You’ll Find on the DVD

System Requirements

Using the DVD

Troubleshooting

Customer Care

Index

Color Insert

End-User License Agreement

Download CD/DVD Content

Acquisitions Editor: Mariann Barsolo

Development Editor: Kim Wimpsett

Technical Editor: Campbell Strong

Production Editor: Liz Britten

Copy Editor: Sharon Wilkey

Editorial Manager: Pete Gaughan

Production Manager: Tim Tate

Vice President and Executive Group Publisher: Richard Swadley

Vice President and Publisher: Neil Edde

Media Assistant Project Manager: Jenny Swisher

Media Associate Producer: Josh Frank

Media Quality Assurance: Shawn Patrick

Book Designer: Caryl Gorska, Maureen Forys, Happenstance Type-O-Rama

Compositor: JAmes D. Kramer, Happenstance Type-O-Rama

Proofreader: WordOne, New York

Indexer: Ted Laux

Project Coordinator, Cover: Katie Crocker

Cover Designer: Ryan Sneed

Cover Image: Lee Lanier

Copyright © 2011 by Wiley Publishing, Inc., Indianapolis, Indiana

Published simultaneously in Canada

ISBN: 978-0-470-90327-8

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 Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, 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 Web site 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 Web site may provide or recommendations it may make. Further, readers should be aware that Internet Web sites 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 (877) 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 and by print-on-demand. Not all content that is available in standard print versions of this book may appear or be packaged in all book formats. If you have purchased a version of this book that did not include media that is referenced by or accompanies a standard print version, you may request this media by visiting http://booksupport.wiley.com. For more information about Wiley products, visit us at www.wiley.com.

Library of Congress Cataloging-in-Publication DataLanier, Lee, 1966- Maya studio projects. Texturing and lighting / Lee Lanier. p. cm. ISBN: 978-0-470-90327-8 (pbk.) ISBN: 978-1-118-09148-7 (ebk) ISBN: 978-1-118-09147-0 (ebk) ISBN: 978-1-118-09146-3 (ebk) 1. Computer animation. 2. Maya (Computer file) 3. Texture (Art) 4. Three-dimensional display systems. I. Title. TR897.7.L374 2011 006.6'96--dc22 2011008891

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 trademarks 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

Dear Reader,

Thank you for choosing Maya Studio Projects: Texturing and Lighting. This book is part of a family of premium-quality Sybex books, all of which are written by outstanding authors who combine practical experience with a gift for teaching.

Sybex was founded in 1976. More than 30 years later, we’re still committed to producing consistently exceptional books. With each of our titles, we’re working hard to set a new standard for the industry. From the paper we print on, to the authors we work with, our goal is to bring you the best 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. If you think you’ve found a technical error in this book, please visit http://sybex.custhelp.com. Customer feedback is critical to our efforts at Sybex.

Best regards,

Neil Edde

Vice President and Publisher

Sybex, an Imprint of Wiley

Acknowledgments

Special thanks to all the enthusiastic animators who’ve purchased my books over the years, the fine editorial and production staff at John Wiley & Sons, and my lovely wife, Anita, who knows the value of always learning something new.

About the Author

Lee Lanier is a 3D animator, digital compositor, and director. His films have played in more than 200 museums, galleries, and film festivals worldwide. Before directing the shorts Millennium Bug, Mirror, Day Off the Dead, Weapons of Mass Destruction, 13 Ways to Die at Home, and Blood Roulette, he served as a senior animator in the lighting and modeling departments at PDI/DreamWorks on Antz and Shrek. He created digital visual effects for such films as Mortal Kombat while at Buena Vista Visual Effects at Walt Disney Studios. He is the author of Professional Digital Compositing, Advanced Maya Texturing and Lighting, and Maya Professional Tips and Techniques, all from Sybex. You can view his work at BeezleBugBit.com.

Introduction

“Half of good lighting is good texturing, and half of good texturing is good lighting” is my favorite sage advice to new animators. It’s difficult to separate the two areas of computer animation. Texturing—the re-creation of specific surface qualities through the application of shaders, procedural textures, and bitmap textures—is dependent on an understanding of light and how it interacts with various real-world materials. Lighting, the act of placing and adjusting virtual lights in a 3D environment, becomes a difficult and possibly pointless exercise if no appropriately textured surfaces exist. Conversely, even a beautiful texturing job can be ruined by poor lighting.

Although large animation studios separate the texturing and lighting into two distinct departments, it pays to have a firm understanding of both areas. Hence, this book covers the most important texturing and lighting techniques available in Maya. Whereas other books (some of which I have written) concentrate heavily on theory, this one presents the material through four step-by-step tutorials.

Who Should Buy This Book

Maya Studio Projects: Texturing and Lighting is written for beginning- to intermediate-level Maya users who want to refine their lighting and texturing skills. Although the projects in this book require a basic knowledge of the Maya user interface, it’s possible to light and texture successfully with little prior experience.

How This Book Is Structured

Maya Studio Projects: Texturing and Lighting contains four step-by-step tutorial projects. Each project is split into two chapters:

Chapters 1 and 2: Texturing and Lighting a Product

Chapters 3 and 4: Texturing and Lighting a Character

Chapters 5 and 6: Texturing and Lighting a Vehicle

Chapters 7 and 8: Texturing and Lighting an Environment

The first half of each project guides you through critical steps necessary for an initial high-quality render. The second half of each project builds upon the first half by applying advanced tools and techniques. Note that the complexity and difficulty of the projects increase with each chapter; thus, I recommend you follow the existing chapter order.

A Note on Rendering and UV Manipulation

Rendering is a critical part of lighting. As such, rendering is appropriately covered throughout this book. For example, information concerning render setting attributes, render layer management, and batch rendering is included. In the professional arena, rendering is generally the responsibility of the lighter.

On the other hand, UV mapping and manipulation is covered in a limited manner. Texturing and lighting departments usually receive models with a finished UV texture space. That is, the modelers are responsible for UV map creation and fine-tuning. Hence, the source files provided for the projects in this book contain geometry with ready-to-texture UV texture spaces.

Maya and Photoshop Versions

The projects and supporting examples in Maya Studio Projects: Texturing and Lighting were created with Maya 2011 and tested with Maya 2012 on a Windows-based PC. All the scene files included on the accompanying DVD are saved as .ma files and can be opened with pre-2011 versions of Maya (choose File ⇒ Open Scene ⇒ and select the Ignore Version check box). Differences in workflow between recent versions of the software are noted in the text.

Because texturing is an integral part of this book, it will be necessary to use a digital paint or image manipulation program to prepare bitmap textures. Step-by-step instructions for the use of Adobe Photoshop CS4 are included. Other image manipulation programs, such as GIMP or Corel Painter, can be used with equal success; however, the tool and menu names will vary.

Hardware Requirements

Thanks to the rapid advancement of technology, most mid-priced PCs will run Maya and Photoshop with few problems (at least where the book’s tutorial projects are concerned). That said, it’s recommended that you use a Maya-certified graphics card to avoid interface and view panel drawing errors. For a list of recommended cards, visit www.autodesk.com/maya. This book, for example, was written on a laptop running Vista 64-bit with 4 GB of RAM, a 2.2 GHz dual-core processor, and an NVIDIA-based graphics card.

The Companion DVD

You will find all the files for completing the tutorials and understanding concepts in this book in the ProjectFiles directory on the companion DVD. In addition, color versions of the chapter figures are located in the ColorFigures folder.

The project files are located in the following directory structure:

ProjectFiles\Projectn\: Maya scene files

ProjectFiles\Projectn\Textures\: Bitmap textures

ProjectFiles\Projectn\Reference\: Maya scene files and bitmap textures that serve as reference but are not mandatory for the success of each tutorial

When opening sample Maya scene files, you can avoid missing bitmap textures by first choosing File ⇒ Project ⇒ Set and browsing for the ProjectFiles/Projectn folder, where n is the project number. Follow this step whether the folder remains at its original location on the DVD or is located on a drive after the DVD contents have been copied. You can also reload missing bitmap textures through the Hypershade window; techniques for accomplishing this are discussed in Chapter 1.

Naming Conventions

The projects in Maya Studio Projects: Texturing and Lighting use common conventions for three-button mouse operation. Here are a few examples:

LMB: Click the left mouse button.

MMB+drag: Hold the middle mouse button while dragging.

RMB+click: Click right mouse button and release.

Shift+click: Press the Shift key and the left mouse button to make multiple selections.

When referring to different areas and functions of Maya, I have used the terminology employed by the software’s own help files. Whenever there is a deviation in terminology (usually for the sake of clarity), I’ve included a note to explain the change.

How to Contact the Author

Feel free to contact me at light@BeezleBugBit.com. If you’re a fan of short films, visit www.DamShortFilm.org. For errata and other information concerning this book, go to www.sybex.com/go/msptexturelight.

Chapter 1

Texturing and Lighting a Product,Part 1

In this chapter and Chapter 2, “Texturing and Lighting a Product, Part2,” you will texture and light a pair of headphones. This chapter, which contains part 1 of the project, will guide you through the following steps:

Reviewing the scene file

Assigning materials

Creating lights and shadows

Applying textures

Raytracing reflections

In addition, important lighting and texturing theory is included as follows:

Material types and critical attributes

Hypershade functionality

Lighting techniques and Maya light types

Procedural textures

Scanline and raytraced rendering

Although many tutorials would treat a pair of headphones as a traditional still life, this project approaches the scene as if selling a product. In the realm of business, a product is a good or service that fulfills the need of a particular market. A product is often a physical object a seller offers a potential buyer. Hence, the goal of texturing and lighting a product is to present it aesthetically so that a buyer might desire it. This requires a unique approach to texturing and lighting.

Project: Reviewing the Scene File

Before starting the texturing process, review the scene file and its contents. Open the headphones-start.ma scene file from the ProjectFiles/Project1 folder on the DVD. The scene hierarchy, surface UV texture space, camera setup, and unique light box geometry should all be examined before proceeding further.

Checking the Hierarchy and UVs

The headphones model is constructed from 16 polygon surfaces. The surface nodes are grouped together as a single hierarchy (see Figure 1-1). You can view the hierarchy through the Hypergraph (Window Hypergraph: Hierarchy) or the Outliner (Window Outliner). You can select group or surface nodes through the Hypergraph and the Outliner. Technically speaking, a is a construct that holds specific information and any actions associated with that information. In Maya, a node may be a surface, a light, a camera, a material, and so on.

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!