®
MAYA FEATURE CREATURE CREATIONS, SECOND EDITION TODD PALAMAR
Charles River Media A part of Course Technology PTR, Cengage Learning
Australia • Brazil • Japan • Korea • Mexico • Singapore • Spain • United Kingdom • United States
Maya Feature Creature Creations, Second Edition Todd Palamar Publisher and General Manager, Course Technology PTR: Stacy L. Hiquet Associate Director of Marketing: Sarah Panella
© 2008 Course Technology, a part of Cengage Learning. ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be reproduced, transmitted, stored, or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher.
Manager of Editorial Services: Heather Talbot Marketing Manager: Jordan Casey
Maya is a registered trademark of Alias Systems. All other trademarks are the property of their respective owners
Executive Editor: Kevin Harreld Project and Copy Editor: Marta Justak Technical Reviewer: Les Pardew CRM Editorial Services Coordinator: Jen Blaney Interior Layout: Shawn Morningstar Cover Designer: Mike Tanamachi CD-ROM Producer: Brandon Penticuff
For product information and technology assistance, contact us at Cengage Learning Customer & Sales Support, 1-800-354-9706 For permission to use material from this text or product, submit all requests online at cengage.com/permissions Further permissions questions can be emailed to
[email protected]
Indexer: Valerie Haynes Perry Proofreader: Michael Beady Library of Congress Control Number: 2007932064 ISBN-13: 978-1-58450-547-1 ISBN-10: 1-58450-547-8 eISBN-10: 1-58450-614-8 Course Technology 25 Thomson Place Boston, MA 02210 USA Cengage Learning is a leading provider of customized learning solutions with office locations around the globe, including Singapore, the United Kingdom, Australia, Mexico, Brazil, and Japan. Locate your local office at: international.cengage.com/region Cengage Learning products are represented in Canada by Nelson Education, Ltd.
Printed in the United States of America 1 2 3 4 5 6 7 11 10 09 08
For your lifelong learning solutions, visit courseptr.com Visit our corporate website at cengage.com
I wish to thank my kids for keeping me inspired and motivated. I especially want to thank my son, West, for staying up late and keeping me company.
About the Author
Todd Palamar has worked in the computer animation industry for more than 17 years. He has done special effects work for several direct-to-video films and worked on numerous video games, including Sega of Japan’s, coin-operated title, Behind Enemy Lines, as well as Dukes of Hazzard and Trophy Buck 2 for the Sony PlayStation console. Todd currently heads up all character development for Vcom3D, Inc.
ABOUT THE CD The CD-ROM contains files to help you build a feature creature. The CD-ROM is broken into chapters, and each folder contains files relevant to the chapter. Some of these folders include before-and-after Maya scene files. Each chapter folder on the CD-ROM corresponds to a chapter in the book. The folders contain tutorials, images, and animations. Many have Maya scene files to allow you to work along with the tutorials. Each folder also contains the figures from each chapter.
Contents
Preface
ix
Part I In the Beginning
1
1
2
Getting Ready
3
What You Will Get Out of It
4
What You Need to Know
4
Understanding Simulation
11
Maya nCloth and Nucleus
11
Conclusion
18
Biology 101: Imitating Life
19
Finding Common Ground
20
Layers of Anatomy
21
Skin
22
The Skeleton
23
Muscles and Tendons
26
Fat
29
Connective Tissue
29
Conclusion
30
v
vi
Contents
Part II Reference Material 3
4
5
Design and Conquer
31 33
Sketches
34
Sculpting
36
Maquettes
37
Armatures
40
Working Environments
41
Reference in Maya
41
Conclusion
43
Base Mesh
45
Advantages of Digital Sculpting
46
Disadvantages of Digital Sculpting
46
Conclusion
67
Sculpting in 3D
69
What Is Digital Sculpting?
70
Normal Maps
70
Displacement Maps
71
The Differences Between Normal Maps and Displacement Maps
72
Sculpting in Maya
73
Maya Versus Dedicated Sculpting Software
73
Sculpting Tools
73
Push the Limits
74
Sculpting in Layers
75
Mudbox
87
Conclusion
93
Contents
Part III Modeling 6
7
8
Modeling a Creature (Warkrat)
10
95 97
Suitable Geometry
98
Triangles Versus Quads
99
Tracing in 3D
101
Conclusion
113
UVs
115
UV Placement
116
Conclusion
145
Creating Texture
147
Terminology
148
Extracting Maps
148
Normal Maps
149
Displacement Maps
151
Transfer Maps
154
Rendering Maps
172
Conclusion
181
Part IV Anatomically Correct 9
vii
Nucleus
183 185
Nucleus
186
Conclusion
204
Skeletons
205
Skeletal Motion
206
Hinge Joints
206
Pivot Joints
207
Ball-and-Socket Joints
207
Saddle Joints
207
viii
11
12
Contents
Building an IK System
209
Modeling Bones
210
Bone Orientation
212
Rigging
215
Conclusion
232
Muscles and Tendons Muscles
234
Tendons
238
Custom Muscles
244
Conclusion
253
Skin
14
255
Setting Up the Anatomy
256
High-Resolution Skinning
269
Conclusion
270
Part V Production 13
233
Animation
271 273
Initial States
274
Muscles and Bones
276
Conclusion
286
World Dynamics
287
Object Interaction
288
Conclusion
293
Index
297
Preface hen I was growing up, there were almost no learning resources at my disposal. Trial and error is extremely frustrating. Around the age of seven, I saw an interview with Ray Harryhausen on the making of Clash of the Titans. That was the first “making of ” I’d seen. He discussed making foam puppets from sculptures and placing ball-and-socket joints inside to give them the ability to be positioned one frame at a time. I turned to my father and said, “Dad, I need some ball-and-socket joints.” Years passed. My thirst for knowledge grew exponentially. I watched every movie and read every article that implied “How they did it.” I picked up tidbits of information, nothing more than buzzwords really. Until one day, I found a magazine called Cinemagic at a collector’s shop. This magazine didn’t just describe the entire process of creating a special effect in one paragraph; it actually had step-by-step instructions with photos. More importantly, it told how to do it on a shoestring budget and where to buy the materials. My 12-year-old world exploded. I was officially making movies. I bought back issue after back issue, and I couldn’t wait for a new issue to arrive. Suddenly, they stopped coming. Not even a year after finding it, the magazine had been cancelled. So my quest began again. I scoured libraries, bookstores, and the TV Guide for anything that would talk about how to create special effects. Most of them were on entirely different subjects, but they shared the same materials that I heard were being used in the effects industry. However, nothing proved more valuable than my own experiments. Working in my garage at every hour of the day, sometimes in place of going to school, I made short stop-motion movies. Trying to make each movie bigger than the last grew to be incredibly expensive. I wasn’t very good and made many mistakes over and over. I constantly destroyed my equipment and accidentally burned down my sets. The knowledge that I had acquired was, as they say, only half the battle. The other half was the actual application. I did not have any practical sense of style. When you train under someone or work for someone in a trade, you learn at a gradual, ordered rate. Not having anyone to learn from except a magazine, I would take everything that I had read and try to apply it before mastering any one skill. I never took the time to refine what I had learned. I was my only judge and teacher. Although I was extremely critical of my work, it didn’t matter. It looked bad, and I didn’t know how to fix it. I needed training. So I found one of the few schools around that actually taught special effects, California Institute of the Arts, and I applied. It didn’t take long for them to reject me.
W
ix
x
Preface
Well as luck would have it, before I graduated high school, heading into some uncertain future, I got a job working on a low-budget movie called Vampire Trailer Park. This was it; nothing was going to stop me now. I was in charge of all of the special effects. I was learning a tremendous amount about the industry and spending a lot of my own money on research and development. I ferreted out work on more low-budget movies, but followed the same pattern—learning about the industry by spending all my money. I began to feel as if I were in school, except there wasn’t a teacher. This was the college I did not attend; except it was a lot harder. I wasn’t allowed to make mistakes. Things needed to be right the first time. My knowledge was growing, but at a slow rate. I still had to find out the answers myself. Even when things worked out, I wasn’t sure if I was doing it the right way. Those years were very difficult—struggling to find work and scavenging for knowledge, the whole time thinking that there must be a better way to learn this stuff. Why were there no books on the subjects that I wanted to learn? I needed in-depth discussions, which not only told how to do something, but also explained why and with what. I needed to walk away with an understanding, not just a memorized process. To this day, I cannot answer this question. I can only guess that it is because the people creating those special effects are too busy, under nondisclosure contracts, or their techniques are dependent upon proprietary equipment and software. In today’s world, we are inundated with information; knowledge is at our fingertips. We can learn anything from a new language to how to produce cold fusion. But when it comes down to learning how a special effect is generated, it is still a well-guarded secret. There are countless books that will show you all the basics you can stand, but most are nothing more than a reprint of the manual that comes with the software. What we really need is a publication, like the defunct Cinemagic magazine, which will walk us through the entire process of creating a special effect in a way that is feasible for most of us to do. Now that I am older and wiser, I have come to grips with my self-taught ways and have learned the majority of my practices were indeed the correct way of doing things. Knowing this has built my confidence, and now things are much easier for me. Problems can be solved. I now know where to look for the answers to my questions and how to apply the results efficiently and effectively. It took me 21 years to get to this point. I am writing this book to provide you with what I never had: A step-by-step instruction manual on how to solve problems, answer your questions, and give you the knowledge to make your visions come true. This book is filled with my own experiences and knowledge. It is up to you what you choose to do with this information. The intent is for you to learn from my mistakes and benefit from my accomplishments.
Part
I In the Beginning
1
This page intentionally left blank
1
Getting Ready
reparing for what is to come is like answering the unanswerable. What do I need? Am I missing something? You rush out the door only to find out later that you are not ready. There is no denying it, all of us have been through it, and we will go through it again. It is impossible to know everything, let alone be prepared for it. However, the more we can learn, the better. It affects us on a daily basis. Knowledge is power. Learning how to use a 3D software package like Autodesk’s Maya is not about pushing buttons or utilizing fancy plug-ins. The true power is in understanding why the tools and software do what they do. It is essential to grasp the science behind 3D instead of being an automaton to your own computer. Likewise, by studying kinesiology you become a better animator.
P
3
4
Maya Feature Creature Creations, Second Edition
W HAT Y OU W ILL G ET O UT
OF
IT
Upon completing this book, you will walk away with a high-resolution character sculpted in 3D and a low-resolution version of the same character using Autodesk’s Maya. At the heart of this book, we will establish a method for building anatomybased, photo-realistic computer-generated characters with physics-driven skin. The step-by-step instructions and explanations provide you with a solid method yielding incredible results. In addition, you will gain a powerful understanding of how to work within a high-resolution pipeline.
W HAT Y OU N EED
TO
K NOW
A basic working knowledge of Maya is essential in order to follow this book. More specifically, you should have experience building polygon models, be familiar with what UVs are, and have created animations, regardless of their complexity. Some tools and concepts are explained thoroughly, but only those that are relevant to the process. All of the tutorials are based on technique and not the tools. There is always more than one way to accomplish a given task. It is assumed the readers know their way around Maya. There are a lot of buzzwords and phrases to describe the objective of this book, such as anatomy-based deformations, physics-driven skin, and muscle systems. Part of this comes from the fact that there are many different methods to achieve the desired results. Perhaps it is best to start there. What are the results we are looking for? The answer is photo-realistic skin deformations, easy to sum up but not so easy to define. We must take into consideration numerous factors, available hardware and software, production deadlines, and output mediums, to name a few. Solving for these variables can help, but it does not make the task any easier. There are two major factors to understand: the shortcomings of today’s technology and the unbelievable complexity of the living organism we want to duplicate. It is important to wrap your mind around using a computer, which uses zeros and ones to complete its tasks, to replicate a complex living organism, which uses other living things, such as cells, to accomplish its workload. Our creature indubitably will not have the same complexity as the human one. Mimicking it, however, entails a basic understanding of how life operates beyond what you can see on the outside. The more we know how the human body operates, the harder it becomes to digitally reproduce. This might be a contradiction to what was previously stated, but you could easily tailspin into an agglomeration of if, ands, and buts. To stay the course, we must focus on superficial elements only. That might seem elementary, but to reiterate, the deeper we delve, the more we realize things are not quite as they seem.
Chapter 1 Getting Ready
5
For instance, when a muscle flexes, it is not performing a simple squash and stretch. Fibrous tissues are actually sliding over one another building bulk. Muscles pull and relax causing bones to rotate about a fulcrum. Tendons glide along ancillary tissue and are guided by this tissue. How do we get the digital counterparts to interact with each other? Is it even possible? The truth is our current toolset lacks anatomic accuracy right down to the IK system we use to drive it. We ask ourselves again, what are the results we are looking for? Anatomic accuracy with our current toolset is impossible. However, we can get really close by approximating the motions. All of this boils down to the skin having five major influences: muscle, fat, tendon, bone, and fluid. The skin undoubtedly has more influence than this, but to make sense of it we must break it down into the most noticeable and reproducible areas. There are several minor influences to be added later such as eyeballs, heart, and lungs that will be addressed individually. If we can solve for our major influences, then our minor influences are child’s play. Bone, muscle, fat, and tendon are the internal mechanics. Each presents its own set of issues—on an individual basis, nothing insurmountable. When looked at as a whole, a completely different story. Each of these parts must work together, one influencing the other. To appreciate physics-driven skin, it helps to understand today’s methods of skinning characters. These methods bind vertices directly to joints or geometry, which prohibits the skinned surface from moving independently. This connection forces the skin to move in an unrealistic manner. Whether it is a skeleton or an influencing piece of geometry, the results are the same. To better understand, let’s go through the process of creating a smooth-bound object.
TUTORIAL S MOOTH B IND
Step 1: From the Create pull-down menu, open the Plane settings from Polygon Primitives, as shown in Figure 1.1. Change the divisions to 20 and 20. Step 2: Switch to the Animation module. From the Skeleton pull-down menu, select the Joint tool. Draw four joints in the side view the length of the plane, as shown in Figure 1.2. You might need to change the joint display size, depending on your default settings. Step 3: Select the joint chain and plane. From the Skinning pull-down menu, open the Smooth Bind attributes. Change the number of joints to 2 and the distance to 2, as shown in Figure 1.3. Skin the plane to the joints.
6
Maya Feature Creature Creations, Second Edition
Figure 1.1 Create a plane with 20 divisions in the U and the V.
Figure 1.2 Draw four skeletal joints.
Chapter 1 Getting Ready
7
Figure 1.3 Change the smooth bind settings and skin the geometry.
Step 4: From the Create pull-down menu, open the tool options for Polygon Primitives>Cylinder. Choose Edit>Reset Settings to make sure you are using the defaults. Rotate the cylinder so it is parallel to the plane. Scale the cylinder to the length of the plane and change its circumference to roughly one-tenth of the plane. Position the cylinder slightly under the plane, as shown in Figure 1.4. Step 5: Select the cylinder and then the plane. From the Skin pull-down menu, choose Edit Smooth Skin>Add Influence. Figure 1.5 shows this action. Step 6: Select the cylinder and set a keyframe at frame 0. Move the Timeslider to frame 30. Translate the cylinder 2 units in the positive Y, as shown in Figure 1.6. Set another keyframe for the cylinder. Step 7: Move the Timeslider to frame 90. Translate the cylinder in the negative X, as shown in Figure 1.7. Set another keyframe.
8
Maya Feature Creature Creations, Second Edition
Figure 1.4 Create a cylinder and reshape it to fit under the plane.
Figure 1.5 Make the cylinder an influence object of the plane.
Chapter 1 Getting Ready
Figure 1.6 After setting a keyframe at frame 0, translate the cylinder in the Y and set another keyframe.
Figure 1.7 Translate the cylinder in the X and set another key at frame 90.
9
10
Maya Feature Creature Creations, Second Edition
Step 8: Move the Timeslider to 0. Play back the results of the animation. The cylinder pulls the vertices of the plane as if they were attached directly to it. The smooth bind does not allow the plane to deform freely. This prevents the appearance of objects moving under the surface. Figure 1.8 shows the problem with binding.
Figure 1.8 This is a single frame from the animation. Notice how the geometry pulls.
On the CD is an animation demonstrating the previous procedure. Open Chapter 1/movies and play the file named Smooth Bind.mov. Study your own hand and compare it to the results of the animation. Pretend the plane is the top of your hand and the cylinder is a tendon underneath it. Real skin does not react in this manner. The outcome is drastically different and unusable. With physics-driven skin, the skin or surface geometry is allowed to move independently of influences. Play the animation called Physics Skin.mov from the CD. The plane is allowed to deform freely without being anchored to the cylinder. Objects such as muscle and bone are used to support and influence the skin surface. Without these, the skin would crumple to the ground, just as our own skin would. Play the animation called Crumple.mov from the CD. This demonstrates what happens to the skin without its internal anatomy.
Chapter 1 Getting Ready
11
U NDERSTANDING S IMULATION The job before us is to create artificial life. We need to create muscle, skin, bone, and fat. These elements must react and move similarly to their real-world counterparts, simulating living tissue. The key word “simulate” is the heart of our process and what we must first understand. To get our skin to “be alive,” it is necessary to run what is called a simulation or “sim.” Imagine animating a 5,000 polygon character walking, one vertex at a time, no joints, no deformers—each vertex painstakingly arranged not only to provide the illusion of motion but also to ensure continuity of the surface. Most of us would openly admit that it is difficult to do two or three tasks at the same time. Animating this way would mean remembering and anticipating 5,000 different tasks. The results would be disastrous. Simulation is the process of recreating a situation based upon a collection of parameters. In the case of skin, it is applying attributes that exist in the real world to computer-generated polygonal geometry. Deforming geometry through simulation is very processor intensive because it involves calculating many different parameters to thousands of deformation points.
M AYA N C LOTH
AND
N UCLEUS
Maya has several different methods for deforming geometry. To account for all of the variables in creating realistic skin, we must run what is called a simulation. The best tool for this is nCloth, driven by the Maya Nucleus solver. nCloth is a system of dynamically linked points used to drive geometry. The Maya Nucleus solver is the engine that drives nCloth. nCloth is versatile enough to simulate a wide variety of substances—both hard and soft. It also has great stability; simply put, it takes a lot to make nCloth explode. nCloth has two object types: active and passive. Active nCloth objects take on characteristics of a deformable object. They are influenced by gravity, air density, and a host of other attributes. Active objects are entirely controlled by Nucleus. The only way to interact with them is by influencing them through their attributes, forces, or a passive object. Passive nCloth objects become solid objects that active objects interact with. They do not deform, nor are they influenced by Nucleus forces. Consider these brick walls held up by the Nucleus solver. Passive objects remain under your control and can be freely animated. Let’s do a quick tutorial to see what nCloth is like.
12
Maya Feature Creature Creations, Second Edition
TUTORIAL N C LOTH
Step 1: From the Create pull-down menu, choose Polygon Primitives>Plane. Create a plane with a width and height of 24. It should be the size of the grid. Next, create a primitive polygon sphere using the defaults. Change the scale to 2 in the X, Y, and Z. Raise the sphere 10 units in the Y. Your scene should look like Figure 1.9.
Figure 1.9 Create a polygon plane and sphere.
Step 2: Switch to the nCloth module. Select the sphere and choose Create nCloth from the nCloth pull-down menu. Now select the plane and choose Create Passive from the nCloth pull-down menu. Set the timeline to play from 1 to 100. Press Play. Your simulation will eventually look something like Figure 1.10. Quite a lot just happened in that simple little simulation. Watch it back again. Do not scrub through the timeline, though; the only way for the simulation to calculate correctly is to play through all of the frames. Notice around frame 30, the sphere starts to lose its shape. It is already being influenced by air density. Then it impacts with the plane. Finally, it crushes under its own weight.
Chapter 1 Getting Ready
13
Figure 1.10 Play the simulation and watch what happens to the sphere.
Step 3: Set the timeline back to frame one. Create another sphere using the defaults. Raise the sphere 10 units in the Y. This will place the new sphere inside the larger one. Make the sphere a passive object by choosing Create Passive from the nCloth pull-down menu. Press Play and watch the simulation. Figure 1.11 shows the results.
Figure 1.11 The nCloth sphere is suspended by the passive sphere.
14
Maya Feature Creature Creations, Second Edition
With the passive object in the middle, the active nCloth object deforms around it. It is also important to point out that the passive object is supporting the weight of the active one. You have just created your first simulation and gone through the basic procedure for creating physics-driven skin.
TUTORIAL P IPELINE O VERVIEW
Building a computer-generated character is a lengthy process, whether it is for film, television, or games. Technology has made incredible advances automating a lot of the steps; however, automation is expensive and out of reach for most individuals and small companies. The process described in this book is affordable and achievable. The following list provides an overview of the steps used to build the film-quality creature described in this book. Step 1: Draw a two-dimensional rough draft of the character. Figure 1.12 shows an example.
Figure 1.12 This is an example of a two-dimensional rough draft.
Chapter 1 Getting Ready
15
Step 2: Build a 3D base mesh. Figure 1.13 shows an example.
Figure 1.13 This is an example of a 3D base mesh.
Step 3: Sculpt high-resolution detail on the base mesh. Figure 1.14 shows an example.
Figure 1.14 This is an example of sculpted high-resolution detail.
16
Maya Feature Creature Creations, Second Edition
Step 4: Create a new base mesh using the high-resolution mesh as a template. Figure 1.15 shows an example.
Figure 1.15 This is an example of a new base mesh constructed from a high-resolution mesh.
Step 5: Bake high-resolution detail into texture maps. Figure 1.16 shows an example.
Figure 1.16 This is an example of a baked texture map.
Chapter 1 Getting Ready
17
Step 6: Model the internal anatomy to fit inside the new base mesh. Figure 1.17 shows an example.
Figure 1.17 This is an example of modeled anatomy.
Step 7: Establish a relationship between the 3D anatomy and the base mesh. Figure 1.18 shows an example.
Figure 1.18 This is an example of a link between modeled anatomy and the base mesh.
18
Maya Feature Creature Creations, Second Edition
This book is designed to show you how to build your own character. The tutorials are used to introduce concepts, practices, and theories. Upon completing them, apply what you have learned to your own creations. Most of the tutorials have an associated Maya scene file enabling you to jump right in. Experiment with these scene files beyond the tutorial explanations until you have a strong grasp of the material introduced, and feel free to test new methods and improve upon the procedures. Take this knowledge and expand on it.
C ONCLUSION Learning software packages has become an enormous undertaking. Many developers even offer certified training for their products because of the wide range of features they have included in the various versions of their products. As the packages get bigger, so does the learning curve, and Maya is no exception. The amazing power of Maya is in its open architecture. This package does not give you the capability to write your own plug-ins, albeit an awesome feature in itself. Instead, Maya offers the boundless interaction between tools. Virtually every tool and function can be layered on top of one another, enabling you to get different results based upon the order in which you layer them. This feature allows you to perform complex operations without having to write proprietary scripts. Although this does not eliminate the need for scripting, it does provide alternatives in some cases. Often, special proprietary tools must be written to achieve the desired effect, but for most of us, this isn’t an option. In general, most artists stay away from coding and scripting. However, as software becomes more robust, computers faster, and expectations greater, artists are turning to simpler integrated software languages to make models bigger, better, and faster. The knowledge and creation of these specialized tools is a tremendous asset to any artist’s repertoire. Perhaps even more valuable, though, is a solid understanding of the tools at your disposal. It can take years to fully grasp every function of a 3D package. The best approach is to start with a single aspect, such as modeling. Learn all the tools inside and out before moving on. When it comes to creating an animated character for film, you’ll find that it’s now possible to maximize the software’s potential. The more you know about particular tools and features, the greater your characters will become. The variety of tools discussed in this book is chosen for the practicality and the benefit of the project, not for the sake of demonstration. Each of these tools was considered carefully to achieve the quickest and best-looking results.
2
Biology 101: Imitating Life
owerful, versatile, and unique. The most incredible machine ever known is the driving force behind our creature. This machine is capable of processing and organizing large amounts of data at incredible speeds. Its memory limitations are undiscovered, and it is capable of creating any geometric shape and texturizing with an unlimited color palette. This machine has the capability to reproduce itself, yet we don’t fully understand how it works. Its design has been improved upon for more than two million years. This machine is the human body. In developing a creature, we must think in terms of reality. Don’t think of how to do something in CG but how it’s done in the real world. The closer we come to imitating Mother Nature, the closer we come to photo-realism. This can be a daunting task. There is a ton of information available on the inner workings of humans and animals. However, most are written explanations or two-dimensional
P
19
20
Maya Feature Creature Creations, Second Edition
drawings leaving a lot left to interpretation. Seeing a skeletal drawing of the forearm in a supinated position, the palm facing up, and another of it in a pronated position, the palm facing down, does not explain the motion in-between. When the information or our understanding isn’t clear, it’s necessary to perform our own experiments to prove how these things happen. This is where animation becomes a science.
F INDING C OMMON G ROUND All life is unique, serves a purpose, and works within its own environment. As artists, our goal is to supply that same uniqueness and purpose found in nature to our characters. Whether it is of this world or another, our creations were born somewhere. The environment they live in or came from influences their skin, muscle mass, coloring, hair, and everything about them. Instead of reaching for the unimaginable, we need only look in our own backyard. The theory of evolution suggests that all life originated from the same simplistic organism, transformed from a single cell into a complex organism through a series of changes. Whether you believe it or not, it is easy to see how one could come up with the idea. Starting with a simplistic organism, you might recognize similarities between it and an organism of greater complexity. As life becomes more intricate, it’s easier to notice species that share external features, internal systems, and instincts. At the top of this elaborate web are Homo sapiens. From the basic composition of our cells, to the more elaborate ability to reproduce, we share common threads with all life. Therefore, our own bodies can provide detailed information on how a fictitious organism might look and act. The goal is to create a creature that differs greatly from a human in appearance, but closer inspection reveals the same internal composition. For instance, compare a human to an alligator. These two types of organisms are outwardly different. Examining their anatomies, however, we see both possess muscles, bones, lungs, skin, etc. Although their appearance and individual anatomy are relevant, our primary concern is functionality. Do muscles expand and contract the same? Do their motions influence the skin? If we successfully make these simple comparisons, the human anatomy provides a superior source of reference. On the other hand, if we were building a creature resembling an amoeba, our comparisons would fail, and we’d be forced to find an alternate source of reference. Establishing common ground is vital to the growth of our character. Humans make great reference points for one simple reason: we are the most adaptable creatures known. This allows us to envision what would happen if we were subjected to a foreign environment. From here, we can impose those projected long-term adaptations to our evolving creature. Lots of interesting combinations arise. Consider some of the following environments and their impact on humans over millions of years.
Chapter 2 Biology 101: Imitating Life
21
Cave
Description: Dark, sharp corners, jagged rocks, damp, cold Adaptation: Large bulging eyes to absorb more light Callus-like protrusions Hard thick nails Rough leathery skin Bulky skin
Rain Forest
Description: Dark, moist, humid, dense foliage, abundant life, hot Adaptation: Thin breathable skin Thin, agile, and light Colorful Long nails Smaller size Our imagination can take us a long way, but it can also lead us further from the truth. Plenty of animals already exist in our backyards. Drawing from them helps us understand how our creature may have developed internally. It is important to note that even though you are using a human as reference, you are not limited to one point of reference. Remember, we use humans because of their adaptable nature, but many other animals are already in their adapted form. For instance, if we consider a mountain environment, a human might rapidly turn into Bigfoot; however, if we consider a mountain goat, we might get a human with a reverse knee and a much leaner, loftier, internal structure, instead of a large, hair-covered, twoton beast. It is important to use these references for the internal makeup of our creature. Our focus, internal structure only, begs us to look at our reference not from an aesthetic angle but from a purely functional angle. How does a reverse knee work? What bones are the muscles connected to? If the skin is thicker and callused, how does it move?
L AYERS
OF
A NATOMY
The human body is a marvel of design and function. The dynamics of our own anatomy provide us with a fount of inspiration and reference. Although we are creating a fictional monster, it must look and act alive. Reference material does not exist for a character of this description. Our goal is to find real-world objects with
22
Maya Feature Creature Creations, Second Edition
similar qualities. We could choose an animal closely mimicking the product of our imagination. However, to birth our character, we need to look past the skin and examine the inner workings of existing life. Finding detailed anatomic descriptions and drawings of specific animals can be challenging. The human being, on the other hand, has been mapped and remapped. Studying its anatomy gives us new ideas and solutions to problems we’ve not yet considered. Luckily, reference material on human anatomy is easy to find and is literally inside us all. To accurately answer our questions and create a fictitious character, we must understand how anatomy works and then translate it to our character. We will, therefore, study human anatomy and learn how muscles, bones, tendons, and skin work together to move the way they do. For the purpose of feasibly replicating a complex organism, it’s necessary to break the anatomy down and identify our requirements. Our character needs to move in an anatomically correct way, and its outer skin needs to deform realistically. There is no need to replicate any element not outwardly affecting our character’s appearance, which will eliminate the majority of complex systems of the human body. We can identify elements of influence and place them into a layer of our own description. The primary elements that define our layers and the names used to describe them are the skin, skeleton, muscle, tendon, fluid, and fat. Secondary elements to be grouped into their own layer and categorized as internal organs are the heart, lungs, and stomach. As we discuss the purpose and function of each layer, consider how these elements could be modified for a creature of your own design. Remember that it’s not solely for appearance, but how your creature sustains its own life— it must function. The process of creating CG characters is moving closer to the process of cloning life. As computers become more powerful and audiences increasingly sophisticated, our challenge is clear: to build a more-perfect beast. To accomplish this task, we must advance from the old methods of skinning vertex by vertex to the more realistic life-interpreting techniques by studying human anatomy. We can then make connections from the real world to the CG world. This process is no easy task and should not be considered for every character. Those that share the screen in a prominent fashion must have an ordered level of existence to achieve believability alongside their living coworkers. SKIN The process of creating a CG character begins and ends with the skin layer. The geometry defining the looks and features of the creature is constructed first. This is done to achieve the look required and is usually established long before we think about its anatomy. With this preconceived vision, we can begin to see how muscle
Chapter 2 Biology 101: Imitating Life
23
and bone fit inside. The opposite would provide uncertain results and leave us to model our skin painstakingly with the actual anatomy. However life-replicating this may be, it’s not practical. Real-Life Skin
The skin encases all other layers. It’s a strong, highly complex, unique surface that allows the body to interact with its world. A tough lattice of connecting tissue, the skin keeps out microscopic invaders, regulates heat loss, and limits penetration. It helps communicate emotion, age, and health. Skin works as a whole; indenting one area radiates outwardly, pulling the surrounding skin toward the influencing force. The harder the skin is pushed, the greater the affected area. When the force is removed, the skin springs back to its original position without leaving a lasting imprint. If you could pull on the skin hard enough, it would either reach its elastic limitations and tear or come off as one piece. Skin can be grouped into three types: hairy, hairless, and delicate. Hairy skin covers a considerable part of the body. The hair can sense the environment without allowing it direct contact with the skin. It acts as an early warning system and aids in thermal protection. Thicker, hairless skin covers much less of the body and is reserved for areas such as the hands and feet. This skin is grooved to create a frictional surface, giving it the ability to grip opposing objects. Delicate skin, such as the lips, has no hair, is thinner than the hairy or hairless skin, and is more sensitive. The skin is attached deeply to connective tissues around points of articulation. Skin creasing, skin lines, and wrinkles are found all over the body and are more than just defining lines. Creasing helps the skin expand and contract and ease joint rotation. Digital Skin
We will impose the elasticity of skin to our polygon surface and describe the connectivity of its tissues to the rest of the layers. Whether real or CG, the skin layer is an outer shell influenced by objects moving underneath it. These objects are not necessarily attached to the skin. Therefore, the CG skin needs to keep its shape while other elements inside or outside of the body stretch and deform it. THE SKELETON The skeleton has a dual meaning in our pipeline. Our creature has two skeletons. The first is made up of modeled bone, such as a humerus and femur. It is exactly like you would imagine a human skeleton looks like. The second is a chain of manipulators used to animate the character. The manipulators, referred to as joints in Maya, are rotated to achieve animation. To animate a character’s arm, you would rotate the shoulder, then the elbow, then the wrist, moving all the way down the chain.
24
Maya Feature Creature Creations, Second Edition
This is called forward kinematics or FK. The joints can have handles attached to them for automated functionality. The handles allow you to use inverse kinematics to animate the character. Known as IK, inverse kinematics move an entire chain of joints through one handle located at the end of the chain. It is inversed because when the handle is moved, the joint positions are calculated up the chain, not down like FK. Real-Life Skeletons
The purpose of the skeleton is to provide shape, protection, and support to the body. Whether the body is in motion or idle, it’s the skeleton that defines the appearance. The human skeleton is considered bilaterally symmetrical: from head to toe, one side is the same as the other side. The human skeleton exists on the inside of the body and is called an endoskeleton, but skeletons can also exist on the outside of the body as an exoskeleton. Most animals possess both types, providing a certain amount of protection and defense. An interesting part of the human skeleton is the teeth, by definition an exoskeleton. The teeth aid in consumption, communication, and defense. Creatures with more prominent exoskeletons, such as turtles or insects, rely on this outer shell for protection against predators. Usually, creatures with this outer defense lack the mobility or dexterity of organisms without it. In this way, nature creates a balance so that all life has an equal chance of survival. Skeletons, simply put, are an organized collection of individual bones. They can be sorted by shape and size into groups of long, short, flat, and irregular. Bones basically work as levers acted upon by muscles and tendons. The longer the bone is, the greater the leverage, hence allowing for more speed and power. Long bones are usually found in limbs, such as legs and arms, and typically provide locomotion and broad movement. These bones are made up of a tubular shaft with expanding ends designed to support articulation. One example is the humerus bone of the arm, and a smaller example would be the metacarpal bones in the hands. Bones classified as short bones occur in the wrist. Their appearances range from a wedge shape to a cube shape, and they are designed to handle pressure. Flat bones are found in the cranium and the scapula (shoulder blade). All other bones not fitting into any of these three categories are considered irregular bones, such as the heel. A bone’s function, or the demand placed upon it, greatly influences the length and girth of a bone over time. This is true, regardless of the demand. If a bone is not in use, it will decrease in size, and with use, it will increase in size, just like a muscle. Therefore, the stronger the organism, the bigger-boned it is. The point at which two bones meet is a joint. These areas are usually surrounded by cartilage and fluid that allow for smoother motion and act as a shock absorber. Not all joints are capable of movement. For instance, where the ribs connect to vertebrae, there is no movement.
Chapter 2 Biology 101: Imitating Life
25
Digital Skeletons
CG bones are polygon objects made into passive nCloth objects. Since the skin is an active nCloth object, setting the bones as passive allows for collision detection, thus deforming the skin or pushing the skin out. The geometry making up individual bones needs to be smooth and uniform; jagged points can slip through collision detection. Underneath the digital skeleton lie FK and IK. Both of these elements need to be drawn from joint to joint, ending at the point of articulation. Using a joint’s range of motion, we can set limitations to the rotation values of the IK and FK. In addition, the thickness of individual bones should be honored, and bones should not be allowed to penetrate one another. All of this helps prevent the character from moving illegally. Figure 2.1 shows an example.
Figure 2.1 This is an example of a digital skeleton.
26 MUSCLES
Maya Feature Creature Creations, Second Edition
AND
TENDONS
Muscles are the driving force behind all of life’s motion. Without muscles, our skin would be like a floppy rubber suit. At first thought, you might want to build every muscle in order to have the perfect creature; however, this is impractical and only increases production time without a noticeable difference in realism. We need CG muscles to provide the illusion of real muscle. If it doesn’t directly influence the skin, it’s not needed. Real-Life Muscles and Tendons
A muscle is a group of fibers capable of contracting. There are three different muscle groups: cardiac, nonstriating, and skeletal. Cardiac muscles are those of the heart; nonstriated, or smooth, muscles are involuntary, working mostly on soft tissue and organs to accomplish bodily processes. Both are predominately deep muscles manifesting little to no visible changes in the surface of the skin. It is the superficial muscles, or skeletal muscles, that give the body definition. Skeletal muscles form a vastly complex, interwoven mesh of fibrous tissues. So much so, it’s hard to tell where one muscle ends and another begins. They lie next to and on top of internal organs in order to protect them. The skeletal muscles act upon bone to rotate it about its joint. Muscles connect directly to bone or to tendons. Tendons are slightly elastic, but don’t produce any noticeable stretching in the skin. However, they are flexible, which enables them to wind around bony surfaces. Tendons bond with the belly of a muscle and extend across a joint to attach to another bone. The contracting muscle pulls the tendon, in turn rotating the bone. Where the muscles or tendons connect to bone is extremely important. This directly affects the power and direction of the bone’s motion. In order to have motion at a joint, we have two bones, one fixed and one mobile. The origin of the contracting muscle resides on the fixed bone. The attachment of the tendon on the mobile bone is key in determining the power and direction. All skeletal muscles can be classified as spurt, shunt, or spin, based upon their attachments. Muscles display all three types of control, but one is always more prevalent. In a spurt muscle, shown in Figure 2.2, the fixed attachment runs in series with the mobile attachment but is farther from the joint, enabling a powerful swing. These muscles are most effective at initiating and continuing slow movements. Shunt muscles (see Figure 2.3) are the opposite of spurt muscles and have their mobile attachment farther from the joint. The majority of the power delivered by a shunt muscle is exerted toward the joint to keep the joint from separating. Spin muscles, shown in Figure 2.4, connect to bone in a spiral manner. These attachments are not in series with one another, causing the bone to spin or twist about its articulation.
Chapter 2 Biology 101: Imitating Life
Figure 2.2 This is an example of a spurt muscle.
Figure 2.3 This is an example of a shunt muscle.
27
28
Maya Feature Creature Creations, Second Edition
Figure 2.4 This is an example of a spin muscle.
Individual muscles, and groups of muscles, work together to produce complex motion. An isolated bend at the elbow is not the action of one muscle but many working to stabilize, balance, lift, and return the bone to a resting position. Digital Muscles and Tendons
Tendons are considered with muscles because of their direct attachment to muscle. They do not exist without being attached to a muscle. Because of this, they are modeled all as one. When it comes to their interaction with other digital parts, they must be treated separately. Muscles have one set of properties, while tendons have another. This is done by using attribute maps. By painting attribute values, we describe how each vertex is meant to react, thus creating two very different dynamic surfaces on one piece of geometry. Muscles and tendons range in size and shape and may connect to bone in two or more locations. These focal points are locked down while the rest of the object expands and contracts with a motion that is difficult to replicate. While the tendons can be connected to bone through constraints, the muscle belly must be animated in a manner to preserve its volume.
Chapter 2 Biology 101: Imitating Life
29
FAT Fat cells are located throughout the body. They are found acting as cushion to surrounding organs, behind the eyeball, inside joints, and in the pads of hands and feet. Fat cells are more widely recognizable when they accumulate just under the skin. This subcutaneous fat can reveal age and gender. Females naturally have more fat cells than males, and they are distributed more widely throughout the female body. A distinguishing factor is the increased abundance of fat in the breasts. In males, fat is more localized in the trunk, tapering off through the extremities. In both sexes, fat increases during middle age, adding to the aforementioned areas. During the latter half of fetal and early infancy stages, fat builds in the body giving it a rounded, bulbous appearance. In elderly people fat diminishes, returning the body to one of its early fetal states of a significantly wrinkled appearance. The interesting correlation is that we develop and deteriorate in the same manner. Fat has many different functions. It is used for energy and thermal insulation. Organisms in colder climates, including humans, have a higher abundance of superficial fat to keep them warm. Furthermore, fat can act as a shock absorber and cushion. It clusters around internal organs and inside joints and is a protective subcutaneous layer for regions of the body. The most distinctive visual trait of fat is its incompressibility. Instead of diminishing in size or collapsing like a sponge when pressure is applied to it, fat will divert the force, pushing other fat cells out of the way. This characteristic also causes “jiggle” between the cells as they bounce off one another. When force is applied from gravity or direct pressure, fat works to retain its shape and volume. Digital Fat
Fat has properties similar to skin, but fat properties are more exemplified. We need only to increase the attributes that make it “jiggle.” These simple pieces of geometry can then be placed into our CG body and applied as collision objects. Because the actions of fat and skin are close, we must be careful not to get carried away when placing fat. It should only be used in genetically predisposed areas or special characters. To cover the whole body in a layer of fat would be redundant, yielding unwanted results. CONNECTIVE TISSUE We need connective tissue to anchor our CG skin. This tissue is described by using constraints attached to vertices on the skin to a bone’s surface. Like real skin, these constraints hold it in place, generating wrinkles or folds. nCloth constraints, or nConstraints, can be made rigid or pliable, making them suitable for all our tissue connections.
30
Maya Feature Creature Creations, Second Edition
C ONCLUSION In the end, we will have a creature capable of deforming its own skin. This method will effectively bypass the normal skinning procedure of a rigid or smooth bind. In fact, it will save setup time and produce results unobtainable by normal skinning methods. This procedure will automate muscle and bone deformation, fat jiggle, skin wrinkling, skin shake, and impacts to the skin exterior. The pitfalls are in the extra models needed and having to run a simulation to view the results. As technology grows, this becomes less of a problem. Perhaps the most intriguing aspect of this information is that we can use it not only to shape our creatures, but also to shape our stories. Having this much detail in our creations opens the door for certain limitations. Describing the creatures anatomically means they might not be able to do everything that we planned, thus forcing us to devise alternative actions that ultimately make for a more interesting and believable story.
Part
II
Reference Material
31
This page intentionally left blank
3
Design and Conquer
he creature has been designed. It is drawn and passed onto you. Your job is to give function to form! You are the evolutionary designer. It is up to you to compress a million years of anatomic evolution into a single drawing. No, it’s not a real job, but someday it might be. As creatures get more sophisticated, the demand for anatomic accuracy increases. The more it does, the greater the threedimensional complexity, and the more intricate the design will be. Before building anything, there must be a design to follow. In Chapter 2, “Biology 101: Imitating Life,” we discussed the essence of human anatomy and its role in the development of photo-realistic, computer-generated creatures. Skin, muscles, bones, tendons, and fat all contribute to the design of the character. In this chapter, the creature is developed through several sketches. The design is finalized and brought into Maya as a reference plane.
T
33
34
Maya Feature Creature Creations, Second Edition
S KETCHES The first step in the visualization of a character is to sketch or draw it out. There are several off-the-shelf 2D paint packages that make sketching a character easy. It is time to establish what our creature is going to look like. First, we start with what we know. The idea is to build an anatomy-driven creature. This could be anything. To clarify, we want its anatomy to stand out. The creature needs to exemplify muscles, fat, and tendons. The outer skin is kept simple in order to showcase these elements. Take a look at Figure 3.1.
Figure 3.1 This is the basic design of our anatomy-driven creature.
The creature, which is called a Warkrat (Wark-rat), has a humanoid shape with very few extra features or appendages. Its skin is bare and smooth. Even though the design is modest in form, the creature’s anatomy is just as complex as any other. Several factors need to be addressed and researched now before we continue. It is essential to identify problem areas early in the process. If we need to make a change in the design, this is when we want to do it, because finding out that something doesn’t work during the simulation phase can cause massive reworking, potentially forcing us to start over.
Chapter 3 Design and Conquer
35
The first issue to address is the creature’s large arm muscles. Flexed or unflexed, their girth alone is going to induce skin-on-skin collisions. This is a common problem for all characters and creatures, but more prevalent in those of a stronger nature. Muscles are passive objects. When two passive objects collide, nothing happens, and they are allowed to interpenetrate. However, if skin were trapped in-between, it would fight over which passive surface to obey. This causes the simulation to lock up, explode, or crash. Therefore, the muscles around joint areas should be active objects. Next is the large bulbous neck area. Primarily made of loose skin and fat, this area is always on the move. It will shake and ripple when the creature does just about anything. Like the arms, it is an area that will bring attention to it, so therefore it must look convincing. Because it is a softer spot, we do not have to worry as much about it making contact with other areas of the body. It will be the first to yield. What makes it a difficult area is that fat is incompressible, as we learned in Chapter 2. Any motion or force applied to it must be transferred locally to the rest of the area in a convincing manner. Another area is the spine. The bones push up on the skin, similar to the rib cage. The skin needs to roll over this area the most, obviously. This effect is the point of our whole setup. The obstacle becomes the small size or detail of each vertebra. In order for collision detection to work accurately, the colliding surface must have more geometry than the underlying surface. Therefore, when modeling our creature, we need to make sure to add extra geometry just for these deformations. This particular problem illustrates the need for good preplanning. If we built our geometry without consideration for what was happening under the skin, our simulation would fail. At that point, we would have to rework the original model, setting us back weeks and forcing us to redo a large amount of work—everything from laying out UVs to attaching muscles. Last, are the folds of skin naturally bunching up behind the head. The problem here is the constant skin-on-skin collision, but another problem is just maintaining the shape of these folds. They happen in the real world from a combination of things—the thickness of the skin, fluid, fat close to the surface, and connective tissues. All of these must be accounted for. You can see that even the simplest of designs still comes with problems. Each needs to be addressed individually and as a whole. Here is an abbreviated list of the issues we face. Large muscles Loose skin and fat around the neck Protruding spine Neck wrinkles behind the head
36
Maya Feature Creature Creations, Second Edition
Another useful drawing is one that illustrates muscle placement. Positioning muscles is the longest part of the 3D process. Having a rough idea of the size, shape, and location takes a lot of the guesswork out of building the muscle structure later. It is also an opportunity to establish the number of muscles needed. Twodimensional drawings only provide basic reference; however, they still help with approximate muscle placement. Figure 3.2 shows an example.
Figure 3.2 Drawing out the muscles helps in placing them.
S CULPTING As mentioned earlier, conceptualizing muscles in 2D is limiting. It is very easy to have the muscle layout work on paper. When actually fitting the muscles together in Maya you find they don’t fit. Conceptualizing the muscles in clay solves this problem.
Chapter 3 Design and Conquer
37
MAQUETTES Two-dimensional images provide a limited amount of information in a threedimensional world. Creating a maquette, or preliminary sculpture, leaves no questions unanswered. This prototype gives you the opportunity to make mistakes and test ideas. It’s easier to modify clay than geometry. A version of your creature existing outside of the computer will not only help you visualize the result, but also will give you a scale for the CG model. Many special effects houses, whether they are building traditional or computer-generated creatures, sculpt a prototype of the entire creature before building anything else. This helps everyone involved in the production envision the size and scope of the creature. Furthermore, it provides excellent reference material for scanning or sharing between multiple companies or departments. Figures 3.3 and 3.4 show an example of a fully sculpted maquette.
Figure 3.3 Here is a maquette from the front.
You can choose to sculpt the entire character or just its muscles. Sculpting the muscles does not mean you build each and every muscle. Although this meticulous attention to detail provides exceptional reference material, only questionable or complex areas need to be addressed. One such area is the shoulder. The muscles of the shoulder area are large and interweaving.
38
Maya Feature Creature Creations, Second Edition
Figure 3.4 Here is a maquette from the side.
The intention is to establish proportion and form; fine detail is not entirely necessary. However, the closer you get to your vision, the easier it is to replicate in the computer. To demystify this art form, we will take a look at the materials and tools at our disposal. Once we establish a basic toolset, you can proceed with sculpting the musculature. To help get you comfortable with the idea of sculpting, here is a step-by-step explanation of the sculpting process. Step 1: Select a clay with which to model. Super Sculpey is the easiest and most versatile material. It can be found at most art or craft supply stores. Figure 3.5 shows an example. Step 2: Build a skeleton or armature on which to sculpt. This will provide the basic shape and give support to the clay. Armatures are explained in greater detail in the next section. Figure 3.6 shows an example of an armature.
Chapter 3 Design and Conquer
Figure 3.5 Here is an example of Super Sculpey.
Figure 3.6 Here is an example of an armature.
39
40
Maya Feature Creature Creations, Second Edition
Step 3: Add a thin layer of clay around the wire to represent the creature’s bones. This also makes it easier to stick muscles to the armature. Step 4: Shape a muscle and place it appropriately over the sculpted bone. Defining the exact shape is not crucial. The key factor is making sure that everything fits where it is supposed to. Again, the major point of sculpting the muscles is to reinforce the plausibility of your 2D design. ARMATURES The framework you sculpt upon is called an armature. This structure acts as a skeleton, giving the sculpture form and support. Armatures can be made from a variety of materials, as long as they are strong enough to hold the weight of the clay. Your model should not sag during the sculpting process. Almaloy armature wire meets the requirements of the armature. Made of aluminum alloys, this non-corrosive material is lightweight and extremely pliable. It is virtually unbreakable because it resists bending in the same place twice and is also suited for some stop-motion applications. It can be bought in an assortment of thicknesses from 1⁄14" to 3⁄8" at art supply shops (the thicker the wire, the greater the tension). The wire can also be wrapped to increase its stiffness. See Figure 3.7 for examples of the wire.
Figure 3.7 These are examples of different gauges of armature wire.
Chapter 3 Design and Conquer
41
The gauge, or thickness, of armature wire you use depends on the size or scale your sculpture will be. Experiment with different gauges to get a feel for their individual strengths. Portions of your sculpture may be thicker in places, requiring the wire to support more weight in that specific area. WORKING ENVIRONMENTS Evaluate the area you plan on sculpting in wisely. The survival and quality of life for your sculpture depends on it. It’s essential to choose a location conducive to sculpting. Pick an area you can make your own and be able to surround yourself with 2D reference material. Although your location may vary based on the type of clay you use, make sure you meet the majority of these requirements. Make yourself comfortable. This is important because of the long hours you will be working in the same location. You will also find yourself twisting and turning to get into every nook and cranny of your sculpture. The area should be spacious and free of obstacles that might prohibit you or your sculptures from moving. You might choose to stand while sculpting, but when it comes to fine detail, you might want to sit to help steady your hand. Chairs can get very expensive, so make sure you don’t get carried away with how fashionable the chair looks. Clay freely sticks to fabric, so you might want to go with a vinyl covering. Try to find one with a thick cushion that allows you to adjust the elevation. You will appreciate both of these features. Temperature plays an important part in being comfortable for yourself and for your sculpture. You want a place that is moderately cool, but the last thing you want is to be shivering. If it’s too warm, you might get sweat in your eyes. Your environment should be clean and safe from falling objects. It should also be a low-traffic area because dust, dirt, and other floating debris, which get stirred up whenever someone walks by, mix readily with all clay.
R EFERENCE
IN
M AYA
Once satisfied with the design, orthographic images are drawn. These images are imported into Maya and placed onto image planes. The planes are positioned in the viewport that corresponds to the drawing. Figure 3.8 shows the front orthographic, Figure 3.9 shows the side, and Figure 3.10 shows the top.
42
Maya Feature Creature Creations, Second Edition
Figure 3.8 This is the front orthographic drawing.
Figure 3.9 This is the side orthographic drawing.
Chapter 3 Design and Conquer
Figure 3.10
43
This is the top orthographic drawing.
C ONCLUSION Make sure to create a design in 2D before entering the sculpting phase. Start with a character profile, listing attributes you would like to see and those attributes the creature cannot live without. These descriptions help paint the image in your mind, making it easier to draw. Using reference materials should never be underestimated or hastily done. The more planning, the fewer problems you’ll encounter later on and the better your creature will turn out. The methods and techniques for creating a strong design are beyond the scope of this book. Designing the exterior look of a creature is a book unto itself.
This page intentionally left blank
4
Base Mesh
n this chapter, we’ve established a base mesh to be sculpted on. The base mesh is the foundation of our model. It is a low-resolution, polygonal representation of our creature. Our goal is to finalize the look of our creature by digitally sculpting on the base mesh. In most productions, the final look of a creature or character is done in clay. The advantage to this process is in not needing costly hardware and software to finalize the creature’s look. However, in our process, we’ll substitute polygons and digital sculpting tools for clay.
I
45
46
Maya Feature Creature Creations, Second Edition
A DVANTAGES
OF
D IGITAL S CULPTING
Digital sculpting offers some unique advantages. First, there is the almighty Undo. Next is the ability to save multiple versions of different characters or ideas without having to start over. These two features combined make mistakes a thing of the past. Third, we have mirroring. A tremendous amount of time is saved by sculpting one side of the character and then duplicating it to the other side. Obviously, this isn’t an option with asymmetrical characters, but you can still duplicate pieces and parts to assist you in the endeavor. The last advantage is that when you are done with your digital sculpture, you are also finished with several important stages that come later in the CG character building process.
D ISADVANTAGES
OF
D IGITAL S CULPTING
Nothing is without its disadvantages—for example, choosing to sculpt completely on the computer costs substantially more money. Granted, you probably already have the equipment, but in a production pipeline, resources and time could be limited. Having one person sculpt in clay while another begins separate CG tasks is a huge benefit. It frees up resources to produce end products, rather than being tied up working out a design. Another drawback to going all digital is that an important thought process has been eliminated. It might be cliché, but something happens when you get your hands dirty—feeling the firmness of the clay, its texture, and how it blends together with itself. Perhaps it involves our innate desire to overcome great odds using only our fingers and a few primitive tools. Regardless of the reason, it stimulates our minds, spawning great ideas. Traditional methods should not be underestimated.
TUTORIAL B UILDING THE B ASE M ESH
The base mesh does not require edge looping or precision detail. All you need is a basic shape. A well-built model will come later. Right now, the focus is merely on shape and form. Using reference material from Chapter 3, “Design and Conquer,” the Warkrat’s form can be fleshed out in a simplistic manner. Step 1: Open the scene file CD:/Chapter4/Base Mesh/scenes/basemesh1.mb. In this scene, reference drawings have been set up on image planes in the appropriate viewports. If you are modeling your own design, substitute the images. Before modeling, it is a great idea to set up the Maya interface with some tools to help throughout the modeling pipeline.
Chapter 4 Base Mesh
47
First, let’s create a shelf with our most commonly used tools. Choose New Shelf by selecting the black arrow right above the Select tool from the toolbar. Use Figure 4.1 as a reference.
Figure 4.1 Create a new shelf by clicking on the black arrow.
Name the shelf Polygons. The first two tools to be added are not polygon-based tools but standard operations used in everyday workflow. They are Delete History and Freeze Transformations. To add Delete History to the shelf, go to Edit>Delete by Type>History dropdown menu and hold Ctrl+Shift and left-mouse click on History. This adds the tool to the shelf without executing the actual tool. Repeat the procedure for Freeze Transformations. These tools are used often, and they are good to help keep your geometry clean. Next, add the Split Polygon tool and Merge. Both are located within the Polygon module under the Edit Mesh drop-down menu. We’ll add more later. Heads Up Display Another useful tool is the Heads Up Display or HUD. Choose Polygon Count under the Display>Heads Up Display drop-down menu. The HUD is activated in the upper-left corner of the viewport. There are three columns of values represented: scene, selected object, and selected component. These values are useful to keep you informed. Check these periodically to make sure that you haven’t selected or added too much.
48
Maya Feature Creature Creations, Second Edition
Step 2: Now we are ready to get started. Create a primitive polygon cylinder by selecting Create>Polygon Primitives>Cylinder. Change the default settings to eight axis subdivisions. Using the image planes for reference, transform (move, rotate, and scale) the cylinder to match a fifth of the lower half of the creature’s leg. Figure 4.2 shows the outcome.
Figure 4.2 Transform the cylinder to match the creature’s lower leg.
Do not worry about getting the shape exact or matching both the front and side views. The goal is to rough out a shape quickly with the general proportions. Remember, this is still the design phase, not modeling. We are purely fleshing out a surface to sculpt on. Step 3: Select all of the faces on top of the cylinder. Choose Edit Mesh>Extrude. Extrude Tool The Extrude tool is a great tool for rapidly building out geometry. It has two different modes. When you first apply it, it extrudes faces in local mode. This means that it transforms the newly created faces, based off the direction of the face normals and the center point of the highlighted faces. There is also a global mode, toggled on or off by clicking on the encircled blue dot at the end of the black line emerging from the manipulator’s center. This changes the manipulator to match the world or global axis. For now, we want to remain in local mode.
Chapter 4 Base Mesh
49
Translate the faces in the positive Z to match the same thickness as the first section. Figure 4.3 shows the progress.
Figure 4.3 Extrude a row of faces and shape them to match the reference.
Step 4: We are going to use the Extrude tool a lot so let’s add it to our Polygon shelf. Continue extruding the top of the cylinder all the way up the leg. As you go, rotate and scale each section to match the flow or direction the leg is going. Extrude the bottom of the cylinder as well to the top of the foot. Use Figure 4.4 as a guide. Step 5: This step corresponds to scene CD:/Chapter4/Base Mesh/scenes/ basemesh2.mb. Now we’ll jump to a new section of the body, the foot. We want to start with a new cylinder. The surface flow or direction of the foot is perpendicular to the leg. It is easier and better construction to start with a new surface rotated properly than to bend an existing one. Ultimately, this makes for a better surface to sculpt on. Create the same cylinder from Step 1. Transform it to match the bulk of the foot, everything but the toes. Most importantly, rotate the cylinder so the top and bottom are where the toes would come out (see Figure 4.5).
50
Maya Feature Creature Creations, Second Edition
Figure 4.4 Extrude the top and bottom of the cylinder to rough out the leg.
Figure 4.5 Transform a new cylinder in the shape of the foot.
Chapter 4 Base Mesh
51
Step 6: Delete the faces from the bottom and top of the cylinder. Also delete the two faces touching the geometry of the leg. These areas will be connection points after you get all of the pieces fleshed out. Step 7: Create two more cylinders, one for the back toe and one for the front. Scale these cylinders about one-third the size of each toe. Figure 4.6 shows the progress so far.
Figure 4.6 Transform the cylinder to match the creature’s lower leg.
Step 8: Transforming extrusions can get us only so far. We still need to manipulate the components of the geometry to get a better shape. Again, we are not looking for accuracy, just a basic shape. Select the base of the foot. Select Edit Mesh>Insert Edge Loop Tool. Insert a loop in the center of the cylinder by left-clicking on any horizontal edge. Add two more loops closer to the ends of the cylinder. Figure 4.7 demonstrates. Step 9: Enter the Component mode and push and pull the vertices to line them up with the image, as seen in Figure 4.8.
52
Maya Feature Creature Creations, Second Edition
Figure 4.7 Add three edge loops to the foot geometry.
Figure 4.8 After adding three edge loops manipulate the components to refine the shape of the foot.
Chapter 4 Base Mesh
53
Step 10: This step corresponds to scene CD:/Chapter4/Base Mesh/scenes/ basemesh3.mb. Continue to extrude and shape the toes. To achieve a protruding nail, scale extruded faces without translating them locally in the Z. This leaves the faces flush with the end of the toe, and it gives you a new shape to extrude from. Push and pull the vertices to create the shape of a nail. Figure 4.9 shows an example.
Figure 4.9 Scale extruded faces without translating them in the local Z to create a nail.
Extrude the geometry, tapering it down to a tip. When the front toe is done, it can be duplicated and orientated for the second. The back toe is constructed in the same manner. Figure 4.10 shows the finished toes. Step 11: The next section is the torso. Create another cylinder, this time with four height divisions. Delete half of it lengthwise and transform it into position. You only need to work on one-half of the model. When it is done, a mirror duplicate is created and both sides are merged together. Move components to match the geometry with the reference. You can also snap four vertices to corresponding ones at the top of the leg. Figure 4.11 shows the completed step.
54
Maya Feature Creature Creations, Second Edition
Figure 4.10 Extrude the toes all the way to the tip of the nail.
Figure 4.11 The torso is shaped and vertices snapped to the top of the leg geometry.
Chapter 4 Base Mesh
55
Step 12: This step corresponds to scene CD:/Chapter4/Base Mesh/scenes/ basemesh4.mb. Next, let’s tackle the arm. It is modeled in the same manner as the leg and foot, but broken into five cylinders, three of which are fingers. Figure 4.12 shows its structure.
Figure 4.12 Five cylinders are used to make up the arm.
Step 13: The shoulders are created with half a cylinder and five height divisions. Position the cylinder according to Figure 4.13. Step 14: This step corresponds to scene CD:/Chapter4/Base Mesh/scenes/ basemesh5.mb. Shape the vertices of the shoulder cylinder to match the rest of the body and the reference images. Figure 4.14 shows the completed shoulder section. Step 15: The head begins with two half cylinders, both with four height divisions. The cylinder used for the neck is aligned to the shoulders, and the head cylinder is aligned to the neck. Figure 4.15 shows their positions.
56
Maya Feature Creature Creations, Second Edition
Figure 4.13 The head is made up of four identically created cylinders.
Figure 4.14 The completed shoulder section.
Chapter 4 Base Mesh
57
Figure 4.15 The completed shoulder section.
Step 16: Shape the two cylinders to match their respective parts in the reference material. The head cylinder is brought flush with the mouth. Both the top and bottom “quads,” or four-sided faces closest to the mouth, are deleted. Figure 4.16 illustrates.
Figure 4.16 Shape the head pieces and delete faces for the jaw and nose.
58
Maya Feature Creature Creations, Second Edition
Step 17: Two new half cylinders with four height divisions are created and positioned and shaped to form the nose and chin. Figure 4.17 illustrates the different head parts.
Figure 4.17 Form the nose and chin with two more cylinders.
At this point, you should be comfortable with creating cylinders and shaping them quickly. You may also find it easier to extrude or insert edge loops instead of using cylinders. Either way, the focus is on creating a basic sculptable surface. Step 18: All of the principal pieces are done. Now it’s time to put those pieces together. The hardest area to assemble is probably the hand. Let’s start there. Select the cylinder making up the palm. Delete the top and bottom faces of the cylinder, creating a hollow tube. This leaves eight faces. Earlier in the chapter, we added the Split Polygon tool to our shelf. We will use it to divide our geometry up to match the geometry from our fingers.
Chapter 4 Base Mesh
59
Split Polygon Tool The Split Polygon tool makes use of all three mouse buttons. The left begins a split or creates a new vertex. The middle allows you to click on the current vertex and relocate it. The right button completes the split without backing out of the tool, allowing you to start a new split immediately. To finalize the operation and exit the tool, press Return. Using the Split Polygon tool, add splits all the way around the palm to match the vertices of the fingers. Don’t worry about the geometry inbetween the fingers just yet. Use Figure 4.18 as a guide.
Figure 4.18 Add divisions all the way around the palm.
We also need to split the palm in the other direction to help shape it. Insert two edge loops. Go around the palm and snap the palm vertices to the fingers. Use Figure 4.19 as a guide. The only sections to be filled now are the areas between the fingers. A handy tool for this task is the Bridge tool. Select the top and bottom edges between two fingers. Choose Edit>Mesh>Bridge. A polygon is created between the two edges. Use Figure 4.20 as a reference.
60
Maya Feature Creature Creations, Second Edition
Figure 4.19 With the Snap tool on, snap the palm vertices to the finger vertices.
Figure 4.20 The Bridge tool easily creates polygons between two edges.
Chapter 4 Base Mesh
61
To complete the area, use Insert Edge Loop to divide the new face in half horizontally. Snap the new vertices to the insides of the fingers. Figure 4.21 shows the completed geometry. Finish the other open area in the same manner.
Figure 4.21 After inserting an edge loop, snap the vertices to either side of the fingers.
Step 19: All of the pieces need to be combined before the geometry can become one. Select everything and choose Mesh>Combine. This tool does not actually weld anything together, but it does make them one. If you select any of the vertices that were sitting atop one another, like those in the palm and fingers, you will see in the HUD that there are two vertices selected and not just one. Vertices occupying the same space are difficult to detect, but easy to get rid of. Enter Component mode and select all of the model’s vertices. Choose Merge from the Polygon shelf. Keep your eye on the HUD to see the vertex count drop. Depending on the scale of the model, you may also see a lot of vertices merge together that you don’t want. Click polyMergeVert in the Channel Box. This opens the options for the tool you just applied. Change the Distance parameter to .001. This prevents any unwanted merging. After all, we are only trying to merge the vertices sitting on top of one another. Setting a distance of 1⁄1000 should leave everything else alone.
62
Maya Feature Creature Creations, Second Edition
Step 20: The gaps in the geometry can now be filled in. Let’s start with the arms. Add two edge loops down the length of the body as shown in Figure 4.22.
Figure 4.22 Insert two edge loops down the length of the body.
Step 21: Delete four faces from the body directly across from the arm. This allows you to attach the arm. Use Figure 4.23 as a guide. Step 22: Select the border edge from the arm and body. Choose Bridge. The gap is filled. The Bridge tool connects the closest vertices across from one another. If the bridge appears twisted, then undo and move the vertices closer to one another. Figure 4.24 shows the completed connection. Step 23: The extra loops added to the body are now carried down the leg. By doing this, it also gives you enough geometry to connect the toes (see Figure 4.25).
Chapter 4 Base Mesh
Figure 4.23 Delete the four faces where the body and arm meet.
Figure 4.24 Using the Bridge tool fills in the gap between the arm and body.
63
64
Maya Feature Creature Creations, Second Edition
Figure 4.25 The body edge loops are carried down the leg.
Step 24: Before attempting to attach the toes, the end faces need to be deleted. Remove each face. Using Bridge, Append to Polygon, or a mixture of both, fill in the gaps for the foot. Figure 4.26 shows the completed foot.
Figure 4.26 The gaps are filled in completing the foot.
Chapter 4 Base Mesh
65
Step 25: To attach the hand, merge the vertices around the palm to match the number of edge rows in the arm. Only merge the extra details or edges close together. Bridge the two surfaces together when the edge count matches up. If you end up with an extra row still, carry up the arm. Use Figure 4.27 as reference.
Figure 4.27 Clean up the hand and connect it to the arm.
Step 26: Go through the rest of the model and connect all of the pieces. Add more edge loops or split faces where needed. Try to keep the geometry entirely built with quad faces. It is not totally necessary, but quads divide better, and therefore can be sculpted with greater precision. You do not want anything greater than a four-sided polygon. These can cause all sorts of problems, even crashing when subdivided and sculpted. To find these, choose Select>Select Using Constraints. This opens up a selection interface. Select the model and enter component mode. Choose faces from the Selection Mask toolbar. Notice that the selection interface updates.
66
Maya Feature Creature Creations, Second Edition
The first option in the interface is Constrain. Next to it are four radio buttons to choose from. Choose All and Next to constrain the selection on our currently selected object. Under the Properties tab, choose nSided. If you have any faces with more than four sides, they are selected on the model. Figure 4.28 shows an example. Continue to experiment with the Select Constraint tool to find any erroneous geometry.
Figure 4.28 Clean up the hand and connect it to the arm.
When the model is complete, go back and reshape any areas that need a little touch-up. You can also add a mouth cavity and some teeth. It is better to leave those separate, to make it easier to sculpt on. Figure 4.29 shows the finished base mesh. You can find the corresponding scene file here at CD:/Chapter4/Base Mesh/scenes/ basemesh6.mb.
Chapter 4 Base Mesh
67
Figure 4.29 Here is the completed base mesh.
C ONCLUSION Do not get carried away with the base mesh. Its only purpose is to provide a sculpting surface. The geometry itself is tossed away after the sculpture is done. It is meant to be quick and dirty, as it is a rough design with little to no detail. Detail will be worked out in the sculpture. Traditional methods follow this same procedure; the idea is sketched, sculpted, and then refined. Working out the ideas in your head is far more important than modeling your character. If you have good preproduction design, modeling becomes more like tracing. Use your creativity where it counts, and not working out complex edge flow while trying to achieve detail.
This page intentionally left blank
5
Sculpting in 3D
aya has dedicated sculpting tools for manipulating all types of geometry. You’ll find that using polygons is the most effective geometry in which to sculpt. There are a few of reasons for this. First, polygons are the easiest to draw, meaning there is no interpolation or averaging to represent the shape. Polygons are what they are—what you see is what you get! Second, sculpting tools only affect vertices. The more vertices you have, the more detail you can sculpt. The advantage of the other types of geometry, such as NURBS or subdivision surfaces, is that you can describe a surface using fewer vertices. That’s good for certain applications, but not so good for sculpting. Finally, polygons support irregular geometry. This means that it is possible to split the geometry anywhere and in any direction, making polygons the most malleable surface.
M
69
70
Maya Feature Creature Creations, Second Edition
W HAT I S D IGITAL S CULPTING ? More and more computers have become extensions of us. Digital sculpting allows us to lift the limitations of vertex wrangling and polygon pushing, enabling us to model freely, as if we were sculpting in soft clay. Applications such as Mudbox and ZBrush provide tools to carve millions of polygons. The geometry becomes a blank canvas. You can apply detail anywhere you want it, without worrying if there is enough geometry to support it. This form of modeling has pushed photo-realistic characters to the next level. It has also sped up the creative process. When did our pipeline become fast enough to animate 3,000,000 textured triangles? It hasn’t. Even though we sculpt a million plus polygon model, it doesn’t necessarily mean we use it. The point of sculpting a character to this degree is to extract three-dimensional information into two-dimensional texture maps. The maps are applied to a low-resolution version of our sculpted character. While the sculpted model might be 3,000,000 polygons, our low-resolution model might only be 30,000 polygons. The maps are then used to re-create the detail on the low-resolution model through various techniques. In the end, our lo-res model is made to look like our hi-res model. There are two maps in particular that are of great value to our pipeline: the normal map and the displacement map. NORMAL MAPS Normal maps offer great advantages. They are used in both film and game production for the same reason—to speed up render time. Even in a real-time environment, you still have to render. It is possible to render millions of polygons in real time. It would, however, be the only thing on the screen. In a game application, this would not be very exciting. A normal map takes those millions of polygons and paints a picture of them instead. Placing the picture back onto your model gives it the look of millions of polygons. To make this work, normal maps replace existing normals of geometry at a per-pixel level. By controlling the normals in such a manner, it’s possible to give your models the illusion of greater detail without actually having the detail modeled, basically making a low-polygon model appear to be a high-polygon model. It works by using red, green, and blue values to represent x, y, and z. For example, red values control the direction of the normal in positive and negative x. Since they control the normals, they react well to a wide variety of lighting setups. This makes them better than bump maps. Using normal maps, you can effectively eliminate millions of polygons. Figure 5.1 is a comparison of a model without normal maps and the same geometry again, with normal maps. Full details about normal maps are discussed in Chapter 8.
Chapter 5 Sculpting in 3D
71
Figure 5.1 The geometry on the left was rendered without normal maps, while the geometry on the right was rendered with a normal map.
DISPLACEMENT MAPS Displacement maps have a similar purpose to normal maps in that they add detail to your model. Unlike normal maps, they increase the amount of polygons used in a model. They also physically move vertices. Through displacement mapping, it is possible to re-create the sculpture on a low-resolution piece of geometry. Figure 5.2 shows two different models. The model on the left was rendered without a displacement map while the model on the right was rendered with a displacement map. What is the point? Being able to postpone having to deal with millions of triangles saves you valuable production time. It is far greater to kick off a render and go to sleep than to wait for your computer to update every time you change your camera view. Imagine waiting just five seconds for your viewport to refresh every single time you adjusted the camera or changed views. It would add up quickly, but not as quickly as your level of frustration. By putting off those millions of triangles, you can work freely. You can texture, rig, and animate almost in a real-time fashion, allowing you to focus on creative aspects. Having to wait on your computer breaks your train of thought and eventually your patience.
72
Maya Feature Creature Creations, Second Edition
Figure 5.2 A comparison between normal geometry and geometry with a displacement map.
THE DIFFERENCES BETWEEN NORMAL MAPS
AND
DISPLACEMENT MAPS
Sculpted normal maps and displacement maps function very differently. When rendered properly, they contribute to the look of the creature in different ways. Our goal is to reduce render time. Even in a high-resolution film environment, with a dedicated render farm, it is critical to reduce how long it takes to render a single frame. Simple math makes this painfully obvious. For example, if it takes 45 minutes to render one frame and you have 30 seconds or 720 frames (at 24 fps) to render, it would take 540 hours or 22 1⁄2 days to finish. That is for 30 seconds of animation based on film speeds! If you are going to video or NTSC at 30 frames per second, it increases to 675 hours or 28 days to render. Keep in mind that this is rendering 24 hours a day, nonstop. Anything you can do to reduce render time is beneficial. Displacement maps actually generate geometry—the more geometry, the higher the render time. Normal maps alter the shading of a surface to give it the appearance of more geometry. Its effect on render times is negligible. Small details, like wrinkles, require a lot of triangles and do not affect the overall shape of your model. By putting that information into the normal map and any shape altering information into the displacement map, you can reduce your polygon count drastically without sacrificing the look of your creature, thus saving on render time.
Chapter 5 Sculpting in 3D
S CULPTING
IN
73
M AYA
There are several dedicated software packages available on the market today, all of which offer a great tool set. Learning these packages can be extremely difficult to plug and play. The key is to remember that sculpting is an art. The tools do not make for good sculptures, artists do. With that said, we are going to use Maya to begin sculpting our character. Maya’s tools are limited in comparison to dedicated software packages, but nonetheless are still very powerful. Maya has a large overhead. The ability to create an ocean with a sinking ship is at your fingertips. Because of this, it cannot push as many polygons as dedicated sculpting software can. This simply means that we must be judicious in our process. By breaking up the model into smaller sections, we can achieve high-resolution surfaces suitable for sculpting. MAYA VERSUS DEDICATED SCULPTING SOFTWARE Dedicated “sculptware” comes with more tailored tools for the job. Some of these can be mimicked in Maya, some cannot. Most artists choose a few tools and ignore the rest. However, having those extra tools is extremely worth it for that one time you need them. As far as actual sculpting, Maya can compete. One major difference, though, is in the way Maya’s sculpting tools operate. Maya uses stamps to apply a brush stroke onto a surface. Creating a smooth line is actually done by rapidly imprinting the surface with the same stamp as you paint or sculpt a stroke. Each brush makes an impression by stamping the surface. Although effective, it is not as definitive as a brush, like those in sculptware. Maya takes some time to get up and running and a little experimenting to get the desired effect. Maya can sculpt or “push” about 450,000 faces on a 3.6GHz processor with minor performance hits. In order to achieve the desired detail, it is necessary to break the model up into smaller pieces, each made into 300,000 polygons on average. Utilizing Maya’s Layer editor, additional detail is added in specific locations, bringing each chunk to about 450,000 polygons. When done, the pieces are assembled together to create a 3,000,000 to 4,000,000 polygon model. SCULPTING TOOLS Maya’s polygon sculpting tools are brief and contained in the Sculpt Geometry Tool options. This imposes a false impression of their true potential. Open the Sculpt Geometry Tool’s options from within the Polygon module under the Mesh drop-down menu. A seemingly unimpressive window is displayed and is shown in Figure 5.3. Before harnessing this tool’s power, let’s go over the basics.
74
Maya Feature Creature Creations, Second Edition
Figure 5.3 Here are the Sculpt Geometry Tool options.
The Sculpt Geometry Tool is laid out in typical artisan brush fashion. The first tab, entitled Brush, controls the size and shape of the brush itself. The next tab, Sculpt Parameters, defines what the brush does and how it does it. This is where most of the power resides. The third tab, or Stroke, controls how the brush is applied. We will examine all of the tools and features thoroughly while we sculpt. PUSH
THE
LIMITS
To achieve a high level of detail, it is necessary to break up the model. The first step is to determine how many polygons your system can effectively handle. This is done by generating a primitive object, like a polygon sphere, and smoothing it multiple times. The Smooth tool is located under Mesh>Smooth. The defaults are fine to use. After the node has been added to the sphere, you can click it in the Channel Box and make changes. It is named polySmoothFace followed by a number; in this case, it is the only one added to the sphere and therefore numbered 1. Change the divisions to the highest possible amount, which is 4. Select Poly Count under Display>Heads Up Display to see the actual number of triangles created.
Chapter 5 Sculpting in 3D
75
Now try sculpting on it. Select the surface in Object mode and choose Mesh>Sculpt Geometry Tool. Using the defaults, sculpt on the surface to see if there is any performance lag. As soon as you notice a significant lag in your system’s performance, you have gone too far. If you used the defaults for a polygon sphere, your poly count should be in the ballpark of 200,000 triangles. If your system is doing fine, you can add more divisions. At this point, you could either add another polySmoothFace node, which would add about 600,000 triangles, or go to the polySphere1 node and increase the number of subdivisions gradually for both the axis and height. Adding divisions is a much better way, allowing you to slowly increase the triangle count. Use increments of 2 to work your way up, testing any one of the sculpting tools as you go. The final number you end up with is your limit. You can go over, but it will slow you down. Precision sculpting is difficult when your brush’s movements do not match your mouse or stylus. With the knowledge of a maximum polygon count, you can break up your model. Load MayaSculpt1.mb from the Chapter 5 folder on the CD. The creature has been broken up into eight separate sections. Your character’s complexity determines the amount of sections you end up with. As a rule, break the pieces into known parts, such as arms, legs, hands, and feet. Also, only half of the creature is sculpted on. This helps cut your workload down. After one side is complete, it is mirrored. At that point, changes can be made to either half to avoid having creatures that are perfectly symmetrical. SCULPTING
IN
LAYERS
Where you begin sculpting is not critical. We will begin with the head. It sits at 1,404 triangles. It is important to keep this mesh and not add triangles directly to it. Its low polygon count is useful for making broad changes. Using Maya’s Layer editor, geometry is separated by levels of detail. The first layer holds the base mesh. Each subsequent layer holds a higher-resolution model. Essentially, layers of smoothed geometry are used to manage sculpted detail. The following tutorial takes you through the process of setting up layers for sculpting on the Warkrat’s head.
TUTORIAL T UTORIAL : L AYERS
Step 1: Load the scene file CD:/Chapter5/Sculpting/scenes/sculpt1.mb. Select the head geometry. Open the tool options for Proxy>SubDiv Proxy. Use all of the defaults, except choose Keep for SubDiv Proxy Shader under Display Settings. Choose Smooth from the bottom of the tool options window to apply the tool. The surface is subdivided. Open up the Hypergraph. You now have two nodes called head and head1 under a transform node called headSmoothProxyGroup. The head node is the base mesh and head1 is the new smoothed surface.
76
Maya Feature Creature Creations, Second Edition
Step 2: Select head1. Create a new layer and add head1 to it. You now have two layers you can sculpt on. Anything done to the original head is propagated to layer1 or head1. You can go between layers by changing the visibility of each layer. You should only keep one layer visible at a time. To keep things better organized, change the name of the Head layer to Head_Layer1 and Layer1 to Head_Layer2. Step 3: Select head1 and choose Proxy>SubDiv Proxy again. No need to open the tool’s options because your previous settings are intact. Select the new head or head2 and add it to a new layer. Repeat one more time for a total of four layers, including your Head_Layer1 layer. Change the names of the new layers to match the established naming convention. Step 4: Depending on your computer’s performance, you can go back and add more polygons to the first layer of detail, by modifying the polySmoothProxy1 node. This is accessible through the Channel Box, just like the polySmoothFace node described earlier in this chapter. Change the Exponential level to 2. This gives us a total triangle count on Head_Layer4 of 359,424. At any point in the process, it is possible to go to a lower level and make changes. You can sculpt, add, or remove geometry as needed to refine the overall shape. The changes are carried through to the detail of the higher layers. Figure 5.4 shows all of the layers offset from one another for demonstration purposes only.
Figure 5.4 Here are all of the smoothed layers offset from one another.
Chapter 5 Sculpting in 3D
77
TUTORIAL T UTORIAL : S CULPTING THE H EAD
Step 1: Load the scene file CD:/Chapter5/Sculpting/scenes/sculpt2.mb. The scene has all of the layers set up. Let’s add some defining geometry for the eyes and nostrils. The extra geometry will help with the sculpting later on. Only add this to the base mesh, not to any of the smoothed layers. Anything added to the base is automatically added to your smoothed layers, but it does not work the other way around. It is possible to add geometry to the smoothed layers, and okay to do so, but it is just more difficult to manage. Hide all of the layers except for Head_Layer1. Using the Split Polygon tool, create a loop for each, as seen in Figure 5.5.
Figure 5.5 Using the Split Polygon tool, draw the outline for the nostril and eye socket.
To accomplish loops of this nature, it is first necessary to open the Split Polygon tool options and make some adjustments. Uncheck the option for Split only from edges. Without this on, it is possible to create splits inside of a face without connecting to an edge. This is extremely useful for altering the flow of geometry and maintaining quads.
78
Maya Feature Creature Creations, Second Edition
Another important feature to point out with the Split Polygon tool is the ability to hold the left mouse button down to relocate a point. In Chapter 4, the middle mouse button is described as having this capability. The difference is that the middle mouse button allows you to move a vertex after you have created it, while holding down the left mouse button moves it during creation. Step 2: At either end of the eye socket are two six-sided faces. They may look like quads, but they have six edges. To get rid of these, create a loop to cap them off. The Split Polygon tool will not let you do this without completing a few edges first. Choose the Split Polygon tool. To pick up exactly where an existing vertex has stopped, it is easiest to click an edge, holding the left mouse button down and sliding the vertex until it stops. Once there, you can click to create a new vertex. Follow Figure 5.6 and right-click when done.
Figure 5.6 Split up the six-sided faces encircling the new loops.
Finish the loop by adding two more edges like those in Figure 5.7. Repeat the steps to clean up the other side of the eye socket as well. The loops need to be done this way. If you try to create the loop first, the tool fails without error. These loops also keep everything in quads.
Chapter 5 Sculpting in 3D
79
Figure 5.7 Finalize the loop by capping off the edges.
Step 3: The last thing you need to do is add an additional loop to the inside of the eye. With the additional loop, you have enough geometry to sculpt on. The Insert Edge Loop tool will not create the desired loop. Instead, you can add it with the Split Polygon tool or extrude the faces and uniformly scale them down just a little. Figure 5.8 shows the finished eye socket. Step 4: The nostril is a little more complex but can be done in the same manner. Cap off all of the stray vertices into triangles or quads on the nostrils. Basically, split any five-sided faces. Split another loop inside the existing one. Shape the newly placed vertices and make all of the faces into quads. If unavoidable, a few triangles won’t hurt. Use Figure 5.9 as a reference. When you are done making modifications, be sure to delete your history. Leaving history slows the system’s performance. Don’t worry because this does not affect the layers of geometry already established. Take a look at the higher layers to see how the geometry has been altered. Figure 5.10 shows Head_Layer3. All of the modifications from the base geometry are included.
80
Maya Feature Creature Creations, Second Edition
Figure 5.8 Add an internal loop to the eye socket. The loop presented was added with the Extrude tool.
Figure 5.9 Split up the five-sided faces encircling the new loops.
Chapter 5 Sculpting in 3D
81
Figure 5.10 The second to the highest layer reflects the changes from the layers underneath it.
Step 5: The base geometry was built without concern for detail. Starting with the base layer, your lowest level, you will sculpt something more interesting. At this point, you are on our own. You can experiment and flesh out ideas right in your geometry. Hide all of the layers except Head_Layer1. Select the geometry and open the Sculpt Geometry Tool. Before sculpting, you need to calibrate your tools to the model’s scale. Move the brush over the geometry. Change the size of the brush by holding b and the left mouse button. Move the mouse left or right and size the brush so it fits nicely on the surface, about one-sixth of the surface’s size. In the Sculpting tool options, set the Sculpt Parameters Operation to Push. Sculpt on the surface to see the effects. A deep line is cut into it. You can gauge how far the geometry is going to move by the black arrow emitting from the brush’s center. This is only partially accurate, though. Under Brush, change the Opacity to .1. Look at the size of the black arrow again. It hasn’t changed. Sculpt on the surface. The stroke is one-tenth as deep as the first time. The black arrow only registers the Max Displacement of the brush. This attribute is located under Sculpt Parameters. Change it to .1. Now the black arrow reflects the change. If you hold the left mouse button down and continue to
82
Maya Feature Creature Creations, Second Edition
sculpt in the same area, the surface continues to push in until in reaches .1. With the opacity set to one and the Accumulate Opacity attribute, located under Opacity, checked, it takes about 10 times to reach the Max Displacement. The next operation, Pull is identical to Push, except, of course, for the direction it moves the geometry. Experiment with these attributes to get comfortable. The default settings cause the geometry to be influenced in the direction of the normals of the surface. If you want to push or pull the geometry in a specific axis, you can do so by changing the Reference Vector in the Sculpt Parameters section. Arguably the most important tool in the sculpting arsenal is the Smooth tool. Located next to the Pull operation, it is the tool that blends, corrects, and softens. This leads us to the basis of how we sculpt. First, add detail with Push or Pull, and then blend it in with Smooth. Trying to accomplish anything specific with a single stroke is ambitious, to say the least. The Smooth tool takes some practice. It works like the others but works best in small doses. Instead of sculpting one line, the Smooth tool is often rubbed over the surface repeatedly to achieve the desired results. Step 6: Take a look at Figure 5.11. The changes are subtle but important. The cheekbone has been pulled out and either side smoothed. The skin between the lips and cheekbone was pushed in to get a drawn look from the creature’s open jaw. Around the eye socket was pulled out to reflect an imaginary skull underneath. The skin under the jaw and neck was pulled to show gravity and fat. All of these changes are “built up,” setting the brush’s Max Displacement to the highest desirable height, usually a pretty low number. The brush’s Opacity was set to one-tenth of that. Now, you can stroke the surface until you get something you like, finishing it off by going around the detail with the Smooth tool. Step 7: Hide Head_Layer1. Set Head_Layer2 to visible. You can now start to add some defining attributes to the creature. Examine Figure 5.12. The lips are more pronounced and the eye is taking on some definition. A default NURBS sphere for the eyeball was added to aid in sculpting. It was placed inside the eye socket and kept as a separate NURBS object.
Chapter 5 Sculpting in 3D
Figure 5.11 Using the Sculpt Geometry Tool, subtle detail was sculpted into the base mesh.
Figure 5.12 The lips and eyes are sculpted with the Sculpt Geometry Tool.
83
84
Maya Feature Creature Creations, Second Edition
You will find that the more geometry or the finer the geometry you are sculpting, the more smoothing will be required. It is very easy to create unwanted bumps or ridges. To compensate, it is sometimes beneficial to use a larger sized brush with a lower opacity. This is still the artistic phase, so take your time and don’t get frustrated. Another important technique to remember is that you can always go back to Head_Layer1 and makes changes with the sculpting tools or by components with any of the transformation tools. Notice in Figure 5.12 how the nostril has more of a slanted look. Instead of sculpting, the vertices were simply translated down on Head_Layer1. Step 8: As you go up layers, the details you sculpt get smaller and smaller. Take a look at Figure 5.13. Details from subsequent layers are refined and sharpened. Finer details, like those on the bridge of the nose and lips, can now be added.
Figure 5.13 Finer detail is added to Head_Layer3.
Step 9: The most exciting and difficult layer to work on is the final layer or Head_Layer4. It is exciting because it is where the creature comes to life. This is where you add the finishing touches, such as skin pores, defects, and fine wrinkles—all of the things that make a character
Chapter 5 Sculpting in 3D
85
unique and alive. The layer is difficult because of the amount of triangles you have to deal with. There are some additional tools to help, however. Take a look at the Sculpt Geometry Tool options. At the very end of the brush profiles is the Shape Brush profile. Here, you can load a custom brush or use one of the many brushes that come standard with Maya. Click the Browse button and choose skinBump.jpg. Choose either Push or Pull as the operation and test the brush on the surface. You can now see for the first time how the brushes are actually stamps. The jpeg image is stamped repeatedly onto the surface in the direction of the brush stroke. Figure 5.14 shows an example.
Figure 5.14 The skin bump image is rapidly stamped onto the surface.
For some images, this works well, but not for the skin bump image. To change this, open the Stroke parameters. It is the tab below Sculpt Parameters in the Tool Options window. Change the stamp spacing to .7. Sculpt again and observe the differences. Figure 5.15 demonstrates. To achieve the Warkrat’s skin texture, a simple brush was painted in Photoshop. Figure 5.16 shows the brush and Figure 5.17 shows its application. You can also find the jpeg on the CD in the Chapter 5\ Sculpting\images\warkratSkin.jpg.
86
Maya Feature Creature Creations, Second Edition
Figure 5.15 By changing the stamp spacing value to .7, you reduce the amount of stamps per stroke.
Figure 5.16 A brush is hand-painted in Photoshop for the creature’s skin texture.
Altering the size of the brush can drastically affect the results. When testing a new brush, make sure to modify the brush radius to see its influence. For the detail on the Warkrat, the Stamp Spacing was set to .1, Max Displacement .02, and Brush Radius to .1538. The amount of geometry you are sculpting also has a huge impact. The finer the details in the image, the finer the geometry needs to be. Chances are you will find you do not have enough geometry to achieve the amount of detail you are looking for. Adding things like skin pores could require millions of triangles.
Chapter 5 Sculpting in 3D
87
Figure 5.17 The skin texture is sculpted onto the Warkrat’s head. The contrast of the image has been adjusted for more noticeable results.
M UDBOX You’ve had a taste of what it is like to sculpt digitally. To really exploit the sculpting process, dedicated “Sculptware” is necessary. Mudbox, also a part of Autodesk, is a great complement to Maya. Crossing over to Mudbox from Maya is second nature. It has the same view or camera controls, similarly named tools, layers, and hot keys. Full details on the workings of Mudbox are out of the scope of this book. We will, however, discuss techniques and correlations between sculpting in Maya and Mudbox. Understanding their strengths and weaknesses helps accelerate the sculpting process. Figure 5.18 shows the Mudbox interface. Technique 1: Start by creating layers. The layers in Mudbox only hold detail. This is an interesting concept and one to take advantage of. Nothing is placed on a layer until you begin sculpting. Each layer can hold specific detail. For instance, you could sculpt an open wound on the character’s forearms while on layer 2. If you made layer 2 invisible, just the detail you sculpted would disappear. Adding to the power, you can change the transparency of a layer and fade the detail in or out. So unlike Maya, where layers hide an entire piece of geometry, Mudbox layers only hide what you did to the geometry.
88
Maya Feature Creature Creations, Second Edition
Figure 5.18 An example of the Mudbox interface.
Technique 2: Taking technique one step further allows us to organize not only fine detail but also everything we sculpt. Use layers to separate fine detail from sculpted changes to the form. By doing so, it is easy to extract normal maps with one pass and displacement maps in another. This is very important. Adding too much detail to a displacement map can actually cause more triangles to be rendered than what was originally sculpted. Watch the silhouette of the model. If what you sculpt makes a drastic change to the shape, then it should be included into the displacement layer. If the change is minimal or non-existent, put it in the normal or detail layers. Once you get started, you will find a rhythm. For the most part, anything used for displacement is in the bottom layers and anything used for normal maps is located in the top layers. It really doesn’t matter how many layers you use, just as long as there is a separation between the two groups. You can export any layer.
Chapter 5 Sculpting in 3D
89
Technique 3: Making things appear as if they are under the surface of the skin, like veins and tendons, can be done with three tools. To create veins, use the Bulge tool to raise the surface. Figure 5.19 shows an example.
Figure 5.19 Use the Bulge tool to raise the surface in a vein-like pattern.
Next, go over the vein with the Smooth tool. Make the brush size twice as large as the vein. Set the strength fairly low, around 10. Go over the vein once following its curvature. Smooth the beginning and end to blend the vein back into the skin. If it still looks too pronounced, then try smoothing it with random strokes perpendicular to its curvature. This also gives it a more natural look. Figure 5.20 shows the progress. For the finishing touches, follow the vein’s contour with the Pinch brush. The brush size should be half the size of the original bulge stroke and the strength around 3. Adjust the strength depending on how severe you want the vein’s appearance to be. Figure 5.21 shows the finished vein. You can further adjust the vein’s look by altering the transparency of the layer. Figure 5.22 shows the vein with the layer’s transparency set to 50%.
90
Maya Feature Creature Creations, Second Edition
Figure 5.20 Blend the vein back into the skin with the Smooth tool.
Figure 5.21 Go over the vein again with the Pinch brush.
Chapter 5 Sculpting in 3D
91
Figure 5.22 The layer’s transparency is set to 50% to soften the overall look.
Technique 4: Use curves to sculpt specific features (see Figure 5.23). Curves in Mudbox are very similar to curves in Maya, except in Mudbox, you can use them as a guide for sculpting strokes. Once you create a new curve, you left-click to drop a new point. Holding down the left mouse button allows you to manipulate the current point. Pressing Enter completes the curve and exits curve creation. You can use Stroke on Curve to affect the exact area the curve sits over. To do this, you must enter a stamp amount. This works just like the stamp spacing in Maya, which means the higher the amount, the greater the accuracy. Curves do not sit on the surface. They are basically drawn on the camera lens. You can hold down c on the keyboard to manipulate the curve similarly to the camera. Left mouse will rotate the curve about its center. Middle mouse translates it, and the right mouse scales it.
92
Maya Feature Creature Creations, Second Edition
Figure 5.23 Use curves to create specific detail.
Technique 5: You can use stencils to essentially rub detail onto the model. Just like curves, stencils are fixed to the camera. They can be manipulated in the same fashion by pressing s on the keyboard. Figure 5.24 shows a skin-like stencil.
Figure 5.24 Stencils allow you to transfer 2D detail onto your 3D model.
Chapter 5 Sculpting in 3D
93
Stencils can be a bit tricky to use, especially for skin. A good idea is to paint more of the stencil than you need. With the Erase tool, go back and take out the extra. You can then realign the stencil to what you have already sculpted and begin again. Figure 5.25 illustrates how stencils can be used for a creature’s skin.
Figure 5.25 Using a stencil, the Warkrat’s skin was sculpted.
C ONCLUSION You can see some big similarities in both function and technique between the Maya sculpting tools and Mudbox. After working with both, you also can see some major differences. Clearly, as dedicated “sculptware,” Mudbox reigns supreme. So why learn the Sculpt Geometry Tool? There are several reasons. The Sculpt Geometry Tool is based upon the Artisan tool set. This is the core painting interface inside of Maya. It is used for all of the brush-based tools. Learning one, such as the Sculpt Geometry Tool, really acquaints you with all of them. Another reason is to make quick changes or to do preliminary work inside of Maya. A third reason is that Maya allows you to sculpt on all types of geometry, like NURBS and subdivision surfaces. Finally, sculpting in Maya means that you can always revert to traditional tools. You can select a vertex at any time and simply translate it.
94
Maya Feature Creature Creations, Second Edition
With either application, remember that it is about the art and not the tools. Sculpting in 3D may take some getting used to, but if you are already acquainted with modeling, chances are it will be like a long-lost friend. The Warkrat sculpture is finished. The final version can be found at CD:/Chapter5/Sculpting/scenes/ sculpt3.mb. Up next is extracting the 3,000,000 faces of detail into manageable texture maps. Figures 5.26 and 5.27 show the finished look of the creature.
Figure 5.26 The finished Warkrat sculpture from the front.
Figure 5.27 The finished Warkrat sculpture from the back.
Part
III Modeling
95
This page intentionally left blank
6
Modeling a Creature (Warkrat)
hapter 5 was dedicated to sculpting a high-resolution mesh. The result was a polygon model with 3,000,000 faces. Although it is cool to look at, it’s not very practical to work with. Too much geometry is unmanageable with present-day tools. Our goal for Chapter 6 will be to trace the sculpted high-resolution mesh in a three-dimensional format in order to create suitable geometry to push through the rest of the pipeline.
C
97
98
Maya Feature Creature Creations, Second Edition
S UITABLE G EOMETRY There are a few definitions of what suitable geometry is. The first and foremost is a reduction in the amount of polygons used. The creature’s polygon count needs to be low enough to manipulate it with little or no lag, but high enough to deform and endure the riggers of collision-based deformations. The target for the Warkrat creature is around 10,000 triangles. This is pretty low by film standards and a little high by game standards. That puts us right in the middle. In actual production, more polygons would be employed. Of course in a production, more than one person would be working on the character. A low triangle count is used to keep things moving. Reducing the amount of geometry means a loss of detail. Using only 10,000 triangles brings us right back to Chapter 4 with the base mesh created there. The difference is the surface flow of the geometry. Good surface flow is also a vital part of suitable geometry. When the base mesh was created in Chapter 4, the geometry was constructed in a simple and uniformly spaced manner. Tracing over the 3D sculpture allows us to place vertices where they can make the biggest difference. We can create isolated edge loops for muscles, arrange vertices to represent the highest and lowest points of detail, and put edges in areas of high deformation. Yet another advantage is making sure that the skin direction is transverse to the muscle fiber direction. All of this results in a finely optimized polygonal mesh with good surface flow. That still doesn’t get us the look of the three-million polygon sculpture. In fact, our model tends to look worse than the uniformly built mesh from Chapter 4. The reason behind this stems from a lower amount of geometry being positioned to show all of the greatest changes of the surface. This yields a surface that tends to look jagged. So how do we get the look of our sculpture without the overhead? Good surface flow is where we begin, but the real answer lies in texture maps. Through a process called baking, it is possible to capture the sculpture’s detail and put it onto a 2D image. During this process, different types of maps can be derived. To reclaim all of the detail from the sculpture, we need to use two different types of maps, which are normal and displacement. Once the information is transferred from the 3D model to a 2D image, we can apply it back to the restructured base mesh. The creature can then be completed using a limited amount of triangles. When rendered, the maps alter the geometry to make it look just as good as the sculpture itself. Having good surface flow works hand-in-hand with the textures, and they end up complementing one another.
Chapter 6 Modeling a Creature (Warkrat)
99
T RIANGLES V ERSUS Q UADS There is a lot of talk about the use of triangles in a model or making the model all quads. The bottom line is that quads definitely deform better, but are triangles okay? Absolutely! If we go back a step, rendered geometry is nothing but triangles anyway. To truly understand the battle, it is important to look beyond the rendered frame. When it comes to what we see, how much does it really matter? At render time, all quads become triangles. When viewing a shaded model, it really doesn’t matter. As long as the model looks good, quads, triangles, even five-sided faces can co-exist peacefully. The problem isn’t in the display. The problem lies in the tools you use on top of the triangles or quads. Subdivision algorithms are typically applied at render time. These nodes add geometry to make the surface look smoother. If there are triangles in the model, the algorithm subdivides the triangles at a higher level, creating more geometry than really necessary. Take a look at Figure 6.1. The left image shows a model with triangles. The right image shows the results of subdividing the surface. Look what happens to the triangles.
Figure 6.1 The cylinder on the left has two triangles. The image on the right is the same cylinder converted to subdivision surfaces.
The next image, Figure 6.2, shows a cylinder with all quads. This adds a few extra triangles to the base mesh, but look at the difference between the two figures in how Figure 6.1 looks when converted to subdivision surfaces.
100
Maya Feature Creature Creations, Second Edition
Figure 6.2 The cylinder on the left is looped to have all quads. The image on the right is the same cylinder converted to subdivision surfaces.
The surfaces may look identical when rendered, but the underlying structure is different. This causes the surface to animate differently. Will it be so altered as to destroy the deformations of your character? Probably not! It is advisable though to avoid adding triangles to areas of high deformation to avoid any unpredictable results. When it comes to simulating skin, we run into a related problem. With Maya’s nCloth, cross links are created with all quads. They are not created for triangles. Take a look at Figure 6.3, which is a comparison of quads versus triangles when nCloth is applied to both. To be clear, there is more happening than just a few extra triangles here. We are really seeing the difference between a quad loop and a triangulated loop. A triangulated loop is a termination of two rows of edges into one vertex. Watch the movie of the animation at CD:\\Chapter 6\Movies\nClothExample.mov. Notice how the vertices all move approximately the same, but there is stiffness to the cylinder with triangles. The all-quad cylinder deforms more freely and reacts more quickly. Quads deform better. It doesn’t always make a difference. Some areas should be naturally stiff. By identifying these areas early, you can push triangles into these spots, taking advantage of their stiffer properties. Knowing how triangles perform now makes them a tool, instead of something to avoid.
Chapter 6 Modeling a Creature (Warkrat)
101
Figure 6.3 The cylinder on the left is all quads, while the cylinder on the right has triangles.
T RACING
IN
3D
Tracing in 3D is the process of creating polygons on top of existing geometry. There are several ways to trace a 3D object. Native to Maya is the Make Live tool. It makes a selected piece of geometry a “live” surface. Any components created or manipulated in the scene are snapped to that surface. Another method is to utilize a thirdparty plugin, like Draster’s Nex Tool, (www.draster.com). In addition to advanced selection and manipulation tools, it comes with the Quad Draw tool. It enables you to draw points on a reference surface and build geometry quickly from those points. Either method is suitable for 3D tracing. The following tutorials in this chapter take you through the process of using Maya’s Make Live tool. The emphasis is on creating good surface flow. Several techniques for creating edge loops and determining where to place geometry are discussed. Let’s get started.
102
Maya Feature Creature Creations, Second Edition
TUTORIAL T UTORIAL : M AYA L IVE
Step 1: Open the scene file CD\Chapter 6\Base Mesh\scenes\BaseMesh1.mb. The scene contains the high-resolution sculpture created in Mudbox. It was exported without the sculpted detail to minimize the amount of polygons. Fine detail does not have an impact on the shape of the base mesh, so it can be omitted. The sculpture is on the layer HIRES. The scene has been saved with the layer’s visibility off. The geometry is almost 750,000 triangles; just selecting it can bog your machine down. By keeping the layer hidden, the computer’s performance remains high. Even with the layer hidden, you can make the surface live. Right-click on the layer and choose Select objects from the pop-up menu. Next, select the red magnet icon from the status line toolbar. It is grouped with the snapping tools. Notice that your selection disappears from the Channel Box. The sculpted high resolution surface is now “live.” Step 2: Test your computer’s performance by making the HIRES layer visible. The live surface is displayed in a green wireframe. It is not possible to see it shaded. This actually helps with the computer’s performance. You need to see the surface just to get started. Using the Mesh>Create Polygon tool, draw out a quad on the upper thigh of the Warkrat’s leg. When done, press Enter to complete the polygon. Use Figure 6.4 as a guide.
Figure 6.4 Draw a quad on the sculpture’s leg.
Chapter 6 Modeling a Creature (Warkrat)
103
Step 3: Turn off the visibility of the HIRES layer. This helps with manipulating the camera. If your computer is slow, it might be necessary to break up the sculpture into chunks. Each piece can stay in the scene file and be toggled on or off by using layers. Only one surface can be made live at a time. Using smaller pieces significantly improves computer performance without adding too much extra work. Turn the HIRES surface back on if your system can handle it. Step 4: Select an edge and extrude it to the same width as the initial face. Choose one vertex at a time from the extrusion and snap them to the surface. Only one vertex can be snapped correctly to the surface. If you have more than one selected, they snap to the same elevation at the manipulator’s center. Each vertex stays locked to the surface as you drag it. Continue extruding edges around the leg until you meet back up to the other side. Use Bridge to complete the cylinder-like surface. Your first piece should look similar to Figure 6.5.
Figure 6.5 The first part of the leg is completed by using the Bridge tool. The surface was translated away from the sculpture for viewing purposes only.
104
Maya Feature Creature Creations, Second Edition
Step 5: Internal geometry is now created within the cylinder. A fast way to create a muscle bulge in a self-contained loop is by extruding it. Select a face from the front of the leg. Choose Extrude and uniformly scale the face down. Select each vertex and snap it to the surface. Figure 6.6 shows the looped muscle.
Figure 6.6 An extruded muscle snapped to the live surface.
Step 6: You can now split a ring around the center of the cylinder. Go back and snap each vertex to the live surface. Although this process allows you to trace the geometry, it is time consuming. It can also be frustrating having to snap each and every point you create. A solution to this problem is discussed in the next tutorial.
Chapter 6 Modeling a Creature (Warkrat)
105
Since the advent of “sculptware,” new plug-ins and tools have been developed to help deal with this data. One such plug-in is Nex tools by Draster. Equipped with dozens of component manipulation tools, it facilitates tracing a 3D model by building on what Maya already has. The Nex plug-in is found at www.draster.com. Once installed, the plug-in needs to be loaded into Maya. To load it, choose Window >Settings/Preferences>Plug-ins Manager. In the Plug-in Manager window, find Draster.mll and check loaded and autoload. The following tutorial requires that you have the Nex plug-in installed.
TUTORIAL T UTORIAL : D RASTER N EX
Step 1: Open the scene file CD\Chapter 6\Base Mesh\scenes\BaseMesh1.mb. The scene contains the high-resolution sculpture created in Mudbox. It was exported without the sculpted detail to minimize the amount of polygons. Fine detail does not have an impact on the shape of the base mesh, so it can be omitted. The surface is on the layer HIRES. The scene has been saved with the layer hidden. The geometry is almost 750,000 triangles; just selecting it can bog down your machine. By keeping the layer hidden, you keep your computer’s performance high. The Nex tool works similarly to the Make Live feature in Maya. With the layer hidden, you can make the surface a live reference object. Right-click the layer and choose Select objects from the pop-up menu. From the Nex drop-down menu, choose Quad Draw>Set Selected Mesh as Live Reference. The model is loaded into the Quad Draw tool. Deselect the model. Step 2: Just as in the previous tutorial, we need to see the sculpture. Turn the layer on. You begin with the creature’s head. Choose Nex>Quad Draw>Quad Draw Tool. Using the left mouse button, click on the model right below the front of the eye socket. This creates a green dot. You can move this dot around on the surface with the middle mouse button. To delete it, hold Control and click with the left mouse button. Drawing dots is what this process is all about. Take a little while to get comfortable with creating them. Step 3: Create three more dots to form a large rectangle from the bottom of the eye down to the underside of the creature’s neck. Use Figure 6.7 for reference.
106
Maya Feature Creature Creations, Second Edition
Figure 6.7 Draw four dots on the surface of the creature’s head to create a rectangle.
Step 4: Hold down the Shift key and move the mouse to the middle of the dotted rectangle. A quad polygon pops up. It will go away if you leave the realm of the dots. If there were more dots, additional polygons would pop up as you moved around. Only one face is displayed at a time. Press the left mouse button to complete the polygon. The face is built. You may have to toggle the HIRES layer’s visibility in order to see it. Step 5: Here is where the tool really excels over the method described in the previous tutorial. Turn the HIRES layer’s visibility off. Hold Shift and move the mouse over the polygon. An edge appears; it is ready to be inserted wherever you click. Create an edge somewhere in the center of the face. The polygon drastically changes. The new vertices of the edge automatically snap to the reference surface. Experiment with adding edges. They can be created in both horizontal and vertical directions. To remove an edge, use Undo. Figure 6.8 shows new edges placed along the surface. Step 6: The quickest way to complete a surface is to create large polygons across your sculpted surface and then split them. Pushing and pulling vertices along the way creates a good surface flow. Take a look at Figure 6.9. The geometry was created by first building the cheek, then the lips, and finally the nose and eyes.
Chapter 6 Modeling a Creature (Warkrat)
Figure 6.8 The inserted edges conform to the surface automatically.
Figure 6.9 The completed head was initially created by dropping dots and then inserting edges.
107
108
Maya Feature Creature Creations, Second Edition
Step 7: This step corresponds with the scene file CD\Chapter 6\Base Mesh\ scenes\BaseMesh2.mb. The head is a complex structure. It is a good starting point because it establishes the surface flow for the entire character. If you are just beginning to understand the concept of surface flow, it is best to begin on a simpler part. Let’s move to the leg. Creating large faces can also be problematic. Take a look at Figure 6.10. There are a total of six dots. If you hold Shift and move the mouse over them, the tool creates a face based on the shortest distances. The resulting faces are seen in Figures 6.11 and 6.12.
Figure 6.10 Six dots are created to start the upper leg.
The faces are less than desirable. A way around this is to move the dots closer together, and after the faces are completed, move the vertices back with the middle mouse button. Another way would be to only drop points for a single quad. Step 8: Create another set of dots for the muscle going back between the creature’s legs. Turn the points into polygons. The goal is to create faces for each muscle. They do not all have to connect. You can use Bridge to fill in-between. When you complete the upper leg, add edges to improve the detail. Remember, the idea is to follow the muscle flow, modeling the skin direction transverse to the muscle fiber direction. Take a look at the finished leg in Figure 6.13.
Chapter 6 Modeling a Creature (Warkrat)
Figure 6.11 The shortest distance generates an awkward face.
Figure 6.12 The shortest distance generates an awkward face.
109
110
Maya Feature Creature Creations, Second Edition
Figure 6.13 The finished leg.
Let the sculpted surface tell you where to put the geometry. To understand better, take a look at Figure 6.14 and compare it to Figure 6.13.
Figure 6.14 The finished leg with arrows drawn over as guides for the surface flow.
Chapter 6 Modeling a Creature (Warkrat)
111
It also helps to imagine the muscle fibers under the surface. Think of them as you build the geometry. Use an anatomy photo reference as a guide. To take it a step further, cut and paste muscle images onto a screen capture of your sculpture. It might not be accurate, but it can help you visualize what needs to be done. The geometry’s surface flow is of utmost importance. It can seem like a daunting task, but with practice, you gain geometry vision and the ability to see in geometry. You pick up on how everyday objects are put together and envision the object with a wireframe overlay. All models have surface flow. In organic objects, it can change direction three or four times in a very small space. The following images show some of the challenges in the Warkrat’s base mesh. Figure 6.15 is the creature’s bicep. Pay attention to the rounded pattern the geometry forms. The rows of edges loop together forming concentric circles.
Figure 6.15 The surface flow for the bicep muscle forms concentric circles.
Figure 6.16 is the back of the Warkrat’s arm. The flow comes off the creature’s back, forms the triceps, and wraps to the front of the arm. An additional loop is inside the triceps.
112
Maya Feature Creature Creations, Second Edition
Figure 6.16 Geometry flows off the back and down around the arm.
In Figure 6.17, all of the geometry from the upper arm is carried down into the forearm and the fingers. The forearm is easy to create from the already-established upper arm.
Figure 6.17 The geometry of the forearm.
Chapter 6 Modeling a Creature (Warkrat)
113
The last image, Figure 6.18, shows the final geometry for the Warkrat’s base mesh.
Figure 6.18 A side view of the final geometry for the Warkrat.
C ONCLUSION The base mesh is our final geometry. There are no more changes or additions to make. It takes a while to design and build good geometry, but the rest of our pipeline depends on it. The base mesh is our creature’s skin. It helps to think of it that way. We must take time to grow the skin to ensure its strength and durability. The Warkrat is not mirrored just yet. In Chapter 7, we’ll look at laying out the UVs. When the UVs are complete, we can mirror the geometry, mirroring the UVs as well, and eliminating a lot of repetitive work. The final version of the base mesh is found at CD\Chapter6\Base\Mesh\scenes\ BaseMeshFinal.mb.
This page intentionally left blank
7
UVs
olygons present an interesting problem when adding painted texture maps. They don’t possess a coordinate system by which 2D pixels can be assigned. The solution: Project values onto each face. This is where UVs come in. Although a solution, it does not come without problems. Most can be dealt with, but the biggest offender is distortion. In today’s production pipeline, it is unavoidable. Taking a three-dimensional object and laying it perfectly flat without overlap will result in distortion of some kind. Luckily, through a little bit of planning, it is possible to eliminate most, if not all, UV distortions noticeable to the human eye. Over the past few years, there have been significant improvements in UV tools. What used to take weeks to perfect is now done in hours. Even though these tools simplify the procedure, their usage can be ambiguous. In this chapter, we’ll discuss the tools and when to use them as we project UVs onto the Warkrat.
P
115
116
Maya Feature Creature Creations, Second Edition
UV P LACEMENT Texture maps are wrapped around a surface based on U and V coordinates. UVs on polygonal objects must be projected onto the geometry. The goal of “laying out UVs” is to remove any stretching or warping as a result of the initial projection. When UVs don’t match the shape of the face they’re projected onto, distortion occurs, which is visible when a texture is applied. By closely matching the underlying face, the texture maps are seen the way they were painted, which is smooth and full of crisp detail. The term UV actually refers to the direction the coordinates travel on a surface. The U is the horizontal direction, while the V is the vertical. Both have values ranging from 0 to 1. Take a look at Figure 7.1. It is a snapshot of the UV Texture Editor work area.
Figure 7.1 Here is the work area of the UV Texture Editor.
Chapter 7 UVs
117
The checkerboard fills the area deemed normalized space. Notice the range of numbers along the bottom and up the left-hand side of the square. This is commonly referred to as the 0 to 1 texture space. The goal is to place all of our UVs within the 0 to 1 texture space. Anything outside of this area is ignored, mostly. When a texture map is applied, regardless of its resolution, it is forced to fill the 0 to 1 texture space. It is also repeated in all directions. Maya does not show this unless you tell it to, under Image>Image Range. Regardless of the display, if your UVs are outside of the texture area, the texture is still repeated and mapped to your geometry. You cannot have anything outside of the 0 to 1 texture space mapped to anything other than what is in the normalized space. UVs are not just for texture maps; they also dictate the placement of other features, such as hair or fur. Several tools, such as the weighted deformer tools, are also aided by good UV placement. Maps are painted using the UV template to distribute vertex weights by grayscale intensities. When it comes to using maps for attributes, like fur or skin weights and deformers, the UVs must reside within the texture space. Anything outside of the texture space is ignored. This is also true for transferring sculpted information from our high-resolution model to our low-resolution model. If the UVs are not positioned and laid out properly, the effects of our normal and displacement maps get skewed. The reality is, if we want to take our creature any further, it must have good UVs. Let’s get to it!
TUTORIAL T UTORIAL : L AYING O UT UV S (W ARKRAT L EG )
Step 1: A great place to ease into laying out UVs is on the creature’s leg. Load texture1.mb from the CD:\Chapter 7\UV\scenes folder. Only half of the creature is in the scene. To speed up production time, the UVs are laid out on one side of the model and mirrored to the rest along with the geometry. We start projecting UVs by selecting faces. A good rule of thumb is to make sure that your selection matches your projection. There are several different types of projection methods to use. For this tutorial, we’ll use only one, cylindrical. Therefore, what we select should match the look of a cylinder. Select the leg’s faces from the groin to the ankle. A quick way to do this is to use the Lasso Select tool from the toolbar and select a few rows at the knee. Then hold Shift and press > a few times to grow your selection.
118
Maya Feature Creature Creations, Second Edition
If you select too much, use the Paint Selection tool, located under the Lasso tool in the toolbar, to deselect them. It is part of the artisan paint system, and therefore works in a similar fashion to the Sculpt Geometry Tool. By default, it selects faces, and holding down CTRL while painting, deselects faces. Figure 7.2 confirms the selection.
Figure 7.2 Select faces on the leg in the shape of a cylinder.
Step 2: Choose Create UVs >Cylindrical Mapping. The cylindrical mapping manipulator pops up. It is not positioned or wrapping properly around the leg. Look at Figure 7.3. It shows the UV Texture Editor and how the UVs are being projected. To the trained eye, these are ugly. Even though it’s obvious, we still need some help deciphering what is good and what is bad. Right-click on the model over the selected leg faces. A marking menu pops up. Scroll toward the bottom and choose Assign New Material>Lambert. Add a checker texture to the color channel. To get visual feedback on your model, press 6 to display textures in the viewport. Examine the texture in Figure 7.4. You should see black-and-white squares. There is distortion everywhere!
Chapter 7 UVs
119
Figure 7.3 The projected UVs inside of the UV Texture Editor.
Figure 7.4 The checkerboard pattern is highly distorted below the creature’s knee.
120
Maya Feature Creature Creations, Second Edition
Step 3: We need to align the cylindrical manipulator to better fit the leg. If you lost the manipulator, it can be brought back by clicking polyCylProj1 in the Channel Box and the Show Manipulator tool from the toolbar. When you click polyCylProj1, it also opens its attributes. Change the Projection Horizontal Sweep to 360. The cylinder now wraps all the way around the leg. At the bottom of the cylindrical manipulator is a red T. It indicates where the texture wrap begins and ends, in other words, where the seam is going to be. It also changes the manipulator’s mode. Click it with the left mouse button. The universal transform manipulator appears in the center. Translate and rotate the cylindrical manipulator so that it closely matches the mapped area. Watch the UV Texture Editor while you do this. Figure 7.5 displays the manipulator’s position.
Figure 7.5 The manipulator has been translated and rotated to fit the leg as best as possible.
Step 4: Take a look at the UVs in the UV Texture Editor. Translate the UV Set into empty space, away from the grid area. The UV Set looks decent, but not great. Several UVs are on the wrong side of the seam. They need to be moved to the other side. Figure 7.6 illustrates the problem.
Chapter 7 UVs
121
Figure 7.6 Several UVs are located on the wrong side of the seam.
Most of the time, this can be fixed by rotating the cylindrical mapping manipulator around the surface, in this case the Y-axis. Rotate the cylindrical mapping manipulator in the positive Y-axis until the faces pop over to the other side. Step 5: The UVs have improved tremendously. They can still be better. Unfold UVs is a tool that has helped shave hours to days off laying out UVs. It is a simple tool to use, but some of its attributes can be a bit ambiguous. Right-click over your UVs in the UV Texture Editor. Choose UV from the marking menu and select all of your UVs. Go to the Polygon>Unfold tool options. Unfold UVs has two different solver types: local and global. For the most part, the local solver does most of the work. However, when selections taper, like the Warkrat’s leg from the groin to the ankle, the UVs do not unfold properly. Go ahead and apply the default settings. Figure 7.7 shows the results.
122
Maya Feature Creature Creations, Second Edition
Figure 7.7 As the UVs taper at the ankle, the texture begins to distort.
Step 6: The more your selection differs from the projection, the more work the Unfold tool has to do. Undo the Unfold operation. The Warkrat’s leg is basically a cylinder. It does, however, bend in the middle and is larger on top (thigh) than the bottom (ankle). The Cylindrical Mapping tool cannot be bent or tapered. To get the leg to unfold nicely using the default settings, you would have to break your leg selection into three parts, effectively eliminating bending and tapering. Luckily, that is not necessary. Instead, by mixing the local solver with the global solver, the UVs unfold correctly. First, scale the UVs up uniformly until the checkerboard pattern is smaller on the surface. This makes it easier to see distortion. Change the Weight Solver Towards attribute to .93 and choose Apply. Figure 7.8 has the results. Step 7: As soon as you add any amount to the Global solver, the slider beneath it opens up. By default, Optimize to original is set to .5. This is perfectly balanced between the area of each face and the length of each edge. When using the Global solver, it takes into account one or the other or both. It didn’t play too much of a part in unfolding the UVs for the leg. When you get to areas with extreme curvatures, however, you need to pay closer attention.
Chapter 7 UVs
123
Figure 7.8 The UVs and texture after the weighting was set to favor the Global solver.
To finish the leg off, let’s move the seam to the inside of the creature’s leg. Texture seams are not much of an issue with the advent of 3D paint. Nevertheless, it is good practice just in case something doesn’t quite match up. Find the row of edges on the inner part of the leg least likely to be seen. Select an edge and find it in the UV Texture Editor. Continue to select all of the edges in that row. Why not just use the Select Edge Loop Tool? For starters, it does not function inside the UV Texture Editor. It is possible to use it on the model itself, but it selects a lot of unwanted edges at the same time. Either way, you need to select individual edges. Once the row is highlighted, choose Polygon>Cut UV Edges. Although it appears like nothing happened, the UV Set has been divided into two sections. A quick way to check this is to click a single UV and choose Select>Select Shell. This activates all of the UVs of the chosen shell. You can now translate the shell away from the other to see it clearly. Select shell is a command used frequently throughout the UV process. It does not have an icon, nor can it be made into a shelf button automatically. The best thing to do is to set up a hot key through the editor under Windows>Setting/Preferences>Hotkey Editor.
124
Maya Feature Creature Creations, Second Edition
Step 8: To put the leg back together, select all of the edges lengthwise along the opposite side you just cut. For once, you can be sloppy with your selection and leave any of the interior faces selected. If the edge is already attached, it cannot be sewn to another edge. Highlighting this row also highlights the edge’s counterpart on the other UV Set. It does not matter which row you actually start with. Use Figure 7.9 as reference.
Figure 7.9 Selecting the border edges of a UV shell selects its corresponding edge on the other shell.
Choose Polygons>Move and Sew UV Edges. The smaller UV shell connects to the larger one. It doesn’t matter which shell you selected edges from, the smaller is always moved to the larger. The leg UVs are together again, but are now distorted where they were sewn together. Select all of the UVs in the shell and apply the Unfold tool using the same settings as before. The UVs for the leg are done. Are they flawless and without distortion? No! The only true way to have perfect UVs is to map each face individually with no connection to one another. Some programs operate this way for various reasons. In our pipeline, this has no value. In the end, minimal distortion is good enough—in fact, it’s unnoticeable.
Chapter 7 UVs
125
The UVs for the arm, hand, torso, fingers, and toes can all be done in the same manner as the leg. Here is a list of items to keep in mind as you work. Match your selection to your projection. This works in the reverse as well. Once you add a cylindrical projection manipulator, you can translate, rotate, and scale it to fit your selection as tightly and accurately as possible. Match your selection to your projection. This is so important that it needs to be mentioned twice. Do not try to do too much. If the surface changes direction 180 degrees, it should not be included—for instance, the nails from the fingers and toes. The angles they form are too sharp. They need to be mapped separately. This is true for the faces between each finger, too. Including these only causes the Unfold tool to produce poor results, giving you the impression that the tool does not work properly. Rotate the cylinder in order to get a clean border edge and no hanging faces. If it can’t be done, cut the edges and move and sew them to the other side before unfolding. After every projection, move the new UV Set into empty space. This helps prevent overlapping UVs and gives you room to work. Figure 7.10 shows the final UVs for the arm, hand, torso, fingers, and toes.
Figure 7.10 The final UVs for the arm, hand, torso, fingers, and toes.
126
Maya Feature Creature Creations, Second Edition
TUTORIAL T UTORIAL : L AYING OUT UV S (W ARKRAT H EAD )
The head is the most important group of UVs to lay out and arguably the hardest. Typically, the head draws all the attention. We look at it for visual cues as to what the character is thinking or how it is reacting. These things do not influence the UVs, but it does mean they are scrutinized more so than any other part. Distortion in the head texture is most likely to stick out. The head also has lots of detail. It is not just smooth bare skin; there are expressive lines and wrinkles, lip texture, and acute separations for the eyes. It is imperative that the head UVs get special attention. The UVs are projected with a cylindrical projection just like the rest; the difficultly lies in what to select. Heads differ greatly from character to character. If you have horns, large noses, or other protrusions or depressions, it is best not to include them in the initial projection. You might be able to add them back in later, but the initial unfold works best without their presence. Step 1: Load texture2.mb from the CD:\Chapter 7\UV\scenes folder. Select all of the faces in the head, minus the nose, lips, and chin. Typically, the eye socket maps well. Figure 7.11 shows the selection.
Figure 7.11 Select the head without the nose, lips, and chin.
Chapter 7 UVs
127
Step 2: Project a cylindrical map. Align the manipulator to get the best possible layout. It does not unwrap as nicely as the leg. You’ll get a lot of distortion to the interior of the UV Set. This is okay. Focus on the border. Internal UVs do not matter, only border edges matter. Use the UV Texture Editor as your main source of reference and not the 3D model. With this much distortion, the visual feedback from your viewports becomes useless. You must learn to interpret what you see in the Texture Editor. Rotate the manipulator to match the results in Figure 7.12.
Figure 7.12 Rotating the cylindrical mapping manipulator isn’t always the fix.
The Cylindrical Mapping tool looks like it fits the selection perfectly, so why is there so much distortion? This usually means one of two things—either the selection is bad, or the UV manipulator is too far or too close to your model. Look at the manipulator in the top viewport. The manipulator’s center is a good distance away from the edge of the model. Since we are only mapping 180 degrees, the manipulator’s center needs to be at the geometry’s edge. Translate the manipulator to the border edge of the Warkrat’s head, as seen in Figure 7.13. The UVs come together.
128
Maya Feature Creature Creations, Second Edition
Figure 7.13 Rotating the cylindrical mapping manipulator isn’t always the fix.
Step 3: Apply Unfold. Using the default settings causes tapering around the lower jaw. As explained in Step 5 of the leg tutorial earlier in this chapter, to get rid of this, move the local solver toward the global solver. A value of .3 does the trick. Figure 7.14 has the finished results. Step 4: Next, we take care of the remaining faces of the head. A quick way to select these is by drawing a marquee around the front half of the head in a 3D view. Switch to the UV Texture Editor. The faces of the head are selected, but since we haven’t created UVs for the lips and nose, they are not represented in the editor. Simply hold Shift and draw another marquee around everything to deselect the faces. What remains in the 3D viewport is projected. Figure 7.15 shows the untextured faces in the viewport. There might be a few stray faces mapped. These should reside in the 0 to 1 texture space and not interfere with the good head UVs. They will get remapped with a new projection later.
Chapter 7 UVs
Figure 7.14 Here are the final UVs for the first part of the Warkrat’s head.
Figure 7.15 Deselecting faces in the UV Texture Editor leaves the untextured faces selected in the viewport.
129
130
Maya Feature Creature Creations, Second Edition
Step 5: The lips and nose create an unusual shape, not well suited for cylindrical mapping. If that doesn’t work, how do we choose another mapping method? Following the rule of matching our projection to our selection doesn’t give us much of a clue. The best way is to go down the list and mentally see what works best. Technically, there are only three different projection methods: planar, cylindrical, and spherical. The fourth and fifth, Automatic Mapping and Create UVs Based on Camera, are really extensions of the planar mapping type. Spherical and cylindrical are obvious choices to eliminate, leaving planar mapping. Planar mapping is concise. Pick a plane and what you see is what you get. To determine which plane to use, simply look in the viewport that presents it. Take a look at the side view. Most of the faces are present, but some are obscured by the faces in front of them. If you project from X or a side view, the UVs will also be on top of each other. Although this can be unfolded from time to time, it is not the best option. The two other planes get even worse. A fourth alternative is to use the camera view as a projection plane. The goal is to position the camera so that all of the faces are visible without overlap. In fact, we only need to worry about the edges making up the border of our selection. As long as they are visible, the projection and unfolding works nicely. Tumble the camera around to find the best viewing angle. The current selection has one row of faces on the upper lip that remains obscured. Figure 7.16 shows the best viewpoint. Before committing to these options, let’s take a look at a few more choices. At the very top of the Planar Mapping Tool options is Fit Projection To. By choosing Best Plane, Maya automatically calculates the viewing angle for you. This can prove to be better. Yet another option already mentioned is the Create UVs Based on Camera Projection method, under the Create UVs drop-down menu. Again, all of these use planar mapping, but they all calculate the plane a little differently. Take a look at Figure 7.17. It is a comparison of all three methods. Although each of these tools projects slightly different results, after unfolding, the results are the same. This may not always be the case, but skipping all of the extra options and going directly to Unfold saves time. With a weighted solver of .5, the lip unfolds perfectly, except along the row of faces we could not see with our projection method. We could solve this by cutting the faces away and projecting them separately.
Chapter 7 UVs
131
Figure 7.16 The best viewing angle for the edges of our selection.
Since they are on the inside of the mouth and only distorting a small amount, we let it slide. Using a checkerboard pattern is an overkill to test the quality of our UVs. It makes more sense to leave it alone than to break it up into another UV Set.
Figure 7.17 Here are the three different, camera-based, planar mapping methods. From left to right is, Bounding Box/Camera, Best Plane, Create UVs Based on Camera.
132
Maya Feature Creature Creations, Second Edition
The head of the Warkrat was relatively easy to unfold. It becomes more difficult with a more complex design. If you try to unfold and it won’t work, break the UV Set up into smaller sections and try again. You can always put the pieces back together. Once you do, run the Unfold tool again. Moving UVs by hand creates a problematic domino effect. Each UV affects the other. Shifting one causes distortion in adjacent faces. For minor adjustments, this problem is less likely to be noticeable. The Unfold tool takes the entire UV Set into consideration, giving you more accurate results.
TUTORIAL T UTORIAL : L AYING OUT UV S (M ISCELLANEOUS P ARTS )
Once all of the major parts are done (arms, legs, and head), you are left with remnants—a small group of faces between the fingers, or perhaps odd-shaped pieces from the feet. These odds and ends are wrapped up with a few planar projections. Step 1: Load texture3.mb from the CD:\Chapter 7\UV\scenes folder. The foot is an odd shape. Parts of it could be a cylinder, while other parts just don’t fit anything at all. One option is to planar map several parts. Automatic mapping does that for us. Since almost everything is already mapped, selecting faces is easy. Using the technique outlined in Step 4 of the Warkrat head tutorial, select a larger region of faces around the foot and deselect faces in the UV Texture Editor. Choose Create UV’s>Automatic Mapping. No need to go into the tool options, the defaults work perfectly. What you’ll end up with is a collection of UV Sets, as shown in Figure 7.18. It’s like a puzzle to see which pieces fit where. Automatic mapping is a powerful tool, but best used in small doses. Relying on it can cause major headaches with too many pieces or parts that do not want to go back together. On small areas, like the foot, it saves a lot of time. Step 2: To put the puzzle back together, take a moment to mentally establish what you would like to see. It is best to have the bottom of the foot remain intact and separate. The top of the foot could fan out with openings for the toes. Randomly select UVs in order to identify which pieces go where.
Chapter 7 UVs
133
Figure 7.18 Here are the UVs for the foot after automatic mapping.
Step 3: Grab a large chunk and move it off to the side. Select all its edges. With all of the edges highlighted, it is easy to see what parts can be connected. If you chose Move and Sew at this point, you would get more than you bargained for. Press F to frame the selection. The camera flies out to reveal all of the mapped UVs. Edges along the bottom of the leg and toes are highlighted. Hold CTRL and draw a marquee around everything but the foot to deselect those edges. Press F again. Deselect the edges of the bottom of the foot. Very few edges remain. Choose Move and Sew. The new piece comes together. Repeat the procedure until you end up with something like Figure 7.19. Step 4: The top of the foot is complete, but not a very good layout. A better configuration is to cut the UVs in the middle and move and sew the two pieces back together at the opposite ends. This way the section between the toes becomes the center of the UV Set. When determining a good configuration, think in terms of how you would like to paint it. What would make sense to you? Do you find it easier to paint in a straight line or paint on something recognizable, but flattened? Do not think in terms of orientation. That can always be adjusted. Think how the pieces connect. Is there important detail with a seam running through it? Would you rather have a small seam in plain site or a larger, more concealed one?
134
Maya Feature Creature Creations, Second Edition
Figure 7.19 The top of the foot assembled.
The new piece is not so simple to unfold. It is a small piece, but very awkward. Unfolding with the defaults causes one side to warp. They should look very symmetrical. This tells us to add more Global solver and play with the optimization favoring edge length. In the end, .9 is used for both Weight and Optimize. Figure 7.20 shows the final configuration. Step 5: The bottom of the foot is pretty good. For good measure, unfold it using the default options. Step 6: The nails are best done with automatic mapping, just like the foot. It is possible to do a cylindrical map on them, but would entail some extra cutting to get the UVs to unfold properly. Also, aligning the cylinder to them is just extra work. Using automatic mapping bypasses those steps. Select the nail faces of the middle finger and choose automatic mapping. Move the pieces into empty space. Move and sew all of the pieces together by the four largest edges running the length of the nail. Figure 7.21 shows the results. Notice the edges on the tips of the nail are very close together. Move and sew the first edge only. Run Unfold with the default options. Repeat this process for all of the nails.
Chapter 7 UVs
Figure 7.20 The new configuration for the foot.
Figure 7.21 The results of moving and sewing the nail pieces together.
135
136
Maya Feature Creature Creations, Second Edition
Step 7: The interior mouth is on a separate layer and not yet combined with the model. This makes it easier to deal with. Turn off the body layer. The teeth, mouth, and throat are now easily accessible. Each tooth needs to be mapped separately. You can use automatic mapping or cylindrical mapping to project them. Either one results in the same amount of work. Automatic mapping requires you to put the pieces back together, while cylindrical mapping involves repositioning the manipulator. The uvula is also mapped separately. This is the little lump of flesh hanging down in the back of the throat. Due to the curvature of the faces, it does not map well as a solid piece. Ultimately, the solution is to project each side with a planar map and leave the pieces separate. The entire mouth and throat, however, is splayed into one UV Set. The remaining pieces, the tongue and back of the lips, are laid out separately. Figure 7.22 shows the final set for the entire mouth.
Figure 7.22 The final UV Set for the mouth and all its parts after mirroring. Starting in the upper-left quadrant and looking clockwise, you can see the teeth, uvula and lips, mouth cavity, and tongue parts.
Chapter 7 UVs
137
Step 8: Look for any remaining pieces by selecting the faces on the entire model and then deselecting all of the mapped faces in the UV Texture Editor. Remember to avoid deselecting anything in the 0 to 1 texture space. Look at the model in wireframe and press F. If anything remains, map it.
T UTORIAL : M IRROR TUTORIAL
The UVs have come as far as we can take them. The next step is to mirror the geometry and finalize the UVs. Most of the sets remain untouched, like the legs and arms. The head and mouth, however, are sewn to their mirrored half and cleaned up. Step 1: Load texture4.mb from the CD:\Chapter 7\UV\scenes folder. Look at the border edge to be mirrored. Make sure that all of the vertices along this edge are snapped to the YZ. If you have vertices sitting off this plane, they will not merge properly when mirrored. Select the body geometry and open the tool options for Mesh>Mirror Geometry. Select the appropriate axis to mirror across. The Warkrat was built on the positive X side, therefore it is mirrored to the -X axis. Make sure that Merge with Original and Merge Vertices is also turned on. Go ahead and apply the tool. Something bad happens. Figure 7.23 shows the results.
Figure 7.23 The results of mirroring the geometry with the Merge Threshold set too high.
138
Maya Feature Creature Creations, Second Edition
All of the vertices along the mirrored edge are merged together. This may or may not happen to your character, depending on its scale. If it does, click the polyMirror1 node in the Channel Box. The last option is called Merge Threshold. Change this to a value lower than the smallest distance between two of the merged vertices. Make sure to examine your character closely. Even though the problem appears to go away, there may be vertices merged together that should not be. Figure 7.24 shows the Warkrat’s nose and several vertices merged unnecessarily.
Figure 7.24 Several vertices on the nose were merged based upon the Merge Threshold settings.
These merged vertices can be difficult to find. Scrutinize your character. Change the Merge Threshold to a lower value, in small increments, to find the middle ground. More often than not, entering a value of 0 will do the trick. Repeat the procedure for the mouth. Step 2: Looking at the UV Texture Editor, you can see that the UVs haven’t changed. In fact, there are twice as many UVs as there were before, which is confirmed by the Heads up Display. The new UVs are sitting on top of the old ones. These need to be separated.
Chapter 7 UVs
139
Select one UV on the right arm of the creature from a 3D viewport. Choose Select Shell. Translate the UV Set into empty space. You can now see the right and left UV Sets. Do this for all of the UV Sets. Move them in the UV Texture Editor in a way that keeps the mirrored halves grouped together. Step 3: As stated earlier, most of the UVs do not need to be affected. Pieces of the head and mouth are sewn together. Before sewing, one side of the head must be flipped. In the UV Texture Editor, select all of the UVs for either side. Choose Polygons>Flip. The default settings flip the set horizontally. The head pieces are now sewn together. Select all of the edges along the top of the head. Use Figure 7.25 as a guide.
Figure 7.25 Flip one side of the head horizontally.
Move and sew the edges together. The two rows come together, but there is some overlap. Select the entire set and unfold the UVs with a value of .5 for both of the solver settings. The UV Set usually ends up being rotated and scaled after unfolding. Rotate it so the center row of edges is aligned as closely as possible with the XY plane. Figure 7.26 shows the correct orientation.
140
Maya Feature Creature Creations, Second Edition
Figure 7.26 Align the center row of edges to the XY plane.
On the model, the UVs are all in perfect alignment to the YZ plane. This was done intentionally to mirror the geometry correctly. The UVs should match. To do this, select the UVs making up the center line of the head. Press X on the keyboard and translate the UVs in the X to snap them all to a common grid line. Open the tool options for Unfold. Keep all of the settings, except choose PIN UVs and Pin-selected UVs, forcing the rest of the head UVs to align to the straightened middle row. Apply the settings and gradually move the solver toward global until the UVs are balanced. Figure 7.27 shows the final head UV Set. Repeat the steps for any of the other parts that can be put together. The body is left out in order to maintain its resolution. It is a large UV Set that would need to be scaled down in order to fit within the 0 to 1 texture space. Scaling it would also mean scaling the other UV Sets. It is easier and provides better fidelity to leave it separated.
Chapter 7 UVs
141
Figure 7.27 Here is the final UV Set for the head.
TUTORIAL T UTORIAL : N ORMALIZING THE UV S
All of the UVs are complete. They reside, however, outside of the 0 to 1 texture space. Keeping the UVs here results in problems. They must be moved back into the 0 to 1 texture space or normalized space. Step 1: Load texture5.mb from the CD:\Chapter 7\UV\scenes folder. The trick to normalizing multiple UV Sets is to group them together and scale them uniformly to fit inside of a square prior to running the Normalize tool. To do this, select all of the UVs and scale them uniformly so the largest piece fits inside one of the four grid squares in the UV texture editor. Take a look at Figure 7.28 for an example. Using the arm UV Set as a guide, it is scaled and fitted to the lower-left grid square. Since it is the largest piece, all of the other Sets fit as well. Now it is possible to group UV Sets together, reducing the number of maps needed. For instance, the foot and toes are placed on the same map. You must move a set of UVs to each side of the grid square to prevent scaling from the Normalize tool. Figure 7.29 demonstrates.
142
Maya Feature Creature Creations, Second Edition
Figure 7.28 All of the UVs have been scaled in order to fit them within normalized texture space.
Figure 7.29 The UVs for the foot have been spaced out to prevent any scaling by the Normalize tool.
Chapter 7 UVs
143
Step 2: With the UVs grouped logically, it is a good time to assign them to separate materials. Select all the faces for one group and assign a new material to them. Make sure to use a good naming convention for each material to keep things organized. Step 3: Select all the UVs for one group and open the tool options for Polygon>Normalize. Keep it set to Collectively and check Keep Aspect Ratio. This ensures that the UV Sets won’t scale separately, only as a whole. Continue selecting groups and normalizing until you are done. Step 1 made mention of the Normalize tool scaling UVs. It does so to fit the UVs within the texture space. By moving the sets to the borders of the square they reside in, the scale changes are minimal. If you were to group all of the foot parts into the center of the square in a tight configuration, the Normalize tool would scale them up to fit within the square. This would then give the feet a greater texture resolution than the rest of the body. Although these effects can be desirable in certain circumstances, it is not what we want. Consistency is our goal. If the textures are not consistent, meaning that some UV Sets are larger than others, the images used might not match up. For instance, if the head used up the entire 0 to 1 texture space, but the body only used a quarter of it, the two images would look different where they border each other. The head would be sharp and clear, while the body would look soft and blurry. In certain conditions, this can be a useful trick. In a game pipeline, the head is often given more texture space than the body. This is done so that the face texture looks believable. With all of the UV Sets normalized, selecting individual sets becomes impossible. Figure 7.30 shows an example. From now on, they must be selected by their assigned material. Simply right-mouse-click over the material and choose Select Objects with Material from the Marking menu. Figure 7.31 demonstrates.
144
Maya Feature Creature Creations, Second Edition
Figure 7.30 Here is what all of the UVs look like when normalized.
Figure 7.31 Select each UV Set by choosing them through the Material Marking menu.
Chapter 7 UVs
145
C ONCLUSION Creating UV templates can take time, and may be frustrating at first, but it is well worth the investment. Good UVs make for good textures. Let’s not forget, they also help with weight maps, fur and hair placement, and putting particles on a surface. These things might not be of great concern to us now, but they come into play when the creature is actually put into a production. If you have to break a UV Set up, do not worry about re-projecting the UVs. A fourth reason for laying out UVs is the ability to “bake out” or transfer information from the high-resolution model to the low-resolution model via texture. In Chapter 8 this process is explained and demonstrated. Sculpting can enhance the model tremendously. Ending up with a three million polygon model, however, is useless. It is pretty to look at but has no more of a future than a statue. Our next milestone is to extract those 3,000,000 triangles off the sculpted geometry and put them into a texture map. Once there, we have the luxury of utilizing these maps in a variety of different ways and for a variety of resolutions. Regardless if you are building your character for film or for a game environment, extracting 3D information to a 2D map is invaluable. It allows you to control the quality of your final output, without having to go back and re-engineer any of your previous work.
This page intentionally left blank
8
Creating Texture
n Chapter 5, “Sculpting in 3D,” we created a high-resolution digital sculpture. We examined two different applications: the first being Maya’s Sculpt Geometry tool, and the second, the dedicated sculpting package, Mudbox. We learned the ins and outs of sculpting in Maya with the understanding that it has a limited functionality. Ultimately, a dedicated sculpting package is preferred. One of the great features of Mudbox is its ability to add layers to hold detail, similar to layers in Adobe’s Photoshop. With a little planning, the layers can be set up to keep shape-altering changes separate from fine detail. The goal through both of these applications was to generate the last stage of our preproduction design for our creature. In doing so, we also completed the final look of our character, basically building our model on the fly. In Chapter 6, “Modeling,” we took the sculpture and three-dimensionally traced over it to create a low-resolution version. We paid close attention to the flow of the geometry, making sure the skin direction was transverse to the muscle fiber direction. In Chapter 7, “UVs,” we took the low-resolution version and created UVs. Laying out good UVs is essential to our pipeline in order to capitalize on normal maps, displacement maps, and all of the texture-based tools in Maya.
I
147
148
Maya Feature Creature Creations, Second Edition
Here we are in Chapter 8. This is where we’ll pull together all of the work done so far into a single mesh. We will extract normal maps and displacement maps from the high-resolution model sculpted in Mudbox by a process sometimes referred to as baking. The maps will be cleaned up and placed on the low-resolution model to achieve the final look. Furthermore, we will discuss how to optimize and render the effects of these maps in Maya and in its third-party renderer, Mental Ray. Baking or extracting maps is an important part of our process. It is an excellent way to achieve a high-resolution look and reduce the amount of geometry used while we work. It has become an essential part of game production pipelines, allowing not just the baking of normal maps, but of light and shadow information as well. It also gives you the ability to bake specular highlights, ambient occlusion, and ray-traced shadows into a texture map.
T ERMINOLOGY The process of pulling information from one model to another is referred to as extracting, baking, or transferring maps. Although the terms are used interchangeably here, there are some differences. They are important to discuss because Maya does have separate tools using the different terms. Baking actually refers to rendering light effects directly to a texture map. It does take into account material information as well, thus giving you specular highlights, translucency, and transparency. Extracting, or as Maya has labeled it, transferring, refers to taking information from one piece of geometry and applying it to another. These terms are used interchangeably because it is possible to take lighting information and transfer or bake it from one piece of geometry and apply it to another. Two separate tools are employed in Maya but essentially share the same idea.
E XTRACTING M APS The only two maps we are interested in creating are normal maps and displacement maps. We need these to give the creature’s geometry its final look. They are not necessary for skin creation, but they do help make the final result look more convincing. The process of creating these maps is relatively simple. You have a source mesh and a target mesh. The typical setup is to have a high-polygon model as your source mesh and a low-polygon model for your target mesh, with a shape closely matching the high-polygon version. Maya casts light rays through the high-poly model, projecting the surface information to the low-polygon model. This doesn’t do us much good if our low-polygon surface lacks a place to put that projection. This is where
Chapter 8 Creating Texture
149
UVs come into play. Having UVs on our low-polygon model gives Maya a place to write the projection, too. With that said, it is not necessary to have UVs on your high-resolution model. It is important that your low-polygon mesh closely matches the high-polygon mesh. If the two meshes don’t line up or vary greatly, the light rays produce distorted or sometimes clipped images, the final result being unusable. The closer the shape of the two meshes, the better your maps turn out.
N ORMAL M APS Normal maps interpret the direction at which light hits a surface. The maps color code this interpretation by substituting XYZ with RGB (red, green, and blue). When applied, the surface no longer uses its face normals. Instead, it calculates the map’s colors to give you per-pixel normal direction, giving you control over how light hits every pixel drawn for that surface. Normal maps are just like a colored texture map in how they map to a surface. Instead of displaying the color information, the renderer uses it to alter normal direction. Take a look at Figure 8.1. The image is using its face normals. Compare it to Figure 8.2. It has a normal map applied.
Figure 8.1 The surface has no maps applied. It is using its default face normals.
150
Maya Feature Creature Creations, Second Edition
Figure 8.2 This surface is using a normal map.
It is clear in Figure 8.2 what the power of a normal map is. No additional geometry is added and the difference in render times is negligible. Normal maps give you the false impression of a high-resolution surface. The silhouette of the geometry stays the same, but by altering how the surface interprets light, it can appear to have smooth contours. When transferring maps, the light rays pass through the high-resolution surface obtaining a direction and hit the low-resolution surface at that direction. If it comes in from the right, it shows up as a red value; from top or bottom, you’ll see a green value; and in or out, a blue value can be seen. The intensity of the light is also calculated, further dictating the shade of the color represented. In the end, you get a rainbow of colors that affect the normals of the low-polygon model on a per pixel level. Figure 8.3 shows an example of a normal map. Even in grayscale, you can see the definition it provides.
Chapter 8 Creating Texture
151
Figure 8.3 A grayscale image of a normal map. The colored version is found at CD:\Chapter7\Figures\Figure 8.03.tif.
Normal maps are straightforward in their implementation. There are no options or parameters to tweak. What you see is what you get. Viewing the results of a normal map isn’t difficult either, but does require a few specific settings. These settings change based upon the renderer in which you choose to display them. All of that is outlined later in this chapter under the “Normal Maps” tutorial.
D ISPLACEMENT M APS Displacement maps have received a bad rap over the years. They have been labeled as costly, slow, and difficult to manage. Their inner workings are hard to understand, and they lack any real control. These accusations have kept displacement maps out of a lot of pipelines. There is a partial truth to this slandering. However, it is a simple misunderstanding. Displacement maps alleviate the burden of updating massive amounts of information from your 3D viewport. Instead of pushing millions of triangles through your everyday pipeline, you can reduce it to tens of thousands by incorporating a displacement map. It doesn’t mean those millions of triangles are never rendered; it just gives us the control of when to display them. You can almost think of displacement maps as a layer of detail we can toggle on or off. Think about this.
152
Maya Feature Creature Creations, Second Edition
Would you rather texture, rig, and animate 2,000,000 triangles or 60,000 triangles? Most machines, if not all, wouldn’t be able to rotate geometry in the millions with a decent refresh rate, let alone perform any advanced functionality. With 60,000 triangles, we get through our entire pipeline working almost in real time. Displacement maps allow us to push off the inevitable. To make our characters look truly “photo real,” we have to use geometry. The amount needed to accomplish this is too much for our day-to-day operations. Throwing it into the renderer makes the computer do the work while we sleep. Yes, our render times will be higher, but no higher than if we actually used 3,000,000 triangles in our model. In fact, displacement maps save us time! It would take exponentially longer to push 3,000,000 triangles through our pipeline. This way we only have to deal with those triangles at render time, freeing us up for more artistic endeavors. Why not just use normal maps for everything? As mentioned in the previous paragraph, to achieve true photo-realism it is necessary to use geometry for as much detail as we can afford to render. Here is the reason why. Take a look at Figure 8.4. It shows the arm rendered with displacement maps. Look at its silhouette. It is smooth. You cannot see where one polygonal edge stops and the other begins.
Figure 8.4 The arm rendered with a displacement map.
Now, take a look at Figure 8.5. It is the same angle of the arm, except this time, it is rendered with normal maps. Look at its silhouette. You can see the edges causing sharp corners and flat faces.
Chapter 8 Creating Texture
153
Figure 8.5 The arm rendered with a normal map. Compare its silhouette to Figure 8.4.
The displacement-mapped arm took two minutes and thirty seconds to render. The normal map arm took one minute thirteen seconds to render. Both images were rendered at 2048 × 2048. In a low-end film pipeline, a frame is rendered at 2048 × 1536. Rendering that large also makes all of the imperfections that much larger. Imagine displaying Figure 8.5 on a movie screen. Those flat edges along the arm’s silhouette would be five or six feet long. Games are typically displayed at 640 × 480, reducing the size of the imperfections. Also, in a game environment, the characters are not as prominent on-screen as they are in film. Now those flat edges are less than a centimeter. They become almost invisible. In film, they stick out like a sore thumb due to the larger format. Displacement maps are rarely used in a game environment. Some higher-end games do incorporate them to create levels of detail. As computer performance increases, so does their use. In film, they are a standard. To better understand displacement maps, let’s take a look at what they really do and why. A displacement map is a grayscale image. The values are normalized when applied to a surface, meaning they range from 0 to 1. Zero is black and one is white. This is also referred to as alpha intensity. Using the map’s alpha intensity, the renderer translates vertices in the direction of the normal.
154
Maya Feature Creature Creations, Second Edition
The alpha intensity corresponds to Maya’s grid units. If you have a gray pixel, an alpha intensity of .5, the vertex is translated to half a unit. A white pixel translates one whole unit. So what would a black pixel do? Absolutely nothing! Black pixels leave the vertices alone, keeping them in their original positions. Maya does provide a way to move vertices further than one unit, as well as moving them in the negative. This is done by altering the texture’s alpha gain and alpha offset. This is discussed in detail in the displacement map tutorial later in this chapter.
T RANSFER M APS Maya’s tool to transfer information from one model to the other is called Transfer Maps. It is located in the rendering module under Lighting/Shading>Transfer Maps. The first two tabs are for selecting the two meshes to be compared. You select your target mesh, the low-polygon model, and choose the Add Selected button. Then select your source mesh, the high-polygon model, and choose the Add Selected button under the source mesh tab. From there, choose which type or types of maps to generate. Each of them has attributes specific to the map type. Once you have established your settings, choose Bake at the bottom of the window. Maya calculates the results and saves the image in the folder specified. Calculations can take minutes to hours, depending on your settings. Figure 8.6 shows the Transfer Map options.
Figure 8.6 Here is a view of the Transfer Map options.
Chapter 8 Creating Texture
155
There are a few things to keep in mind when transferring any type of information. They are as follows. 1. Make sure the normals of both surfaces are facing the camera. 2. The low-polygon model has nonoverlapping UVs. (Explained in greater detail in the “Normal Maps” tutorial later in this chapter.) 3. Both meshes overlap. They should occupy the same space. Only half of the creature was sculpted. Even if both sides were sculpted, it is best to leave them in two halves, in order to keep your system from slowing down or possibly crashing. The first maps to generate will be the normal maps. The following tutorial explains the process and techniques to achieve good results.
TUTORIAL T UTORIAL : N ORMAL M APS
Step 1: Open the scene file CD:\Chapter8\CreatingTexture\scenes\normalMap1.mb from the CD. The scene contains two models separated on different layers. The low-resolution model layer, LORES, is visible while the high-resolution model layer, HIRES, is invisible. Only half of the highresolution model is being used. It is possible to mirror and merge the geometry, but this can be too much for the computer to handle. Transferring one side at a time is recommended. It is also quicker to leave the high-resolution model hidden. It does not need to be visible in order to transfer maps. Open up the transfer maps window. Select the low-polygon mesh and choose Add Selected. Right-mouse-click on the layer called HIRES and choose Select Objects. This allows you to pick the sculpted highresolution mesh without having to display it. Next, choose Add Selected under the source meshes tab. Your Transfer Maps window should look like Figure 8.7.
Figure 8.7 You should see both mesh names loaded in the Transfer Maps window.
156
Maya Feature Creature Creations, Second Edition
Step 2: Next click on the first sphere icon, under the Output Maps tab, labeled Normal. This creates a new section containing the normal map options. Choose a name and a place to save the normal map to. It is best to keep it within your project directory, but it can be saved anywhere. Change the file format to .iff. The file format is optional. They all have their strengths and weaknesses. The .iff format is native to Maya, so we’ll stick with it. The next option, the Include Materials checkbox, is used to transfer other normal altering maps, such as bump maps, into the normal map. We currently have none, so this option makes no difference. Map space defines how the normal is calculated. If you choose Object space, all of the normals point in the same direction. This is useful for static objects, like environments or fixed props. Set the Map space to Tangent space. This allows the normal to update when the geometry is deformed. The next option, Use Maya Common Settings, lets you set the map resolution for each map defined, or by checking, it uses one resolution for every map baked. Go ahead and check this box. Figure 8.8 shows the options for transferring Normal Maps.
Figure 8.8 Here are all of the settings for Transferring Normal Maps.
Step 3: The Maya Common Output tab changes the resolution for all of the maps you bake. Set the map width to 2048 with Keep Aspect Ratio turned on. This gives us a power-of-two map, 2048 × 2048. Using texture map’s sizes in the power of 2 will be the most optimal sizes. They fit neatly into memory space, and therefore run faster. A “2K” image is a large map, but for film or TV production it’s necessary. Regardless of your output, it is a good idea to use a larger size resolution. It is easier and faster to downsize an existing map than to have to go back and bake a new one.
Chapter 8 Creating Texture
157
Set the rest of the options as follows. Transfer in: World Space Sampling Quality: High (8 × 8) Filter Size: 7 Filter Type: Gaussian Fill Texture Seams: 1 Leave the last three options unchecked
It is important to use a good filter. The filter size and type soften the results. Using low values produces maps that are too crisp and unnatural. Fill Texture Seam is useful to reduce the amount of artifacts generated around each baked UV Set. Most often, we go back and paint across the seams to ensure continuity, but every little bit helps. Step 4: One last option to set is at the top of the window under Target Meshes. Output UV Set changes which UV Set you want to bake to. Since the source geometry is on the left, choose only the left side UV Sets. Select armLeft. Change the name of the output file under the Normal Map tab to match the current UV Set, for example, armLeftNormal. Choose Bake at the bottom of the window. By choosing Bake, instead of Bake and Close, Maya keeps the window and all of your settings current. When it’s done, change the UV Set. You can press Bake again without having to make any other modifications. Complete the left side, including a pass on the head UVs. Only the left side bakes properly; the right is unusable. Make sure to change the name every time you bake a new UV Set. Baking textures at 2048 squared can take hours. You do not want to accidentally write over a map you already baked. Step 5: Hide the LORES layer and set the HIRES layer to visible. Select the mesh and change the scale in the X to –1. This inverts the geometry. Choose Modify>Freeze Transformations. Freezing the transformations changes the scale back to a positive value and flips the normals. Choose Normals >Reverse from the Polygon module to reverse the normals so they face the camera. You can now bake the right side. Follow Steps 1 through 4. Step 6: All of the normal maps are baked. The head requires assembly. The following tutorial, “Painting Normal Maps in Photoshop” shows you how to do it.
158
Maya Feature Creature Creations, Second Edition
TUTORIAL T UTORIAL : P AINTING N ORMAL M APS IN P HOTOSHOP
Baking normal maps is essentially an automated process. Perfecting them is done manually. Hand-painting a normal map is done with any paint package that allows you to separate the red, green, and blue images. For the following tutorial, Adobe Photoshop was used. Step 1: Open headLeftNormals.iff and headRightNormals.iff from CD:\ Chapter 8\Creating Texture\sourceimages. You are required to have the .iff plug-in for Photoshop in order to read the files. It is found at www.highend3d.com. An alternative is to open the .iff files using fcheck and save them back out in a different file format. If Maya is installed properly, you simply double-click an image; otherwise, you have to browse for fcheck. It is normally located under Program Files\ Autodesk\Maya(version#)\bin. Once you open the image, choose File> Save Image. Alternatively, you can open and save images in the Render View window of Maya. However, this does require you to have Maya running. Step 2: Drag the left-side image on top of the right-side image. You now have two layers with the left side on top. Using the Magic Wand tool, select the unusable side of the normal map. The principal concern is selecting the region between the two halves. Once you establish that, you can select the rest with one of the Marquee Selection tools. Figure 8.9 shows the initial selection with the Magic Wand tool. Step 3: Delete the selection. The right-side normal map is now visible through the top layer. Figure 8.10 shows an example. Step 4: There is a visible seam between the two images. Painting all three color channels at once is highly inaccurate. Instead, paint each color channel individually. First, flatten the image. Next, open the Channels window and click the red channel. All of the other channels will turn invisible. Each color channel is simply grayscale values. With just the red channel exposed, it becomes very easy to paint out any seams. The Healing and Clone brushes are perfect for the job. Clean up the image and repeat for the green and blue channels. Be sure to click on the top RGB channel when done. Figure 8.11 shows the final image. Step 5: Save out to final image. A finished version is already saved as CD:\ Chapter 8\Creating Texture\sourceimages\headNormals.iff.
Chapter 8 Creating Texture
Figure 8.9 Select the unusable side of the top layer.
Figure 8.10 The left and right sides are now visible on both layers.
159
160
Maya Feature Creature Creations, Second Edition
Figure 8.11 The final head normal map after the seam has been painted out.
That takes care of the seam for the Warkrat’s head. The head seam is simple to fix because the seams for each side come together within the map. Take a look at Figure 8.12.
Figure 8.12 The two normal maps for the body.
Chapter 8 Creating Texture
161
The image is of the body left and body right normal maps. They are two separate maps that cannot go together. Even if assembled, the seam does not match up like the head map. To fix the body, as well as all of the other maps with visible seams, it is necessary to paint in 3D. Maya comes with a 3D paint package. It paints directly to the bump channel. Normal maps use this channel but act very differently. The following tutorial explains a method for painting normal maps in 3D.
TUTORIAL T UTORIAL : P AINTING N ORMAL M APS IN 3D (M AYA )
Step 1: Load CD:\Chapter 8\Creating Texture\scenes\3dPaintNormal1.mb. The scene file contains the low-resolution Warkrat. When painting normal maps in 3D, it is best to have only the maps you need assigned. The 3D Paint tool paints across multiple images. Having the entire model textured means you can paint on all of the texture maps. Although this has advantages, it is too costly to be practical. From a technical standpoint, you never need to paint on more than four maps at a time. Typically, we only have to paint two at a time. Although it’s possible to paint directly onto a normal map, it usually proves to be too taxing and troublesome. While designed for real time, painting a normal map in 3D is anything but fast. Ultimately, the fastest way is to save out the separate color channels into their own image (for example, bodyLeftNormalsRed.iff). Make sure to save the channel as an RGB image by changing its mode located under the Image drop-down menu. Maya does not support true grayscale images. Save out the following images. bodyLeftNormalsRed.iff bodyLeftNormalsGreen.iff bodyLeftNormalsBlue.iff bodyRightNormalsRed.iff bodyRightNormalsGreen.iff bodyRightNormalsBlue.iff
162
Maya Feature Creature Creations, Second Edition
Step 2: Load both red images into the appropriate side body materials. Add them to the color channel. At this point, we are only interested in painting. The best and easiest way to paint on these images is to apply them to the color channel of the material. Switch to the Render module. Select the geometry. Choose the Texturing>3D Paint Tool options. The tool options should look familiar, since it is the same setup as the Sculpt Geometry Tool. Figure 8.13 shows the setup.
Figure 8.13 Open the 3D Paint tool with the model selected.
Step 3: At this point, you are not allowed to paint. The brush has a large X through it. Since the model already has textures, it is necessary to choose Assign/Edit Textures before you can paint. In the Paint Tool options window, open the File Textures tab. Choose Assign/Edit Textures. Another window pops up. Make sure the resolution is set to the size of the textures you are painting. In this case, I’ve used 2048 × 2048. Choose Assign/Edit Textures at the bottom. Also in the File Textures tab, make sure Attribute to Paint is set to Color. Finally, check Save Texture on Stroke. Figure 8.14 shows the File Texture tab.
Chapter 8 Creating Texture
163
Figure 8.14 A view of the File Texture tab.
Save Texture on Stroke is an important option. The 3D Paint tool consumes a lot of your computer’s resources. It is likely that Maya will crash. To prevent losing any of your work, every time you paint a stroke, this option saves your image to the 3D Paint directory. If Maya crashes, you only need to re-open the scene file and assign the texture. As a side note, if you save the Maya scene file after painting a stroke or two, the texture paths and assignments are also saved. This prevents having to reassign the texture in the event of a crash. Step 4: Painting can now begin. Choose Clone from the Paint Operations tab. Clone has two modes, Dynamic and Static. As the names imply, Dynamic updates the area you are cloning based on the position of your brush, while Static samples the same area. Make sure that dynamic is selected. Before you can begin painting with the Clone tool, you must choose an area to clone from. When you press the Set Clone Source button, the next place you click on the model is where the cloning begins. Figure 8.15 shows the options for the Paint Operations tab.
Figure 8.15 A view of the Paint Operations tab.
164
Maya Feature Creature Creations, Second Edition
Step 5: Set the Color Opacity of the brush to .6. This is under the Color tab. Make sure that you are setting the right one, because the Flood tab looks almost identical. Figure 8.16 shows both tabs.
Figure 8.16 A view of the Color and Flood tabs.
Step 6: Examine Figure 8.17. The image shows the top of the Warkrat’s shoulders. There is an evident seam running down the middle. Choose Set Clone Source. Click on the model just to the right of the seam. Use Figure 8.17 for reference as well.
Figure 8.17 Set the Dynamic Clone Source just to the right of the seam.
Chapter 8 Creating Texture
165
Step 7: Keeping in line with the Clone Source, slide the brush to the left, moving it over the seam. Begin painting. The first stroke you paint calibrates the Clone tool. From here, the Clone Source is always just to the right of the brush. It remains this way until you set a new Clone Source. Paint out the seam up to the creature’s first vertebrae. Figure 8.18 shows the finished seam.
Figure 8.18 The seam has been painted out with the Clone tool.
Step 8: Painting the seam along the vertebrae is a bit more challenging. Change the Brush Profile to Gaussian, the first of the four brushes. Set the Clone Source in the middle of a large white area. Use Figure 8.19 as a guide. Step 9: Paint directly over the seam. Set the Clone Source again in the same spot as Step 8. Paint another stroke next to one side of the seam. Repeat the same steps for the other side. Continue to sample white areas until the area is blended. Change the brush size to help with the blending. Figure 8.20 shows the progress so far. Step 10: Continue sampling from areas that look like a good match for your needs. For instance, in-between the vertebrae was sampled from the shoulder area with a lower opacity. Figure 8.21 shows the finished vertebrae. The scene file CD:\Chapter 8\Creating Texture\scenes\3dPaintNormal2.mb has the two red channels connected and ready for painting.
166
Maya Feature Creature Creations, Second Edition
Figure 8.19 With the Gaussian brush, choose a Clone Source from a white section of the vertebrae.
Figure 8.20 Paint the seam by sampling a white area over and over.
Chapter 8 Creating Texture
167
Figure 8.21 This is the finished vertebrae.
Painting in 3D takes practice. Learning how to blend textures by altering the opacity is key. Use several strokes, if necessary, to go over the same area. Paint the rest of the seams for the red maps. Repeat the process for the green and blue maps.
TUTORIAL T UTORIAL : D ISPLACEMENT M APS
Extracting displacement maps follows the same basic procedure as normal maps. We use a different high-resolution mesh, however. It is not necessary or desirable to use the final sculpture. Small details like skin texture or patterns are not worth the triangles. Normal maps represent them without adding extra faces. The camera would have to be at a microscopic level in order to see the difference between actual triangles and a normal map. To avoid using that detail, grab the sculpture at a lower level and export it out of Mudbox. Figures 8.22 and 8.23 show the nondetailed version of the Warkrat. It is used to transfer displacement maps.
168
Maya Feature Creature Creations, Second Edition
Figure 8.22 A front angle of the nondetailed version of the Warkrat.
Figure 8.23 The reverse angle of the nondetailed version of the Warkrat.
Chapter 8 Creating Texture
169
Step 1: Open the scene CD:\Chapter 8\Creating Texture\scenes\displacement Map1.mb. The same setup as the normal map tutorial is used in this scene as well. The scene contains two models separated on different layers. The low-resolution model layer, LORES, is visible while the high-resolution model layer, HIRES, is invisible. Only half of the highresolution model is being used. Step 2: A problem occurs when transferring displacement maps to the lowresolution mesh. The image is baked with the current normal information. Although this has to happen, it does produce undesirable effects. Take a look at Figure 8.24.
Figure 8.24 The transferred texture also bakes the low-resolution normals, creating an awkward pattern.
170
Maya Feature Creature Creations, Second Edition
Notice the softening of the normals between the faces. It creates an awkward tiled pattern across the image. There is no way to get rid of this, but it can be neutralized by adding more geometry to the low-resolution mesh. This is not a permanent change, just one for the purpose of transferring the displacement map. Eventually, we revert back to the original low-resolution mesh. Select the low-resolution mesh. Choose Mesh>Smooth. In the Channel Box, change the divisions to 3. This creates a suitable amount of geometry to alleviate the troublesome shading effect. Step 3: Open the Transfer Maps tool. With the low-resolution mesh selected, it is automatically added as the target mesh. In the Layer Editor, rightmouse-click on HIRES layer and choose Select Objects from the Marking menu. Add it as the source mesh in the Transfer Maps tool. Choose Displace from the Output Maps section. Change the file format and give it a name to correspond with the output UV Set. Step 4: The only other attribute to modify is the Maximum value. This value is derived from the highest elevation difference between the sculpted geometry and the modeled low-resolution mesh. Basically, you are turning on the low-resolution surface and the high-resolution surface at the same time and finding the greatest gap between the two. Due to the amount of geometry involved, an educated guess is sometimes more advantageous. In addition, favoring a lower value is preferable. Test several values to find an acceptable range. If the value is too high, the image is bright with little contrast. If it is too low, it will be dark and remove subtle detail. Change the value to .1. Step 5: The Maya Common outputs from the Normal map tutorial are rehashed. Map Width: 2048 × 2048 Keep Aspect Ratio checked Transfer in: World Space Sampling Quality: High (8x8) Filter Size: 7 Filter Type: Gaussian Fill Texture Seams: 1 Leave the last three options unchecked
Chapter 8 Creating Texture
171
Step 6: Make one last check to make sure the Output UV Set is correct and you are saving to a corresponding name. The first UV Set to bake is armLeft and is saved as armLeftDisp.iff. Choose Bake at the bottom of the Transfer window. Figure 8.25 shows the final displacement map for the left arm.
Figure 8.25 Here is the final displacement map for the left arm.
Step 7: Repeat the process to obtain all of the left-side maps. Select the highresolution mesh and scale it to negative one in the X. Freeze the transforms and reverse the normals. Repeat Steps 1 through 6.
172
Maya Feature Creature Creations, Second Edition
R ENDERING M APS All of the maps have been transferred, so it’s time to see the results. Maya has several different renderers at its disposal, only three of which are suitable for rendering the effects of displacement and normal maps. They are Maya software, Maya Hardware, and Mental Ray. Maya software is the default renderer. It renders displacement maps, but it cannot render normal maps. Maya hardware renders normal maps, but does not render displacement. Maya’s third-party renderer, Mental Ray, renders both. The following tutorials explain how to use all three of these renderers to display the maps.
TUTORIAL T UTORIAL : M AYA H ARDWARE (N ORMAL M APS )
Step 1: Open the scene file CD:\Chapters\Chapter 8\Creating Texture\scenes\ hardwareNormals1.mb. The scene has all of the normal maps applied to the appropriate material, save one. The head is not yet applied. Doubleclick the material head_Mat in the Hypershade. In the Attribute Editor, click the Create Render Node icon for Bump mapping. This opens the Create Render Node window. Make sure the texture is set to normal and choose file from the texture list. Clicking the Normal button has nothing to do with the normal map itself. This sets the texture to be mapped to the UVs of the model. Likewise, if you were to choose As Projection, it is projected onto the surface, ignoring the UVs. The bump2D node is loaded into the Attribute Editor. Change Use As: to Tangent Space Normals. Using a normal map negates the need for Bump Depth. You can ignore that channel. Figure 8.26 shows the setup. Click on the Create Render Node box, which is now a “next” icon, for Bump Value. This takes you to the File Texture node. Browse for CD:\Chapter8\CreatingTexture\sourceimages\headNormal.iff. The normal map is now loaded. Step 2: Go to the perspective viewport. From the panel’s menu bar, go to Renderer>High Quality Rendering. This turns on an advanced form of rendering, similar to how a game engine operates. The normal maps are now visible in the perspective viewport. Figure 8.27 shows the highquality hardware render.
Chapter 8 Creating Texture
Figure 8.26 Here are the menus for loading a normal map.
Figure 8.27 The real-time render of the normal maps.
173
174
Maya Feature Creature Creations, Second Edition
TUTORIAL T UTORIAL : M ENTAL R AY (N ORMAL AND D ISPLACEMENT M APS )
Step 1: Load the scene file CD:\Chapters\Chapter 8\Creating Texture\scenes\ mentalRay1.mb. The scene file contains the low-resolution Warkrat. Although Mental Ray interprets Maya’s nodes and renders with them, they do require some additional work. Let’s start with the displacement maps first. It is a good idea to begin with displacements to ensure they are tessellating properly. Adding a normal or bump map initially clouds the surface with detail, preventing you from seeing the true effects of the displacement. This makes it difficult to optimize and fine-tune their effects. Displacement maps are not added to the material like bump and normal maps are. Instead, they are added to the Shading Group node. This node sits above the material and is usually hidden from view. For convenience, Maya allows you to add a displacement map without actually having to touch the Shading Group node. Select the head_Mat material. Choose Graph>Input and Output Connections. The material and its Shading Group node are displayed in the work window of the Hypershade. Choose Create>2D textures>File. Double-click the new 2D texture file node and browse for headDisp.iff. Middle-mouse on the 2D texture node and drag and drop it onto the head material. A popup is displayed. Choose displacement map. The connection is made. Figure 8.28 shows the setup in the Hypershade. Step 2: The displacement node created has no options or abilities. It is only a middle man to bridge the gap between geometry and texture. Finetuning of a displacement map happens in the texture node and in Mental Ray’s Approximation Editor. Let’s take a look at what we have done so far. Choose Render>Render Using>Mental Ray. Render a frame. Figure 8.29 shows the results. You can see the effects of the displacements, none of which look very appealing. The head is bloated and disconnected from the rest of the body. The first value to change is the alpha intensity to affect the height of the displacement. This is located in the texture node of the map itself. In the Hypershade double-click the file node to enter the Attribute Editor. Open the Color Balance tab and change the Alpha Gain to .2. Render the frame again. Figure 8.30 shows the results.
Chapter 8 Creating Texture
175
Figure 8.28 The connection between the texture file and displacement node is made in the Hypershade.
Figure 8.29 A rendered view of the head with the default displacement settings.
176
Maya Feature Creature Creations, Second Edition
Figure 8.30 The head rendered a second time with an alpha gain of .2.
Step 3: The alpha gain states how far a triangle is displaced, based on the blackand-white value or alpha intensity of the texture. Black equals 0 and white is 1. This corresponds to Maya centimeters. If the texture is white, then the triangles are displaced 1 Maya unit in the direction of the surface normals. Therefore, if the texture is black, the triangles are not displaced at all. Setting the alpha gain to .2 lifts the triangles to a maximum height of 2/10 of a centimeter. Changing the preferences to feet or another unit of measurement does not affect the displacement map. It is always measured in centimeters.
Chapter 8 Creating Texture
177
Based on these facts, it is impossible to have a displacement map push triangles in the negative direction of the surface normal. It is possible to fake it. By setting the alpha offset to half of the negative value of the alpha gain, you force the displacement to be level with the original surface. If the alpha gain is .2, then the alpha offset is set to -.1. Instead of black being 0, it is equal to -.1, pushing down into the surface. To understand this better, think of it this way. The original range was from 0 to .2. Having an alpha offset of -.1 shifts the range to -.1 to .1, subtracting .1 from both sides. Solid gray becomes our new 0. Step 4: Applying a displacement map node tessellates or adds triangles; however, it does not offer any way to modify the amount of triangles. To do this, we need to add an Approximation node. Tessellating or approximating a surface is all done through the Approximation Editor. Open Window>Rendering Editors>Mental Ray>Approximation Editor. The window has three approximation types listed on the left-hand side. Although there is a label for displacement, you want a Subdivision Surface node. By using a Subdivision Approximation node, you kill two birds with one stone; the model is smoothed and displaced all through one node. Select the model. Choose the Create button within the Subdivisions section of the Approximation window. Selecting the model before clicking Create, automatically assigns the node. Figure 8.31 shows the Approximation Editor.
Figure 8.31 This is the Approximation Editor.
178
Maya Feature Creature Creations, Second Edition
Step 5: Choose the next button, Edit. The Attribute Editor pops up with the mentalRaySubDivApprox node loaded. Change the approximation method to Length/Distance/Angle. This method uses one or all three parameters to help tessellate the surface. Displacement for the Warkrat is based on distance. Distance is a measurement in object space of where subdivision occurs—the smaller the value, the greater the subdivision. To determine the distance, look at the detail you are trying to displace and compare it to Maya’s grid units. Based on the scale of the model, change the Distance parameter to .1. Next, check View Dependent. This causes objects close to the camera to render with more triangles, while objects farther from the camera are rendered with less. The Min/Max subdivisions control the number of times tessellating triangles are allowed to divide. A maximum of three usually does the trick. Each single unit generally increases the amount of triangles by a factor of 4. The max subdivisions should be incrementally raised, always comparing the results to the previous render, checking for noticeable changes. If changes are no longer obvious, return the attribute to the lower value. Keep a close eye on the amount of triangles being rendered. It is very easy to add an extra 100,000 triangles without a visible difference. Compare Figures 8.32 and 8.33.
Figure 8.32 The head rendered with a min/max of 0 and 3. It is made up of 573,700 triangles.
Chapter 8 Creating Texture
179
Figure 8.33 The head rendered with a min/max of 0 and 4. It is made up of 2,046,212 triangles.
There is a difference between these two heads. You can notice more defined detail around the lips. The question is, is the added definition worth the extra 1.5 million triangles? Remember, the next step is to add normal maps. Let them pull out the small details and save yourself from having to render an extra million triangles. Figure 8.34 shows the final settings of the Subdivision Surface Approximation node.
180
Maya Feature Creature Creations, Second Edition
Figure 8.34 Here are the settings for the Subdivision Surface Approximation node.
Step 6: Next, add the normal map. Load the map as outlined in the Normal Map tutorial. Step 7: Rendering right now shows the normal map as a bump map. To engage the normal map, you must check the Maya Derivatives in the Mental Ray renderer. This is located in the Render Settings>Mental Ray> Translation>Performance. Figure 8.35 shows the head as rendered through Mental Ray. The scene file CD:\Chapters\Chapter 8\Creating Texture\scenes\mentalRay2.mb has the normal and displacement maps applied to the model.
Chapter 8 Creating Texture
181
Figure 8.35 The head rendered with normal and displacement maps through Mental Ray.
C ONCLUSION Even though the base mesh is the only element needed to proceed, adding texture is a vital part of creating photo-realistic creatures. They add details in ways that are too costly or prohibitive through geometry. The sculpted detail from Chapter 5 has been added back to the model in the form of texture maps. By using the combination of normal and displacement maps, we can reduce the amount of geometry needed to produce the same results. Painting seams is arguably the most difficult part of the process, but necessary. The more time taken keeping both halves of the model aligned, the less time needed to paint them. Although the 3D Paint tool can be frustrating, it does the job. With a little practice and understanding, it is very useful and a tremendous timesaver. In Chapter 9, “Nucleus,” we begin looking at what it takes to create skin. Using a primitive character, the skinning pipeline is outlined and casually implemented. By the end of that chapter, the character is simulated and deforming on its own.
This page intentionally left blank
Part
Anatomically IV Correct
183
This page intentionally left blank
9
Nucleus
he driving force behind our creature is the nucleus simulation system. It presides over nCloth objects, passive collision objects, and dynamic constraints. It excels at handling numerous elements in a fast and stable manner. Through the nucleus system, we are able to describe bones, muscles, fat, and skin. Of greater importance, we can make them interact with each other. This is the most difficult and computationally expensive part of the process. Creating an entire character using Nucleus and its components is time consuming and seemingly impossible. However, resorting back to human anatomy references will provide solutions. Our character is not going to run in real-time mode. In fact, it may not even run on some computers. This chapter is devoted to getting acquainted with Nucleus and its components. First, we’ll look at a very basic setup. This helps to understand the tools and terms. Next, a simple creature is weighted. Even in its simplicity, the depth of using physics to drive the character is recognized. In addition, the same pipeline that will be used on our final creature is used here.
T
185
186
Maya Feature Creature Creations, Second Edition
N UCLEUS Nucleus is a physics-based engine used to drive other components of Maya. There are passive and active parts. nCloth objects are flexible surfaces in two regards. One, they actually bend, stretch, and compress. In another way, they are flexible in design to be a soft surface, hard surface, or even a surface that gets ripped apart. The following tutorial helps explain the attributes that define a surface.
TUTORIAL T UTORIAL : N C LOTH B ASICS
Step 1: Open the scene file nClothBasic1.mb from the CD:\Chapter9\nCloth\ scenes folder. The scene contains two spheres of different sizes. Switch to the Dynamics module. Select the outer sphere and choose nCloth> Create nCloth. It is now a deformable surface. Step 2: Choose the inner sphere and select nCloth>Passive. The sphere is now a rigid object. Rigid objects do not deform and are not under the direct control of the Solver, meaning you can animate them freely. Active nCloth objects deform when they come in contact with passive objects. Press Play on the timeline. The outer ball falls, based on gravity. The inner sphere stays stationary, causing the outer sphere to hang on it. Press Stop on the timeline and return it to the first frame. Step 3: Select the inner sphere and the Move Tool. Choose Interactive Playblack from the menu. During this mode, you can move the passive sphere around and see the nCloth object react in real time. Figure 9.1 demonstrates. This works well, given there are only two low-polygon objects in the scene. Step 4: Using this simple setup, you can explore critical attributes. Make sure the outer sphere is selected and choose nClothShape1 in the Channel Box. This time, press Play on the Timeslider. Instead of interacting directly with nCloth objects, you can change values in the Channel Box. These alterations are reflected immediately in the playing simulation. This does not require the use of the Interactive Playback tool.
Chapter 9 Nucleus
187
Figure 9.1 The two spheres interact with each other during interactive playback.
The following is a list of attributes with their defaults that we are going to modify. Use it as a quick reference to return the values back to their normal state after experimenting with them. Defaults Stretch Resistance = 20 Compression Resistance = 10 Deform Resistance = 0 Rest Length Scale = 1 Stretch Resistance: Fairly self-explanatory, this attribute controls how much the surface is allowed to stretch. Changing it to zero causes the surface to react violently, and therefore should be avoided. High values keep the surface tightly woven. Stretch resistance does not prevent it from deforming. It only keeps the surface from elongating when acted on by external forces or under its own weight. To see the effects, change the Stretch Resistance to 1. Notice the sphere sags. Figure 9.2 shows an example. Change the value back to 20.
188
Maya Feature Creature Creations, Second Edition
Figure 9.2 The sphere with a stretch resistance of 1.
The Stretch Resistance determines the flexibility of the skin. By painting specific values on the creature’s skin, it is possible to define the type of skin. For instance, hard calloused areas need a high stretch resistance. Other areas like the knees and hands require a low stretch resistance. Typically, anywhere that articulation is required, the skin is flexible. The attribute should not be misconstrued as something to define loose skin. Loose skin requires stretchable skin, but is not the main ingredient. Looking at your own body is a great source for determining where skin is made to stretch. Key identifiers are wrinkles. Wrinkles tell us the skin is anchored and has connective tissue from it to a fixed internal position. The skin is anchored because of its makeup. It is highly flexible. It must be locked down to keep it from sagging. Over time, this happens, regardless, as gravity and continual stretching takes its toll. Compression Resistance: Possibly the key to making skin, the Compression Resistance gives objects internal support. It is a force applied to the structure of the object, helping it maintain its original shape. This attribute also causes the surface to spring back after being deformed. Skin behaves differently. It does not have spring-like qualities. Instead, it behaves more like a rubber band. By setting Compression Resistance to 0, the sphere crumbles under its own weight. It now looks more like hanging skin. Figure 9.3 illustrates.
Chapter 9 Nucleus
189
Figure 9.3 Without compression resistance, the surface takes on skin-like properties.
Even though this attribute is basically turned off, it is extremely important. Without it, the skin performs like an inflated rubber ball, unwilling to take on new shapes. Setting the attribute to zero creates a bag of skin, waiting for us to fill it with muscle and bone. Skin by itself has no support mechanism. It is nothing more than a soft wrapper, a latex glove without a hand. If you took that glove and filled it with air, you would have compression resistance. Placing an articulate object inside the rubber glove causes it to deform, but the glove’s shape still resembles an inflated balloon. The internal pressure prevents it from bunching up and wrinkling. Deform Resistance: The unwillingness of a surface to deform. The higher this attribute goes, the less reaction you get from the surface. Make sure that Compression Resistance is set to 10. Change Deform Resistance to 10 and press Play on the timeline. The sphere acts very rigid. It still deforms, but its resistance to deforming keeps it from changing after its initial impact. Deform Resistance does not keep it from deforming; it only means a greater force is required to make it deform. This attribute is useful for thick skin. The thicker the skin, the less likely it is to change. Again, it’s not that it is incapable of deforming, just that it requires a higher force to make it happen. Deform Resistance is useful in areas like the ears or foot heels.
190
Maya Feature Creature Creations, Second Edition
Rest Length Scale: Each vertex has a connection between it and an adjacent vertex. By altering the Rest Length Scale, you change the length of that connection. Making it smaller pulls the vertices closer together, and larger creates the opposite effect. Make sure that all the values of the previous attributes are set back to their defaults. Change the Rest Length Scale to .5. Figure 9.4 shows the results.
Figure 9.4 The sphere after the Rest Length has been set to .5.
The Rest Length Scale changes the initial state of the connectors. When you create a new nCloth object, the connections between the vertices are scaled to the exact distance. Therefore, each connector is a different length. The Rest Length Scale is a multiplier to change those values. This is useful for wrapping the skin tightly around muscle and bone. It provides tension to keep the skin from sagging. Step 5: Open the scene nClothBasic2.mb. The scene has three passive spheres and one nCloth object wrapped around them. The following attributes have been applied to the nCloth object. Rest Length Scale = .7 Stretch Resistance = 1 Compression Resistance = 0
Chapter 9 Nucleus
191
Select the top passive sphere and the Move Tool. Choose Interactive Playback from the nCloth drop-down menu. Move the passive sphere around the scene. Do not go too fast or too far away from its origin. Think of the deforming nCloth object as skin. If you pull it too hard or too far, it will tear. If you stretch it too far, it will remain permanently stretched. Play with the rotation and scale to see their effects. The skin slips and slides a lot. Another important attribute for good skin simulation is friction. It is found on the nCloth object, as well as the passive objects. Stop the Interactive Playblack. Return to frame one and set the sphere back to its original spot. Its transforms are frozen, so Translate and Rotate are zero, and Scale is one. Change the Friction on the nCloth object to 50. Select the top sphere again and run the Interactive Playback. Notice how the nCloth sticks to the sphere more. It is not sliding and acting uncontrollably. The passive object’s Friction does the same thing and relatively has the same effect. Altering a passive object’s Friction only affects the nCloth where it touches it. To achieve the look of the nCloth object with a Friction of 50, you would have to change the Friction values for all of the passive objects. Setting the Friction on individual passive objects allows greater flexibility and control over the skin. Step 6: The last parameter to consider is the Bend Resistance. High values of Bend Resistance give the nCloth the appearance of supporting its own weight. It is similar to Deform Resistance, except high values of Deform Resistance work to keep the object’s shape. While Bend Resistance allows the object to bend, it fights to keep adjacent vertices straight. Experiment with the attributes to understand the differences. Figures 9.5 and 9.6 compare the two extremes. Step 7: In addition to the parameters of the geometry, Nucleus also provides us with nConstraints. These extremely powerful connectors complete our setup and solve very difficult problems. Select the row of vertices inbetween the top sphere and middle sphere. Hold Shift and select the middle sphere. Choose nConstraint>Slide on Surface. Use Figure 9.7 as reference.
192
Maya Feature Creature Creations, Second Edition
Figure 9.5 The Deform Resistance is set to 10.
Figure 9.6 The Bend Resistance is set to 10.
Chapter 9 Nucleus
193
Figure 9.7 Create a Slide on Surface constraint between the top and middle passive objects.
Step 8: Change the constraint Connection Method from Spring to Rubber Band. Set the Rest Length Scale to 0 and the Strength to 1. Choose Interactive Playback and move the top sphere around. Keep it in Wireframe mode to see what the constraint is doing. When you pull the top sphere away from the middle one, the constraint does its best to keep its row of vertices locked to its associated sphere. The Rest Length scales the vertices, always conforming the skin around it. Remember, the goal is to reproduce skin. Pulling the sphere too far breaks the simulation, as it would real skin. Figure 9.8 shows the constraint in action. The last scene file, nClothBasic3.mb has all of the settings applied. The next tutorial explains the process of creating a full anatomically driven creature. To help understand the complexities of anatomic rigging, a primitive fish-type creature was chosen. The emphasis is on establishing the proper connections, attribute values, and integrating all of the necessary elements.
194
Maya Feature Creature Creations, Second Edition
Figure 9.8 The Slide on Surface constraint holds the vertices tightly around the middle sphere.
TUTORIAL T UTORIAL : N C LOTH F ISH
Step 1: Open the scene file fish1.mb. The scene contains five layers. The first layer is called MESH. It contains a polygon skin of our creature, shown in Figure 9.9. This will become an nCloth object. Next, is the SKELETON layer. It has the geometry of the creature’s skull and tail spines. It is shown in Figure 9.10. The MUSCLE layer follows, shown in Figure 9.11, holding what will become the creature’s principal passive objects. The RIG layer is next, shown in Figure 9.12. The joint setup used to animate the fish is on this layer. Each muscle is a child of one of the joints; therefore, turning this layer on or off also affects the muscles. The last layer is called ORIGINAL. It has a duplicate of our mesh. We do not need this until the very end. Turn the visibility of MESH and ORIGINAL off. Press Play on the timeline. The fish is animated with a swimming-type motion. To keep with the theme of the book, it was animated using hair dynamics. Once the simulation was satisfactory, the motion was baked to the joints. The mouth motion is driven with a sine expression. To establish the skin, it is usually necessary to turn off or delete any animation applied to the
Chapter 9 Nucleus
Figure 9.9 The MESH layer contains the polygon skin of our creature.
Figure 9.10 The SKELETON layer holds the head and tail geometry.
195
196
Maya Feature Creature Creations, Second Edition
Figure 9.11 The MUSCLE layer holds the body muscles.
Figure 9.12 The RIG layer has the Maya joints.
Chapter 9 Nucleus
197
character. In this case, the fish has enough static frames in the beginning of its sequence to avoid any unwanted movement. In the event you need to turn it off, choose Edit>Quick Select Sets>Rotation_Joints. In the Channel Box, highlight the rotation words. Right-click on them and choose Mute Selected from the pop-up menu. Next, select joint9 or the lower mandible joint and mute the Rotate Z channel. Last, select joint2 and mute the Translate Y and Z channels. If you press Play on the timeline, the character should remain still. In case you are wondering, the anatomy created for the fish is not anatomically correct. As mentioned earlier in the chapter, we are using a very simple setup to gain an understanding of the process. It is also useful to see how deviating from reality affects the creature. Step 2: Select all of the muscle and bone geometry. Make them passive nCloth objects. Turn on the visibility for the MESH layer. Select the creature’s skin and make it an nCloth object. Pressing Play on the timeline results in a mesh similar to the one shown in Figure 9.13.
Figure 9.13 The simulation was run using the nCloth defaults.
The results are less than spectacular. You also can feel the tremendous difference in simulation time; it went from real time to slow time. Remember, at any time during the simulation, you can press ESC to stop it.
198
Maya Feature Creature Creations, Second Edition
Step 3: Go back to frame 1. The first attributes to change are the ones we know for sure. Change the Compression Resistance to 0. Change the Friction to 50. We could change the Friction on the individual muscles; however, given the type of animal, the effect would not contribute to the desired look. Finally, change the rest length scale to .9. This shrinks the skin around the muscle and bone but not so tightly as to prevent it from having loose pockets. Figure 9.14 shows the results after simulation.
Figure 9.14 Here are the results after the Compression Resistance, Friction, and Rest Length have been modified.
Step 4: As a backup, you can load fish2.mb. Playing the simulation works, but only in the sense that the geometry is pulled along for the ride. It does not act like skin. Take a look at fishSkinTop.mov and fishSkinSide.mov located in CD:\Chapter9\Movies. When the fish bends, the skin pulls away from the muscle. These results are accurate. The skin is taking the path of least resistance. The temptation may be to change the Rest Length to a smaller value. This causes a lot of unfixable problems. The first is the overall effect scaling has on the geometry in relation to the collision objects. It pulls the skin tight enough to break it free of smaller collision objects. The second problem is that the connections tend to kink up, which results in popping and interpenetration. Figure 9.15 shows the results of changing the rest length scale to .1.
Chapter 9 Nucleus
199
Figure 9.15 The results after changing the rest length scale to .1
Connective tissue needs to be created between the muscle and skin. This way the skin is allowed to move with the muscle but not pull away from it. Select a ring of vertices in-between the head and the preceding muscle. Choose nConstraint>Slide on Surface. Repeat this procedure for every row of vertices in-between each muscle. You should end up with seven rows constrained. Use Figure 9.16 as reference. Change the Strength to 1, the Rest Length Scale to 0, and the Connection Method to Rubber Band. The constraints now pull on the skin, keeping it close to the muscle but still allowing it to move freely. Step 5: You can load fish3.mb as a backup if need be. Running the simulation now gives us decent results on the mid section of the fish. The head still has problems. Two issues arise. The first is that the skin around the head should not move. Figure 9.17 illustrates the problem. The skin moves freely giving way to our second problem of the skin— thickness. This attribute controls the simulated thickness of the skin. It does not alter the geometry. It is an invisible barrier around the skin, colliding with itself and passive objects. Since the mouth is opening and closing, the skin is being forced to penetrate the invisible barrier, causing havoc on the geometry. Change the thickness value on the skin from .021 to 0.
200
Maya Feature Creature Creations, Second Edition
Figure 9.16 Add seven rows of connective constraints, one in-between each muscle.
Figure 9.17 The skin around the head does not adhere to the skeleton like it should.
Chapter 9 Nucleus
201
To solve the initial problem of the skin sliding, select all of the vertices making up the top of the head and the skull passive object. An easy way to select the vertices is to grab a few and use the Grow Selection keyboard shortcut, >, to expand your selection. ChoosenConstraint>Point to Surface. The constraint gets created, and the vertices are deselected. Repeat the procedure for the jaw line vertices and select the mandible bone. Add another Point to Surface constraint. Use Figure 9.18 as a guide.
Figure 9.18 Add two different Point to Surface constraints, one to the skull and the other to the mandible.
Step 6: The tail tends to slip off its spines from time to time. Using the same methods as explained in Step 5, attach the skin to the spines. The selection needs to be more precise. Grab only the vertices in alignment to a single spine. Then choose the corresponding spine and add the constraint. Use Figure 9.19 for reference. Repeat for all of the spines. Select all of the constraints and change the Connection Method to Rubber Band and set the Rest Length Scale to 0.
202
Maya Feature Creature Creations, Second Edition
Figure 9.19 Add a Point to Surface constraint for each of the spines.
Step 7: All of the principal attributes are set. It is now time to cache the simulation and view the final results. Select the fish skin and choose the nCache>Create New Cache tool options. Give the cache a name, for instance, fishtest1. Set the File Distribution to One File. Setting this creates one large file with all of the data needed to play the simulation back in real time. The other option, One File Per Frame, is more versatile and allows you to do more. However, this being a simple exercise, we chose the latter. The rest of the default options are fine. Choose Create. This can take up to an hour, depending on the speed of your system. The first few frames solved give you an indicator of how long it might take. The simulation should solve at the same speed through the timeline, barring any catastrophic problems. The scene file fish4.mb on the CD contains the scene with all of the settings. It has been cached already and loads automatically with the scene. Step 8: The skin animates decently with its anatomy, far from being perfect, but for a test case, not too badly. The beginning of the animation pulls the skin tightly around the creature’s anatomy. Although it is an interesting effect, it isn’t desirable to have in our animation. It actually distorts
Chapter 9 Nucleus
203
the mesh from its original state. If this had been a more detailed model, it would have ruined the look. To fix the problem, a Wrap Deformer is employed. Before adding the wrap, it is necessary to relax the skin into its initial state. Move the Timeslider back to frame 1. Delete the cache by choosing it from the nCache drop-down menu. Choose Edit nCloth>Initial State>Relax Initial State. The default settings are shown in Figure 9.20 and work perfectly for this example. This automated procedure applies the nCloth attributes to the model. By doing this, the skin settles into its at-rest position. Without this, we would see the geometry react to the initial attributes every time.
Figure 9.20 The default settings of the Relax Initial State tool.
We can now add the Wrap Deformer. Switch to the animation module. Select the skin and then hide the MESH layer. Turn on the visibility of the ORIGINAL layer. Hold Shift and choose the original fish geometry. Choose Deform>Wrap. The default settings are acceptable. The Wrap Deformer does not play back in real time. To view the animation, it is best to create a Playblast. In the Chapter9\Movies folder is finalFish.mov. It shows the original geometry wrapped around the simulated skin. The scene file Fish5.mb has the final setup.
204
Maya Feature Creature Creations, Second Edition
C ONCLUSION After setting up a basic creature, you can start to see where improvements can be made. For starters, if the anatomy were based on a real living creature, the deformations would dramatically improve. Next, arranging the geometry so it lines up with the anatomy underneath it would provide an equal and necessary amount of deformable faces in-between the connective tissue. Another change is to separate the eye from the skin geometry. Just as it is in life, the eyeball should be a separate piece. To further the look of the skin deformations, attribute maps can be painted to give per-vertex values to the mesh. These modifications make huge improvements to the quality of the creature. Now we have an understanding of the entire pipeline and how things fit together. In the next chapter, we’ll take a look at building a skeleton and the rig to drive it.
10
Skeletons
he skeleton is the backbone of all life. Regardless of whether it is an exoskeleton or endoskeleton, an IK system, or collection of deformers, characters need some type of structure to support their motion. This infrastructure, or “rig,” can range from simple to immensely complex. Creating rigs for film requires a degree of complexity to enable the animator to move the character freely. In this chapter, we examine the Warkrat’s skeleton and how it relates to characters in general. The primary focus is on the creature’s arm, building a suitable rig to handle the complex actions of a real-world wrist. Modeling a skeleton specifically for a character is an interesting endeavor. The concept is to build bone to be anatomically correct and to fill space within your model. A modeled skeleton typically reveals inaccuracies in your geometry. Building bones to their proper proportions results in bones protruding through the skin or being too small to accommodate the creature’s mass. It is great for correcting unseen problems in your model, and a way to double-check your work.
T
205
206
Maya Feature Creature Creations, Second Edition
Skeletons also provide anchor points for our muscles. Utilizing nConstraints, muscle components are connected to skeletal components, for example, vertices to faces. Making these types of connections provides internal accuracy. It allows precise anatomic modeling, which then leads to precision deformations.
S KELETAL M OTION Skeletal bones in living organisms are connected together and separated by various tissues forming what is called a joint. There are many different types of joints in life; however, only four provide significant movement for our characters. They are hinge, pivot, ball-and-socket, and saddle joints. HINGE JOINTS As the name implies, these joints swing in one direction or in a single plane. Hinge joints are considered uni-axial meaning they can only rotate in one axis. This type of joint can be found in fingers, knees, and elbows. Figure 10.1 shows the rotation of a finger joint. The separation between the bones is where the actual joint tissue would be.
Figure 10.1 This is an example of a hinge joint.
Chapter 10 Skeletons
207
PIVOT JOINTS This joint allows a bone to move around another or rotate about its own axis. Pivots are also considered uni-axial. An example of this type of joint is the motion found in the rotation of the wrist. The radius rotates in a single plane around the ulna. Figure 10.2 illustrates this action.
Figure 10.2 This is an example of a pivot joint.
BALL-AND-SOCKET JOINTS In this type of joint, one bone has a rounded, ball-like end, cupped by an opposing bone. This provides three degrees of freedom or rotation in multiple axes. The shoulder and hip are examples of ball-and-socket joints. Figure 13.3 shows the rotation of the humerus bone. SADDLE JOINTS The bones in these joints fit together like two saddles with the tops facing each other with one saddle rotated 90 degrees. This allows the joint to be biaxial. An example of this type of joint is where the thumb connects to the wrist. Figure 13.4 shows the basic rotation of a saddle joint.
208
Maya Feature Creature Creations, Second Edition
Figure 10.3 This is an example of a ball-and-socket joint.
Figure 10.4 This is an example of a saddle joint.
Chapter 10 Skeletons
B UILDING
AN
209
IK S YSTEM
With the skeleton complete, creating a system of Maya joints is nothing more than connecting the dots. As discussed earlier in this chapter, the space between each bone is the joint. From joint to joint is exactly where you want to draw the beginning and end of the IK. Positioning of the Maya joint is important, but how the joint rotates is most critical. They must imitate real-world joints as much as possible. To accomplish this, you must understand how IK works just as you did with real-world joints. IK has three parts: the ball, which is the joint; the extended triangle, which is the bone of the previous joint; and the handle, which controls all of the joints. The first joint drawn is the root. Examine the diagram in Figure 10.5.
Joints Root Joint
Bones
IK Handle
Figure 10.5 This is an example of an IK skeletal system.
The root joint is a three-dimensional joint, meaning it can rotate in all three axes. All of the joints thereafter are planar or uniaxial. The length of individual bones helps determine the amount of rotation. Joints should be drawn at the angle in which you want them to rotate—the sharper the angle, the greater the rotation. Figure 10.6 shows the difference in rotation based upon the size and angle of the middle joint.
210
Maya Feature Creature Creations, Second Edition
Figure 10.6 This example shows the difference in rotation achieved by modifying the middle joint.
M ODELING B ONES The shape of each bone is almost inconsequential. They are never rendered or used as collision objects. They are buried deep within the character and function as glorified placeholders. Primitive cylinders can be just as effective. With that said, the more time and effort put into creating bones, the more accurate the end product becomes. Bones are primarily used for anatomy anchors. Vertices from muscles and tendons are attached to components of the modeled bone. Increasing the accuracy of the bone also increases the accuracy of muscle position and deformation. As mentioned, it is possible to use primitive cylinders, for best results model lowresolution versions of each bone. Some bones require more work than others. Time is taken with the humerus, radius, and ulna. A lot of action is performed by these three arm bones. The arm itself draws a lot of attention from the outside. The muscles driven by the bones, for example, the bicep and triceps, are prominent under the skin and seen often during production—unlike the leg muscles, which tend to be covered in clothing, fur, or otherwise shown briefly. The bones do not need to be modeled with a tremendous amount of precision. The key is to model the major landmarks defining the bone’s shape. Take a look at Figure 10.7. It shows the modeled radius and ulna.
Chapter 10 Skeletons
211
The ulna fits together with the humerus in a puzzle-piece fashion. The top of the bone is curved to wrap about the end of the humerus. It is designed to rotate in a single direction. Figure 10.8 shows the connection. Even if you didn’t have prior knowledge of how these bones worked, it is evident that rotating the ulna in the negative direction is prohibited by its shape. Bone proportion is the biggest dilemma in modeling the skeleton. The size of the bones helps determine the dimensions of the muscles surrounding and connecting to the skeleton. Again, because the bones and their interaction inside the creature are never seen, there is a lot of room for error. However, using them to their full advantage helps take the guesswork out of placing muscles and joint articulation. A quick way to deal with bone proportions is to use the Sculpt Geometry Tool. By setting the operation to pull, and then flooding the surface with the desired displacement, it increases the bone’s girth without actually scaling it. The displacement is not based on the center of the object; instead, it pushes each face out locally. Figure 10.9 shows the difference between scaling and pulling.
Figure 10.7 The radius and ulna are modeled with a fair amount of detail. Each one is modeled with 220 triangles on average.
Figure 10.8 By design, the ulna rotates only in one direction.
212
Maya Feature Creature Creations, Second Edition
Figure 10.9 The bone on the left is untouched. The bone in the middle was flooded with a pull value from the Sculpt Geometry Tool. The bone on the right was scaled uniformly.
Once the bones are complete, it’s time to add joints and control handles to bring life to the skeleton. Having bones takes the guesswork out of joint placement. Using them as reference models, joint centers are snapped to bone vertices. This doesn’t always prove to be accurate but provides a good starting point. Joint rotation is also aided by the bones.
B ONE O RIENTATION Modeling bone is relatively easy. It does not require you to be meticulously accurate. Positioning bones is about the same. They do not need to be located precisely. What is important, however, is the bone’s orientation relative to the skin’s modeled position. Take, for instance, the forearm. The action of the muscles and bones of the forearm is a complex action to achieve. In order to maintain realism and proper deformations, it is necessary to duplicate this motion. As with everything, you must understand the action before you can recreate it. The hand has two positions driven by the forearm. It is said to be either pronated or supinated. This describes whether the palm is face down, pronated, or face up, supinated. Take a look at Figure 10.10. It shows the Warkrat’s arm in its modeled pronated position.
Chapter 10 Skeletons
213
Figure 10.10 The Warkrat’s wrist is in a pronated position.
The wrist is rotated to be face down. In this position, the radius is twisted over the ulna. If you look down the length of your own arm, you can see the action of the radius. Straighten your arm as if to touch your finger to your nose. Rotate your wrist so that your thumb is pointing up. Angle your elbow to face directly behind you. By doing this, you force your radius and ulna to be parallel to one another. Now, rotate your wrist so your thumb points forward. Figures 10.11 and 10.12 demonstrate.
Figure 10.11 The position of your arm from a distance.
214
Maya Feature Creature Creations, Second Edition
Figure 10.12 This is how your arm should look as you look down the length of it.
It is important to note in which position you model the character. The bones themselves are not important, but the muscles attached to them are. Having the bones in the wrong orientation ultimately causes the muscles to stretch or twist incorrectly. This can result in the muscles being ripped from their bones or deforming poorly. Figure 10.13 shows the final bone placement for the radius and ulna.
Figure 10.13 The final bone placement of the radius and ulna.
Chapter 10 Skeletons
215
R IGGING Anatomic rigging is not very different from normal rigging. All of the same tools and techniques are implemented. The biggest and perhaps only difference between traditional rigging and anatomic rigging is the joint placement and the number of joints implemented. It does not necessarily use more or less joints, only a different amount. A simple rule to follow is one joint for every bone. Nothing earth shattering, just common sense. Since binding the character to the skeleton is no longer essential, we can take more freedoms. For instance, it is not necessary to add a string of bones along the forearm to compensate for the twisting of skin weights. We do, however, add extra joints to control the motion of the ulna. The arm offers many challenges. The following tutorial walks you through the rigging process.
TUTORIAL T UTORIAL : A RM
Step 1: Open the scene file arm1.mb. The scene contains the Warkrat’s skeleton, geometry, partial joint skeleton, and several custom-made control handles. Each aforementioned group has been placed on its own layer. Joint placement is extremely important. It literally defines how the character moves, whether through IK or FK. The arm joints are extremely crucial due to the size and proportions of the creature’s arm. The hand joints are already done. The scapula, humerus, radius, and ulna need to be addressed. Switch to the Animation module and choose Skeleton>Joint Tool. Draw a joint at the top of the humerus. The next one is placed at the elbow. It goes in-between the connection of the humerus and ulna. Figure 10.14 shows its placement. The elbow joint is offset from the center of the arm to match the position of the bones. The ulna connects to the inside bottom corner of the humerus. It does not sit perfectly centered. In order for the bones to move properly, it is necessary to match this link. The last joint for the wrist does not need to be drawn. It is done for you as part of the hand. Press Enter to complete the joints and close the tool.
216
Maya Feature Creature Creations, Second Edition
Figure 10.14 The position of the elbow joint is offset from the humerus bone.
Step 2: Make the RIG layer visible. The joints for the hand are displayed. Select the root or wrist joint and make it a child of the elbow. The forearm bone is completed automatically. Step 3: Every joint has an orientation manipulator that can be oriented to any axis. The orientation can also become misaligned from the joint icon itself. Take a look at Figure 10.15. The middle joint has become misaligned as a result of rotating the joint. The joint icon should be aligned with the rotation manipulator. Figure 10.16 shows the corrected joint. The scale icon is being shown instead of the Rotate manipulator so you can see the orientation of the joint icon clearly. The joints must be orientated properly in order to achieve proper rotation. Having the joints misaligned causes the IK to move the joint chain at awkward angles. To orient the joints open the tool options for Skeleton>Orient Joint. All of the default settings work in this case, except for Orient child joints. Make sure this is unchecked. The reason for this is that the wrist has already been properly orientated. Choosing to orient the child joints will destroy the manual precision already applied to the wrist.
Chapter 10 Skeletons
Figure 10.15 The middle joint is misaligned.
Figure 10.16 The middle joint has been corrected.
217
218
Maya Feature Creature Creations, Second Edition
Select the shoulder joint and press apply in the tool options. If you had to move the joints after you created them to position them properly, it may be necessary to freeze their transforms before reorienting them. Any joint with a rotational value needs to be frozen and reoriented. Select the elbow joint and orient it. The wrist is already done; you can close the tool options. Orienting joints is very important and necessary. It is explained in greater detail in a more problematic situation later in the tutorial. Step 3: Add an IK handle from the shoulder to the wrist. Make sure that you use an RP solver. By doing so, you gain control over the elbow via the pole vector. Step 4: Turn the visibility on for the CONTROL_HANDLES layer. This displays several custom control handles made from NURBS. Choose the one named poleVector. Point-snap the handle to the elbow joint. To make snapping easier, turn off the visibility of the SKELETON layer first. Set the X rotation value to -90 and freeze the transforms. Figure 10.17 shows the progress thus far.
Figure 10.17 The pole vector handle is positioned at the elbow.
Chapter 10 Skeletons
219
Step 5: To manipulate the elbow independent from the IK handle, we add a pole vector constraint. The constraint is added to the handle we positioned in Step 4. If we add the constraint based on the control handle’s current position, snapped to the elbow, it will have no adverse effect on the elbow’s orientation. This is exactly what we want. However, the current position of the control handle is not where we want it. It could go unchanged; ideally, it is best to move away from the character. This helps make the control handle more visible during animation and also keeps the elbow from rotating or flipping readily. By moving the control handle arbitrarily and adding the pole vector constraint, the elbow is forced to align to a new vector. This has a negative impact by causing the arm joints to rotate or shift from the orientation established previously. To ensure the elbow does not move when the constraint is added, you must align the control handle to the existing pole vector. The handle can be moved away from the character but only along the vector. To move the handle properly, we need to get the current vector from the IK handle. By default, Maya only shows three values for all of its attributes. We need a greater precision to establish the pole vector. In the Channel Box, choose Channels>Settings>Change Precision. Set the value to 15, the maximum allowed. Copy the Pole Vector X value and paste it to the control handle’s Translate X attribute. Make sure the control handle’s translate values are all at zero before pasting. Copy the other two channels as well. Make sure to press Enter after each entry. Unfortunately, there is no way to have the pole vector values and control handle’s attributes on the screen at the same time with 15 digits of precision. It is necessary to go back and forth between objects. Figure 10.18 shows the progress thus far. The control handle is now moved away from the elbow and outside of the creature’s geometry. This is a suitable position. Select the control handle and Freeze the transforms. With the control handle still selected, hold Shift and select the IK handle. Choose Constrain>Pole Vector. The constraint is added, and the elbow does not move. You can change the precision of the Channel Box back to three digits. If you need to move the handle further back, draw a linear curve from the joint to the center of the control handle. Change the curve’s center to the same location as the elbow joint. Uniformly scale the curve. You can now snap the control handle to the curve and move it anywhere along the vector. Make sure to freeze the transforms when done. This can be done even after the constraint is added. Figure 10.19 demonstrates.
220
Maya Feature Creature Creations, Second Edition
Figure 10.18 The pole vector’s XYZ values are copied and pasted into the control handle’s Translate XYZ values.
Figure 10.19 Create a two-point linear curve between the control handle and elbow to relocate the pole vector handle.
Chapter 10 Skeletons
221
Scale the control handle to the appropriate size. The scale of the control handle can be done at anytime and has no bearing on its performance. This is true of the handle’s rotation as well. To make the handle look appropriate, constrain its rotation back to the elbow with an Aim constraint. Choose the elbow first and then hold Shift to select the handle. Open the tool options for Constrain>Aim. Keep all of the defaults except for the Aim Vector. Set the X to 0 and the Z to 1. Choose Add to apply the settings and close the window. The control handle now always points to the elbow. Figure 10.20 shows the results.
Figure 10.20 Constrain the control handle to the elbow with an Aim constraint.
Step 6: Select the control handle named ball. It is located in the center of the world. Snap the ball to the wrist joint. Rename the ball to armL. Freeze the transforms. The handle needs to be oriented to the wrist joint. Simply rotating does not suffice. The handle must be orientated and the transforms frozen without the manipulator returning to a global position. To achieve this, the control handle must be a child of an object with the same orientation as the wrist joint. This way, freezing the transforms of the ball handle while it is a child of another object causes it to take on the rotation values of its parent.
222
Maya Feature Creature Creations, Second Edition
First, create an empty group node. With nothing selected, choose Create>Empty Group. Snap the newly created node to the wrist. Freeze the transforms and rename the null to wristGrpL, which stands for wrist Group Left. Next, select the wrist joint and wristGrpL. Use the Outliner or Hypergraph to select the null group node since it has no icon. Choose Constrain>Orient. Make sure that Maintain Offset is unchecked in the Constraint tool options. Delete the Orient constraint from wristGrpL. Do not freeze the transforms. Select the wrist joint and then armL. Choose Constrain>Orient. The ball handle rotates to match the wrist’s rotation. Find the Orient constraint you just added to armL and delete it. Select armL. The rotation values are no longer highlighted in blue and are free of any connections. The values, however, still need to be put back to zero. Do not freeze the transforms. Although this would return the values to zero, it would also change the orientation back to its global settings. Instead make armL a child of wristGrpL. Observe what happens to the rotation values of armL. They have returned to zero, and the manipulator is still oriented to the wrist. Step 7: Make the IK handle of the arm a child of armL. Moving armL now controls the arm. To add the wrist rotation to the same handle, add an Orient constraint without maintaining its offset, from armL to the wrist joint. You can now control the arm and wrist motion through the armL handle. Step 8: It’s time to add the radius bone. Turn the visibility on for the SKELETON layer. Draw a joint for the radius bone using the modeled bone as reference. The first joint or root is snapped to the middle vertex on top of the radius. This is next to the elbow. The second joint is snapped to the wrist joint. Figure 10.21 illustrates. Step 9: Orient the radius joint using the Orient Joint tool’s default options. Add an IK handle using an RP solver. Rename the IK handle to radiusLikHandle. The RP solver is overkill for a single bone skeleton. However, to keep the orientation of the ulna stable, it is necessary to add it. Make sure that nothing is selected and choose Create>Empty Group. Snap the group node to radiusLJoint1. Freeze the transforms and rename it to radiusGrpL. The radius’s pole vector position is not as crucial as the elbow position. It is not necessary to use 15-digit precision. Choose the radiusGrpL and then radiusLikHandle. Select Constrain Pole Vector. Next, select the root radius joint, radiusLjoint1, and make it a child of radiusGrpL.
Chapter 10 Skeletons
223
Figure 10.21 Draw a joint for the radius.
Select radiusGrpL and make it a child of the elbowLJoint. Finally, select the radiuis IK handle and make it a child of wristLJoint. This procedure keeps unwanted rotations from affecting the radius, forcing it to remain still until we rotate armL. Step 10: Select armL and radiusLikHandle. Open the Hypergraph: Connections from the Window drop-down menu. Press the middle mouse button while over the armL node. Hold the button down and drag the cursor over the radiusLikHandle node. Release the button. Choose Other from the pop-up menu. The Connection editor automatically opens with the proper nodes preloaded. Click on Rotate X from the armL output and twist from the radiusLikHandle input. Close the Connection editor. The twist is now connected to the armL’s rotate X attribute. Anytime armL is rotated in the X, the radius will twist. Step 11: To see all of this in action, let’s parent the bones to the joints. Select the modeled radius bone and make it a child of radiusJoint1. Parent the humerus, ulna, and wrist bones to their corresponding joints. Step 12: The last bone to set up on the arm is the scapula. Turn the visibility on for the SKELETON layer. Set it as a reference layer. Add a single joint by snapping it to the back middle vertex of the scapula. Use Figure 10.22 as a guide.
224
Maya Feature Creature Creations, Second Edition
Figure 10.22 Draw a joint for the radius.
Step 13: Orient the joint using the defaults from the Orient Joint tool. Select the shoulder joint and make it a child of the newly created scapula joint. Add an IK handle from the root of the scapula to the shoulder. Set the solver to an SC solver type. Rename the handle to scapulaLikHandle. Turn referencing off for the SKELETON layer. Select the scapula model and make it a child of the scapula joint. Step 14: The only thing left to add is a control handle for the scapula IK handle. Anything can be used. Using the Pencil Curve tool, draw the rough shape of a human scapula in the front view. Figure 10.23 shows an example. Rename the curve to scapulaL. Center the pivot point of the curve. Snap the curve to the scapula joint. Position the curve outside of the creature’s geometry. Do not worry about moving it off the joint itself. The pivot will be relocated once we are done. Continue to manipulate the handle’s position. If need be, modify the curve’s control vertices to fit the contours of the geometry. Press insert and snap the pivot point back to the scapula. Press insert again to return to normal mode.
Chapter 10 Skeletons
225
Figure 10.23 Draw a human scapula with the Pencil Curve tool.
Step 15: Make sure that nothing is selected. Choose Create>Empty Group. Snap the newly created node to the scapula joint. Freeze the transforms and rename the null to scapulaGrpL. Next, select the scapula joint and scapulaGrpL. Choose Constrain>Orient. Make sure maintain offset is unchecked in the Constraint tool options. Delete the Orient constraint from scapulaGrpL. Do not freeze the transforms. Select scapulaL. Make scapulaL a child of scapulaGrpL. Freeze the transforms to conform the control handle’s manipulator to the group node. By making the scapula control handle a child of the oriented null, it allows it to have symmetrical manipulation. This means that when both the right and left control handles are rotated simultaneously, they move in the same direction. For instance, a shoulder shrug is easily done by selecting both handles and rotating them in the Y with the shared manipulator. Step 16: Select the scapulaLikHandle and make it a child of scapulaL. By rotating scapulaL, the proper movement is achieved. Figure 10.24 shows the finished handle.
226
Maya Feature Creature Creations, Second Edition
Figure 10.24 The finished scapula handle.
The arm is complete. Grab armL and move it as if to grab something. Rotate the handle to see the motion of the radius. Figure 10.25 displays the proper results. Remember, you must set the rotation manipulator to “gimbal” to keep the rotate XYZ values separate. If you don’t, then certain angles cause the X rotation value to receive values and possibly flip the radius. The finished version of the arm is carried over to the next tutorial, “The Spine.” The right arm is done in the same manner, except for the twisting of the radius. When the joints are mirrored, the values are also mirrored. This causes the rotation of the radius to go in the opposite direction, as shown in Figure 10.26. To fix this, connect armR.rotateX to the input X of a reverse utility node. Then connect the reverse utility node output X to radiusRikHandle.twist. The reverse utility node automatically flips the values, resulting in correct rotation of the radius bone. The scene file arm2.mb has the completed arm setup.
Chapter 10 Skeletons
227
Figure 10.25 The arm is positioned and the wrist rotated to check the accuracy of the radius bone.
Figure 10.26 The radius bone is rotating in the opposite direction from the arm control handle.
228
Maya Feature Creature Creations, Second Edition
TUTORIAL T UTORIAL : T HE S PINE
Step 1: Open the scene file spine1.mb. The scene contains the Warkrat’s skeleton, geometry, completed arm rig, spine joints, and spine control handles. Each aforementioned group has been placed on its own layer. There is one spine joint for each bone in the skeleton. The joints have been oriented properly, with Z facing the positive Z direction. There is a control handle per three joints. The handles have been parented to empty group nodes and oriented to match the joints. In order to gain control over the spine of the creature, it is advantageous to have two joint skeletons, one that drives the other. The first joint skeleton is made up of forward kinematics and utility nodes. It is used to drive the second, a spline IK joint skeleton. Select spineJointRoot. Duplicate the joint skeleton and add it to a new layer. Name the layer FK_SKELETON. Step 2: Turn the visibility off for all of the layers except SPINE and SPINE_CONTROL_HANDLES. Open the tool options for Skeleton> IK Spline Handle Tool. Turn off all of the options, except Root on Curve and Auto Create Curve. Close the tool options and add a spline IK handle from the root of the spine to the tip. Step 3: Turn the visibility off for all of the layers except FK_SKELETON. Select all of the joints in order, starting with the root joint. This is easiest through the Outliner or Hypergraph. Choose rename from the end of the status line. Type spineJointFK in the field and press Enter. All of the joints are renamed sequentially. Step 4: Select spineJointFK, hold Shift, and select the curve from the IK spline handle. Choose Skin>Bind Skin>Smooth Bind. Use the default options. The curve is now bound to the FK skeleton. Step 5: Turn the visibility on for SPINE_CONTROL_HANDLES. Select spine1 and constrain spineJointFK2 to its orientation. Repeat this for the rest of the spine control handles. Use the list below for reference. spineJointFK5 to spine2 spineJointFK8 to spine3 spineJointFK11 to spine4 spineJointFK14 to spine5
Chapter 10 Skeletons
229
spineJointFK17 to spine6 spineJointFK20 to spine7 spineJointFK23 to spine8 The spine FK joints now rotate with the spine handles. This, in turn, deforms the curve, which rotates the spline IK. The reason for the elaborate or seemingly redundant setup is to utilize the strengths and advantages of the spline IK. The spline IK curve gives us more options when rigging. For instance, the joints could be driven dynamically, or given the ability to stretch with the curve, typically called stretchy IK. A major factor separating spline IK from normal IK is how the twist attribute operates. Instead of simply rotating joints about the roots global position, it rotates each joint about the curve. This motion is characteristic of a real spine. Spline IK by itself is difficult to control, usually done so through cluster handles. The joints themselves cannot be manipulated. Every action must go through the associated curve. By binding the curve to another joint skeleton, we gain control over the curve through standard joint rotation. This gives us greater freedom in the way we control the joints. Step 6: Not all of the joints are being affected. Having a handle at each vertebrae is messy and difficult to animate. Instead, connections from one joint to another are used to automate the motion of the bones in-between each handle. Select spineJointFK3 and spineJointFK2. Open the Hypergraph connections. Press and hold the middle mouse button on spineJointFK2 and drag to spineJointFK3. Choose Other from the pop-up window. The Connection Editor comes up preloaded with the proper inputs and outputs. Choose Rotate from the Outputs side and Rotate from the Inputs side. SpineJointFK3’s rotation is now driven by spineJointFK2’s rotation. Perform the same operation for the next joint, connecting spineJointFK3’s rotation to spineJointFK4. Connecting the joints in this manner makes each one rotate independently. When the control handle is rotated, all three joints rotate and curl the spine. Figure 10.27 shows an example. Step 7: The scene file spine2.mb is completed up to this point. The next handle, spine2, stays stationary whenever the joints behind it are rotated. This makes the spine difficult, if not impossible, to animate. To avoid this, select spineJointFK4 and then hold Shift and select spineGrp2.
230
Maya Feature Creature Creations, Second Edition
Figure 10.27 The spine control handle is rotated, curling all three joints.
SpineGrp2 is the parent node of spine2 control handle. It is the node holding the transforms to keep spine2 oriented properly. With both selected, open the tool options for Constrain>Parent. Check Maintain Offset, Translate All, and Rotate All. Press Add. A parent constraint is added to the spineGrp2 node. This forces the node to follow all of the actions of spineJointFK4. Since spine2 is a child of spineGrp2, it goes along for the ride, without locking any of its channels, specifically rotation. Spine2 updates with the motion of skeleton and allows for further manipulation and keyframing. Repeat this procedure for the rest of the joint skeleton. Use the chart below for reference. Output spineJointFK5.rotate spineJointFK6.rotate spineJointFK8.rotate spineJointFK9.rotate spineJointFK11.rotate spineJointFK12.rotate spineJointFK14.rotate spineJointFK15.rotate spineJointFK17.rotate spineJointFK18.rotate spineJointFK20.rotate spineJointFK21.rotate
Input spineJointFK6.rotate spineJointFK7.rotate spineJointFK9.rotate spineJointFK10.rotate spineJointFK12.rotate spineJointFK13.rotate spineJointFK15.rotate spineJointFK16.rotate spineJointFK18.rotate spineJointFK19.rotate spineJointFK21.rotate spineJointFK22.rotate
Chapter 10 Skeletons
231
Constraints Parent constrain spineGrp3 to spineJointFK7 Parent constrain spineGrp4 to spineJointFK10 Parent constrain spineGrp5 to spineJointFK13 Parent constrain spineGrp6 to spineJointFK16 Parent constrain spineGrp7 to spineJointFK19 Parent constrain spineGrp8 to spineJointFK22
Step 8: Turn off the visibility for the FK_SKELETON layer. Turn on the visibility for SPINE and SKELETON. Individually select each vertebrae and make each one a child of the closest joint. To be clear, the modeled vertebraes become children of the spline IK joint skeleton. Starting with l5, make it a child of spineJointRoot. L4 is a child of spineJoint1, etc. Go up the spine until all of the vertebrae are children. Step 9: Select spineIKHandle and spine8. Choose Hypergraph:Connections. Hold the middle mouse button over the spine8 node and drag and drop onto spineIKHandle. Choose Other from the pop-up menu. The Connection Editor appears. Choose Rotate Z from the Outputs and Twist from the Inputs. Spine8 now controls the Twist attribute on the IK spline. Go ahead and test the connections. Select spine8 and rotate it in the Z. The vertebrae rotate around the curve. Try out the rest of the handles. Step 10: Open spine3.mb. This scene file picks up where Step 9 left off. In addition, some parenting and joint creation have been added. Specifically, all of the ribs have been parented to their corresponding vertebrae. Also, joints were added at the ends of each rib. The joints are parented to the corresponding joint of the spline IK. These were added to move the sternum. If you rotate one of the spine control handles, you see the sternum stays stationary. The sternum and connecting cartilage do not move a great deal in real life, but definitely move with the ribs. The cartilage connecting the ribs and sternum is there to allow for some flexibility. To accomplish this motion, we use a smooth bind. Select each joint of the ribs, 20 in all. Hold Shift and select the sternum geometry. Choose Skin>Bind Skin>Smooth Bind. Use the default settings. The new bind keeps the joints attached to the cartilage and rotates the sternum with the rib cage.
232
Maya Feature Creature Creations, Second Edition
Step 11: Select scapulaLJoint. Make it a child of spineJoint15. Step 12: The last part of the spine is a control handle for full body motion. Parent-constrain spineGrp1 to spineJointFK1. Select COG and parentconstrain spineJointFK to it with Maintain Offset turned on. You can now move the COG control handle to translate and rotate the entire character. The feet will stay planted when IK is added to the legs. The scene file spine4.mb has the completed spine setup. Rigging the rest of the character is pretty straightforward. The leg can be done in the same manner as the arm. The head, hands, and feet are done without any traditional techniques. There are no special anatomic conditions.
C ONCLUSION Anatomic rigging is based on what we know of anatomy. The guidelines are easy to follow, one joint for every bone. The same is true when designing the modeled skeleton, one bone for every joint. The most challenging part of the process is mimicking the correct motion. For starters, there are not a lot of resources demonstrating correct three-dimensional motions of human or animal skeletons. Most of what is available is limited to multiple still images or written explanations. Luckily for us, we all have living, breathing reference libraries, our own bodies. Ultimately, it takes every resource you can find. Start by reading the medical explanations. Next, look at artist-rendered 3D interpretations from the Internet or medical software. Surmise the research by comparing it to how your own body moves. The bones are ready for action. Using the methods described for the arm, you can build the entire character. Remember, the bones do not deform the skin. The main purpose is to define joint placement and proper articulation. In Chapter 11, muscles and tendons are added to the Warkrat.
11
Muscles and Tendons
n a living organism, it is the brain that causes the muscles to expand and contract, which move bones and joints. In a digital character, you do things in reverse. By moving IK or FK joints, you move the modeled bones, which in turn drive the muscles. The order is different, but the results are the same. In the previous chapter, you set up a skeleton for your creature. Now we add muscles over the bones. Just like the skeleton, the muscles are never rendered. In addition, tendons are connected to a few of the muscles. Like all systems of the human body, myology, the study of muscles, is an immense topic. To fully understand these actions, it is best to consult articles or books dedicated to the subject.
I
233
234
Maya Feature Creature Creations, Second Edition
M USCLES There are three basic parts to a muscle: the origin, the belly, and the insertion. The origin is the root of the muscle. It is from here that the muscle pulls. The belly is the body of the muscle. This is the part doing the contracting. It contracts, or pulls, toward the origin. The insertion, or end, of the muscle pulls on the bone or tendon. A contracting muscle also expands. When a muscle tightens, its fibrous tissue accumulates in the belly, causing the surrounding tissue to expand. This is the muscle bulge. The muscle pulls, activating bone rotation at the joint. Bones are acted upon by more than one muscle. A bone is loosely connected to other bones by tissue, but tissue alone is not enough to support the weight or motion of the bone. In order to stabilize it or keep it straight, many muscles act upon it. This same action occurs to return a bone to its original position. For instance, when the bicep contracts, the tricep and brachii muscles return it, to name a few. Muscle does not always connect directly to bone. In numerous locations, tendons are employed to go from the muscle to the bone. Tendons are relatively stiff; their length changes nominally if at all. Tendons are usually found in thinner areas of the body, acting as a pseudo lever extension. They are able to deliver more power to areas that are too small to support the larger, more powerful muscles, for example, the fingers. The next step in our character’s growth is a layer of muscle. It is required to add all of the muscles before running a skin simulation. Attempting to simulate the skin before muscle finalization produces inaccurate and often catastrophic results. There are several different ways a muscle can be built. The easiest and most functional way is through Maya’s own muscle system. The following tutorial focuses on building the bicep, tricep, deltoids, and radialus muscles. Building muscles for a creature is obviously different from a human. There is a good chance you will have gaps between your muscle and bone. This is fine. The body has a lot of other things going on inside of it that push muscle closer to the surface. Also, muscles within a living organism are much more complex in shape and design than the ones we are about to create. Simplifying the muscle saves us a lot of time and aggravation. Trying to replicate them exactly does not always yield better results.
TUTORIAL T UTORIAL : A RM M USCLES
Step 1: Load the scene file muscle1.mb from the CD:/Chapter11/Muscles/scenes. The scene contains the Warkrat’s arm mesh, skeleton, rig, and control handles. Each group is assigned to a layer of the same name. For simplicity’s sake, all of the Warkrat’s other parts have been removed from the scene.
Chapter 11 Muscles and Tendons
235
Choose Muscles>Muscle/Bones>Muscle Builder UI. The muscle builder interface is launched. It opens on the first tab entitled Build. None of the other tabs have any influence until a muscle exists. Select humerusL and click the triple arrows at the end of the AttachObj1 row of the muscle UI. Object one is loaded in the blank space. Select radiusL and click the triple arrows from that row. Choose Build/Update from the bottom of the window. The muscle is created. Figure 11.1 shows an example of the interface.
Figure 11.1 Here is the muscle builder interface.
Step 2: There are three sections under the Build tab. The first two control the placement of the origin and insertion points of the muscle. The third section manipulates the makeup of the muscle, altering size, shape, and amount of controlling curves. The muscle can be positioned through the UI using the At and offset X and Z attributes. It can also be moved directly by selecting one of the locators at either end of the muscle in a 3D viewport. Moving the muscle via the Move Tool offers a greater range of movement. This is especially useful in characters with awkward proportions, like the Warkrat. Position the muscle to match the skin’s modeled bicep muscle. The origin is placed above the armpit, and the insertion point is snapped to the inside of the radius bone. Modify the width and falloff to fit the muscle to the skin. Figure 11.2 shows the final placement.
236
Maya Feature Creature Creations, Second Edition
Figure 11.2 The bicep muscle is created and positioned appropriately.
Step 3: The next tab, labeled Cross Section, shows two different viewport angles of the curves making up the muscle. These curves can be manipulated by translating in two axes, rotating, or on a component level. You cannot lengthen the muscle, only alter its shape. All of the same hotkeys and manipulators normally used apply here as well. To select a curve, click it in the viewport or choose the curve label from the list on the left side of the interface. The bicep muscle is good as is. It does not require any adjustments to its shape. Step 4: The next tab, Finalize, sets up the amount of deforming handles and the type of deformer used. Make sure it is set to Muscle Spline Deformer. This is the more advanced deformer of the two and produces better results. The next attribute Num Controls defines how many control handles are applied to the muscle. The bicep only requires three. At the end of the slider is an option to change the appearance of the control handle. They can be cubes, circles, or locators/null objects. Below these options is the ability to mirror the muscle to the other side of the character. This is incredibly useful and a tremendous time-saver. In addition, the text fields allow you to change the names during the mirror process, similar to the Mirror Joint tool.
Chapter 11 Muscles and Tendons
237
With the muscle selected, examine the Channel Box. There is a loft node in the inputs. The curves used to modify the muscle, under the Cross Section tab, are held together through this loft node. Upon choosing Build/Update from the muscle UI, the muscle history is deleted, removing the loft node and all associated curves. A muscle deformer node is then connected, along with several other nodes, to produce the muscle flexing. If you go back to the Cross Sections tab after choosing Build/Update, the menu and viewports are empty. Choose Build/Update from the muscle UI to complete the muscle. Type a unique name, bicepL, to signify the left bicep. The muscle is now controlled by three yellow cubes, one for the origin, belly, and insertion point. Step 5: Make iControlBicepL1 and 2 a child of the humerus geometry. Make iControlBicepL3 a child of the radius geometry. The muscle now moves with the arm. Step 6: Click the last tab, Muscle Parameters. This tab can also be accessed through Muscle>Muscle/Bones>Set Muscle Parameters. It does not matter how you access it. The first section, called Muscle Object Settings, pertains mainly to muscles used with the skin deformer. Since we are using nCloth for our skin deformer, ignore this section. The next section is called Stretch Volume Presets. It controls how the muscle squashes and stretches or how the muscle flexes. There are four presets across the top: default, small, medium, and large. Below that are the start, middle, and end girth of the muscle. Two rows represent the muscle when stretched and two rows for when it is squashed or flexed. The muscle’s created size is always 1. Increasing the values makes the muscle look flexed, and decreasing them makes it look thinner or stretched. Choose the large preset. Change the Mid Squash X value to 1.6. Move the arm control handle to see the muscle in action. Step 7: Maya muscle also has the ability to control muscle jiggle. By default, muscle jiggle is active. It only responds when you play through the Timeslider. The Jiggle Presets tab has similar attributes to the Stretch Volume Presets. Across the top are presets, as well as control to turn the jiggle completely off. Three attributes control the motion of the muscle at the Start/origin, Mid/belly, and End or insertion. They are called Jiggle, Cycle, and Rest. The following is a description of each.
238
Maya Feature Creature Creations, Second Edition
Jiggle: This controls how far the muscle is allowed to move; the larger the value, the greater the amplitude. Most muscles are going to have a relatively small amount of jiggle. This happens because they are compacted into tight areas, surrounded by other muscle, bone, and skin—all of which is applying pressure against it, keeping it from having too much freedom. Cycle: The cycle governs the speed or frequency of the jiggle. Lower values cause the muscle to shake or bounce more rapidly. Higher values slow it down. Cycle is good at conveying the mass of a muscle. Using a low value, for example 2, gives the muscle the impression of being thin and light. Increasing it to 15 makes it look heavy and lumbering. Rest: This is how quickly or how slowly the muscle stops jiggling. A low value makes the jiggle end quickly and abruptly. Raising it prolongs the effect, for a smoother transition back to its default state. Again, most muscles are not going to move very much. The jiggle typically ends quickly. If it isn’t already selected, choose the Bicep muscle. Click the Medium preset. These values work well for this size muscle. An important thing to remember is that all muscle does not have to jiggle. Some are better off and look more realistic with no movement. The bicep muscle is now ready to go. Create a quick animation on the arm to test it out. Play it back to see the jiggle effect. Play the animation all the way through the first time. After that, you can scrub through the timeline.
T ENDONS The majority of muscles in the forearm end in tendons. The tendons travel down into the fingers. Tendons require more geometry and control handles due to their length traversing multiple joints. The next tutorial focuses on building muscle with tendon.
TUTORIAL T UTORIAL : T ENDONS
Step 1: Open the scene file muscle2.mb. The scene contains the arm setup and bicep muscle from the previous tutorial “Arm Muscles.” Open Muscles> Muscle/Bones>Muscle Builder UI. Choose the Build tab. Select the modeled radius bone and add it as AttachObj1. Select indexDistalL and add it as AttachObj2. Choose Build/Update to create the muscle.
Chapter 11 Muscles and Tendons
239
In its present state, the muscle does not have enough geometry to span the distance from the radius bone to the last joint in the finger. You can add more geometry to the muscle, even though it has already been built. First, move one of the locators to the distal bone and change the falloff to zero. Use Figure 11.3 for reference.
Figure 11.3 Position the insertion point of the muscle.
Look at the number of spans. There is a lot of space between each span relative to the number of joints. With the muscle stretched, you can get a good idea of how much geometry is required for it to deform properly. In the muscle builder UI, change the nSpans to 13. Press Build/Update at the bottom of the window. The muscle is reset and updated with the desired number of spans. Grab the end locator and move it to the finger again. Figure 11.4 shows the locator’s placement on top of the distal bone. Step 2: Switch to Cross Section in the muscle builder UI. We want to scale and adjust several of the curves to look more like tendon. There are 13 curves listed. Curves 1 and 13 cannot be modified. Choose curve 12. You cannot scale the curves in Object mode. You must use their components. Press F8 to enter Component mode. Select all of the control vertices or CVs and scale them. Translate the points as well to position the scaled vertices on top of the finger bones. Figure 11.5 demonstrates.
240
Maya Feature Creature Creations, Second Edition
Figure 11.4 Move the locator to the index finger’s distal bone.
Figure 11.5 Scale curve 12 through its components to look more like a tendon.
Chapter 11 Muscles and Tendons
241
Step 3: Repeat Step 2 for curves 7 through 12. As you scale the curves, keep in mind that you are dealing with NURBS. NURBS are approximated surfaces. They rely on each curve to define the surface as a whole. Modifying one affects a greater surface area than the curve’s local position. Also, you can scale all of the curves simultaneously by selecting their components and choosing Component Use Object Pivot from the Scale Tool options. After the tendon is shaped, fit the muscle to the skin. Figure 11.6 shows the final muscle.
Figure 11.6 The muscle is shaped to form a tendon from the index finger to the forearm.
Step 4: An unnecessary, but useful step is to add a different shader to the new muscle. Adding color to the tendon portion of the muscle helps keep things better organized and more visually acceptable. Again, this provides nothing for performance. If you are happy with the results, this step can be omitted. Right-click on the surface and choose Assign New Material>Blinn. Create a ramp texture for the color channel. In the new ramp attributes, delete the green channel. Change the blue channel to white and set the Selected Position to .4. Set the red channel’s selected position to .6.
242
Maya Feature Creature Creations, Second Edition
This creates a nice transition between the two colors perfectly centered in ramp. To match the red of the existing muscles, change the red values to: Hue: 14.63 Saturation: 1 Value: .820 The blinn material has several attributes to modify as well. Use the following values. Eccentricity: .600 Specular Roll Off: .250 Specular Color: Hue: 347.81 Saturation: .335 Value: .749 Reflectivity: 0 Figure 11.7 has the final muscle.
Figure 11.7 The final muscle with its new shader.
Chapter 11 Muscles and Tendons
243
Step 5: Switch to the Finalize section in the Muscle Builder UI. Change the number of controls to 8. Choose Convert to Muscle. Eight new handles are created on the muscle. Use the chart below to parent each handle to a modeled bone. PARENT
CHILD
IndexMiddleL
iControlRadialusL8
IndexProximalL
iControlRadialusL7
IndexMetaCarpalL
iControlRadialusL6
carpalsL
iControlRadialusL5
radiusL
iControlRadialusL4
radiusL
iControlRadialusL3
radiusL
iControlRadialusL2
humorusL
iControlRadialusL1
Step 6: Click the Muscle Parameters tab. Set the Stretch Volume Presets to Small. Set the Jiggle Presets to OFF. Move the arm control to test the newly formed muscle. Notice how the tendon stays locked to the bones. Often, the muscle does not flex or squash in the manner desired. To compensate, it is possible to establish your own muscle shapes for stretching and squashing. The next tutorial explains how.
TUTORIAL T UTORIAL : C USTOM M USCLE S HAPES
Step 1: Open the scene file muscle3.mb. The scene contains the arm setup and muscles from the previous tutorial, “Tendons.” Open Muscles>Muscle/ Bones>Custom Muscle Shapes. The Muscle Spline Deformer Shape interface opens up. Select BicepL. Click the triple arrows to load the muscle into the interface. BicepL is now listed in the text field. Step 2: When you move the arm, the Current State value, located at the bottom of the interface, updates. Values from zero to negative one represent the squash of the muscle, while zero to positive one is the stretch. Move the arm until the current state is roughly -.550. Click Prep for Sculpt from the interface. It is not necessary to have the muscle selected.
244
Maya Feature Creature Creations, Second Edition
Step 3: The muscle turns green, and its components are displayed. There is a color chooser and slider to alter the color of the editable muscle. You can now shape the muscle to represent the bicep more accurately. Use Figure 11.8 as reference.
Figure 11.8 A custom shape is defined for the bicep muscle.
Step 4: When done sculpting the muscle, choose Create New. A dialog box pops up. Type an original name, such as bicepLFlexed. The name of the muscle is listed in the selection box, and the muscle is returned to its normal state with the changes intact. Move the arm handle to see the change in the bicep’s flexed state. Step 5: You can add as many different shapes as needed, altering the current state value for each shape. To edit the shapes after completion, repeat Steps 1 through 3. When the changes are done, instead of selecting Create New, choose Edit.
C USTOM M USCLES Not all muscles fit the predefined shape the Muscle Builder UI provides. For instance, the large deltoid muscles are flat and open at the origin and insertion points. For muscles like these, it is possible to model your own muscle and simply apply the Muscle Spline Deformer to it. The following tutorial takes you through the steps.
Chapter 11 Muscles and Tendons
245
TUTORIAL T UTORIAL : C USTOMIZING M USCLES
Step 1: Open the scene file muscle4.mb. The scene file contains the finished bicep and radialis muscles. Create a primitive NURBS cylinder using the settings in Figure 11.9.
Figure 11.9 Create a primitive cylinder using these settings.
Step 2: All of our muscles, regardless of size and shape, need to have closed ends. The deltoid has a large origin connecting to the clavicle and scapula. Let’s work on it first. Scale the cylinder to .375 in the Z-axis. Step 3: Select the top two rows of control vertices. Scale them in the Z until they come together. Use Figure 11.10 as reference. Step 4: The Warkrat has several groups of deltoid muscles. Use Figure 11.1 and the following coordinates to place the cylinder on top of the deltoid directly on top of the shoulder. Translate X: 2.124 Translate Y: 8.489 Translate Z: -.271 Rotate X: -94.077 Rotate Y: 80.657 Rotate Z: -50.606
246
Maya Feature Creature Creations, Second Edition
Figure 11.10 Scale the top two rows of CVs together.
Figure 11.11 Translate and rotate the cylinder into position on top of the shoulder geometry of the Warkrat’s arm.
Chapter 11 Muscles and Tendons
247
Step 5: Two rows of CVs make up the top of the cylinder. These are the same two rows scaled in Step 3. Select one set and snap them to the beginning of the deltoid on the modeled skin. Make sure that Retain Component Spacing is unchecked in the Translate Tool options. Snap each group across the top. Figure 11.12 shows the vertices snapped to the skin.
Figure 11.12 Snap each of the two vertices making up the top rows of the cylinder to the Warkrat’s skin.
Step 6: Translate and rotate the hulls of the NURBS cylinder to conform it to the surface of the underlying deltoid shape. Do not modify its thickness. Try to keep its volume intact. Use Figure 11.13 for reference. Step 7: Select the last two rows of CVs on the cylinder. Point-snap all of them to the insertion point of the deltoid muscle on the skin surface. Use Figure 11.14 as a guide. Step 8: Select all of the CVs except the last rows at the insertion and origin points. Open Edit NURBS>Sculpt Geometry Tool. Reset the tool to restore the defaults. Change the opacity to .5. Choose the Relax brush. Press Flood. The selected vertices are relaxed, creating a smoother, evenly spaced NURBS surface. Figure 11.15 shows the results.
248
Maya Feature Creature Creations, Second Edition
Figure 11.13 Shape the cylinder using hulls to maintain its thickness.
Figure 11.14 Snap the last two rows of CVs to the insertion point of the modeled deltoid.
Chapter 11 Muscles and Tendons
249
Figure 11.15 The Relax Sculpting tool separates the isoparms in an evenly-spaced manner.
Step 9: Orient the camera similar to the view in Figure 11.15. The goal is to look down the normals of the surface. Change the sculpting operation to Push. Set the Reference Vector to View and the Max Displacement to .2500. Choose Flood. The surface is pushed down under the polygon skin. Several vertices may still show through. This is okay as long as the isoparms are not visible. Manually push any parts still protruding out, including the origin and insertion points. The goal is to push the muscle under the skin. Figure 11.16 shows the muscle’s final position. Step 10: The muscle’s position and shape is good. One tweak to the surface still remains. The Muscle Spline Deformer is added to the start or seam of the surface. This is the highlighted white isoparm on the side of the muscle shape. Adding the deformer puts the controls along this line, as seen in Figure 11.17. This is not the most optimal position. To fix this, select the surface. Choose the Edit NURBS>Rebuild Surface tool options. Use the settings displayed in Figure 11.18.
250
Maya Feature Creature Creations, Second Edition
Figure 11.16 The surface is modified to fit under the Warkrat’s skin.
Figure 11.17 The deformer is added along the seam of the cylinder.
Chapter 11 Muscles and Tendons
251
Figure 11.18 The correct settings for rebuilding the cylinder.
Apply the settings. By adding 9 spans to the V direction, the surface isoparms are now balanced. A single isoparm is centered down the length of the muscle. Step 11: Right-mouse-click over the surface. Choose Isoparm from the Marking menu. Select the center isoparm. Choose Edit NURBS>Move Seam. The seam shifts to the center isoparm. Figure 11.19 shows the current state of the muscle. Step 12: Make sure that the muscle is selected. Choose Muscle>Muscle/Bones> Apply Muscle Spline Deformer. Enter deltoid3L for the name of the muscle in the Muscle Spline Deformer interface. Choose Setup Muscle Spline Deformer. The muscle control handles are placed properly. Figure 11.20 shows the final placement. Step 13: Make the origin handle a child to the scapula geometry and the insertion handle a child to the humerus geometry. Move the arm handle to test the muscle.
252
Maya Feature Creature Creations, Second Edition
Figure 11.19 The seam is moved to the center of the deltoid.
Figure 11.20 The muscle control handles are placed properly down the center of the deltoid muscle.
Chapter 11 Muscles and Tendons
253
All of the muscles in the body can be accomplished using the three methods described in the previous tutorials. The key is not to over complicate the muscle. You should only build components that influence the skin. There are dozens of muscles that have no visible bearing on the surface. Another important factor is that the muscle does not need to make physical contact with the bone. It is acceptable to build it only as far as its contact with skin. On that note, it is also important not to have large gaps where the skin can fall through. Figures 11.21, 22, and 23 show the arm with numerous muscles added to it from various angles. The scene file muscle5.mb has the final setup.
Figure 11.21 A front view of the arm and its musculature.
C ONCLUSION Muscles are the most prominent deforming objects under your creature’s skin. Building them is a time-consuming process. There can be hundreds to create. Make sure to plan ahead and make the most of the Mirror function under the Finalize tab. This literally cuts the workload in half. Up to this point, you have set the stage for skin deformation. In the next chapter, you will apply rigid-body anatomy to the skin and give the skin properties.
254
Maya Feature Creature Creations, Second Edition
Figure 11.22 A side view of the arm and its musculature.
Figure 11.23 A back view of the arm and its musculature.
12
Skin
n the past two chapters, you built bones, muscles, and tendons. These parts were set up to move with a rig through parenting and deformers. In this chapter, the muscles, tendons, and bones are made into passive nCloth objects. To create skin, the Warkrat geometry becomes an active nCloth object. The attributes are modified, and constraints are added to keep the skin attached to the muscles. The skin collides and reacts to the muscles. The muscles are key to making the skin work correctly. As in a human being, the skin merely reacts to the forces applied to it. By itself, it is nothing more than an empty wrapper. The following tutorials take you through the process of making skin.
I
255
256
Maya Feature Creature Creations, Second Edition
S ETTING U P
THE
A NATOMY
Before the skin can be made into an active nCloth object, the nails need to be removed. Any part of the model that would not stretch or deform is removed from the geometry. They are detached and made into passive nCloth objects. This gives them the ability to react with the active nCloth skin.
TUTORIAL T UTORIAL : P ASSIVE N AILS
Step 1: Load the scene file skin1.mb from the CD:/Chapter12/Skin/scenes. The scene contains the Warkrat’s arm geometry, muscles, skeleton, control handles, and rig. Each group is assigned to a layer. Select all of the faces to the nails. A quick way to do this is to select the tips of each nail and choose > on the keyboard to grow the selection to the nail bed. Use Figure 12.1 for reference.
Figure 12.1 Select all of the faces making up the nails.
Chapter 12 Skin
257
Step 2: Choose Mesh>Extract. The geometry is separated, but still attached through history. Delete the history and freeze the transforms. Extract also creates a group node and places each extracted piece under it. Press Shift and P on the keyboard to unparent the nails. Step 3: Select all three nails. Rename them appropriately. Choose nCloth> Create Passive. Step 4: Parent each nail to the associated fingertip joint. For display purposes, do not parent the fingers to the modeled skeleton bones. Instead, parent the nails to the joints of the rig. This way, turning off the skeleton layer leaves the nails displayed. Some of the modeled bone may penetrate through the skin during simulation. To prevent this from showing up during renders, the layer is turned off. This has no adverse effect on the simulation. Step 5: For finishing touches, assign the nail geometry to the bone shader. Next, the muscles are made into nCloth passive objects, which allows them to collide against the skin. One drawback to nCloth is that it does not support NURBS surfaces. Coincidentally, polygons are not supported by Maya Muscle. This creates an obvious compatibility issue. Fortunately, there is a simple enough workaround. By converting the NURBS muscles into polygons and retaining the history, they can be made into passive nCloth objects. The history connection passes the deformations onto the polygon models. Utilizing layers helps keep the muscles organized and the entire process has little impact on performance.
TUTORIAL T UTORIAL : P ASSIVE M USCLES
Step 1: Load the scene file skin2.mb from the CD:/Chapter12/Skin/scenes. It picks up where the previous tutorial, “Passive Nails,” left off. The scene contains the Warkrat’s arm geometry, muscles, skeleton, control handles, and rig. Each group is assigned to a layer. Select all of the NURBS muscles. To facilitate selection, turn on the handles, joints, and curve selection masks and turn off the unneeded layers. Choose Modify>Convert>NURBS to Polygons Tool options. Change the settings to match Figure 12.2.
258
Maya Feature Creature Creations, Second Edition
Figure 12.2 Use these settings to convert the NURBS muscles to polygons.
Step 2: After choosing convert, all of the polygon muscles are selected. Create a new layer. Name it POLYGON_MUSCLES. Assign the polygon muscles to it. Step 3: With the polygon muscles still selected, choose nCloth>Create Passive. The muscles are now nrigid objects that will collide against active nCloth objects. Remember, the key to making this setup work is retaining the history. Do not delete history on the muscles. Here is a quick review of our setup so far. There are two muscle layers. The first layer is the NURBS muscles. These muscles are connected directly to the muscle spline deformer. Anytime the muscle motion needs to be corrected, these are the muscles we need to modify. The polygon muscles that are assigned to a different layer are the collision muscles. Through history connections, they inherit all of the motion of the NURBS muscles. The polygon muscles are the nrigid objects. They are modified indirectly through the NURBS muscles and the nrigid body attributes.
Chapter 12 Skin
259
Step 4: The nails and bones are also made into nrigid objects. Turn off the muscle layers. Select the bone and nail geometries. They can be selected all at once or individually. It does not matter. Use the selection masks again to keep from selecting handles and joints. Choose nCloth>Create Passive. Step 5: All of the passive collision objects are established. Now it’s time to add the skin. Select the Warkrat arm geometry. Choose nCloth>Create nCloth. All of the essential elements have been created and assigned to the Nucleus solver. Pressing Play on the Timeslider causes the skin to react. It falls, based on the gravity settings, and rests on the polygon muscle arm. Figure 12.3 shows the results. From the looks of Figure 12.3, the arm skin did not change much. This is exactly what we want. The muscles should be a nice fit for the skin. The skin does not need to fit perfectly. It can slip and slide and even lose its shape. This is okay. In fact, in the next tutorial we’ll force the skin to wrap around the muscles and bone, altering the modeling look of the geometry.
Figure 12.3 The skin is draped over the muscles.
260
Maya Feature Creature Creations, Second Edition
TUTORIAL T UTORIAL : N C LOTH S KIN
Step 1: Load the scene file skin3.mb from the CD:/Chapter12/Skin/scenes. It picks up where the previous tutorial, “Passive Muscles,” left off. The scene contains the Warkrat’s arm geometry, NURBS muscles, polygon muscles, skeleton, control handles, and rig. Each group is assigned to a layer of the same name. Change the rest length scale to .9. Setting this to any value less than 1 causes the connections between each vertex to shrink, thus creating a shrink-wrap effect from the skin to the muscles. Press Play on the timeline to observe the effects. Figure 12.4 shows an example of the results.
Figure 12.4 The skin shrinks, but also falls off.
The skin sloughs off the muscle. There are two principal reasons for this. One is that we are dealing with an incomplete surface. The arm has a huge hole at the shoulder end. If it were a full character, its reaction would be different. It may still slide, but it would drape instead of fall off. The second reason is that the skin is not connected to the muscle like real skin is. Connective tissue runs from the skin to muscle and other internal anchors.
Chapter 12 Skin
261
Step 2: To fix the initial problem of the arm having a hole, constrain the last row of vertices to the scapula bone. This only needs to be done because we’re setting up a small portion of the creature. Make sure you are at frame 1, returning the model to its unsimulated positions. Switch to vertices by right-mouse-clicking over the geometry and choosing vertex from the marking menu. This way, only the arm is in Component mode. Select the border row of vertices on the arm. Hold Shift and select the scapula object. Choose nConstraint>Point to Surface. Figure 12.5 shows the attached constraint. Press Play to run the simulation. The skin stays on the arm, without falling off. Return to frame one.
Figure 12.5 Attach a Point to Surface constraint from the last row of arm vertices to the scapula object.
Step 3: The skin also needs to be attached to each of the nails. If not, when the skin attributes are applied, the skin shrinks up the finger bones, as shown in Figure 12.6. Use the marking menu to put the skin into Component mode. Select the last row of vertices around the skin of the index finger. Hold Shift and select the nail. Choose nConstraint>Point to Surface. Repeat the procedure for the other nails.
262
Maya Feature Creature Creations, Second Edition
Figure 12.6 The skin shrinks along the finger bones if not constrained to the nails.
Step 4: To create skin, use the following settings. These attributes are a good base to begin with. They are listed in the order displayed in the channel box. For the attributes not listed, use the defaults. Thickness: .012 Friction: 0 Self Collision Flag: Full Surface Rest Length Scale: .9 Self Collide: Off Compression Resistance: 0 The most important attribute to change is the compression resistance. This attribute helps maintain the object’s original shape, something we do not want to do. Setting it to zero, essentially turns it off, allowing the skin to be completely under the influence of the anatomy. If it is not set to 0, the skin fights with the muscles to try and maintain its original shape. This often leads to excessive bouncing and jiggling.
Chapter 12 Skin
263
Self Collide and Self Collision Flag are interdependent. If Self Collide is turned off, you obviously do not need to worry about how it is not going to collide with itself. To speed up calculations, turn Self Collide off. This is acceptable. It works because the skin is driven by muscles just under the surface. If the arm is to collide with itself, the opposing muscle pushes it away. Having Self Collide on forces the skin to calculate twice as much and often fights between muscle and skin. Figure 12.7 shows what happens to the skin with Self Collide on.
Figure 12.7 The skin buckles under the pressure of colliding against itself and the muscles in the interior elbow joint. The arrow points to the crumbling geometry.
If it is necessary to use Self Collision, perhaps due to large areas of loose skin or fat, use Full Surface for the Self Collision Flag. Without a doubt, it is the most computationally expensive option for doing collisions but gives the best results. Friction is variable. It can be gauged at a later point when other active nCloth objects come into contact with the skin. For now, it is set to 0. The default is .1. Leaving it at .1 has little to no effect on the skin. Thickness is an educated guess. The thickness is measured in centimeters. Setting it to .012 is the equivalent of 120 micrometers. nCloth does not actually collide against the surface of objects. Instead, it creates invisible
264
Maya Feature Creature Creations, Second Edition
collision volumes based upon the Collision Flag attribute. These volu mes match the chosen component. For instance, selecting vertex for the Collision Flag creates spherical volumes with the diameter of the thickness attribute around each vertex. The size is measured in centimeters. It is possible to turn on the visibility of the volumes by choosing one of the collision options under Solver Display. Figure 12.8 shows an example of the vertex Collision Flag with the thickness set to .05.
Figure 12.8 Spherical volumes are represented for the vertex Collision Flag.
The rest length scale forces the skin to wrap around the muscles. It provides tension to keep the skin from hanging or looking loose. Since the muscles are a good fit for the skin, it is not necessary to wrap the skin too tightly around the muscles. The skin is not ready for simulation yet. The next step keeps the skin in place. Virtual connective tissue between the skin and muscle keeps the skin from sliding. This is critical, especially since the geometry is an edged loop with specific muscle groups. If the skin were to slide, the model bicep skin would roll to the underside of the arm, causing poor and awkward skin motion.
Chapter 12 Skin
265
TUTORIAL T UTORIAL : A DDING C ONNECTIVE T ISSUE
Step 1: Load the scene file skin4.mb from the CD:/Chapter12/Skin/scenes. It picks up where the previous tutorial, “nCloth Skin,” left off. The scene contains the Warkrat’s arm geometry, NURBS muscles, polygon muscles, skeleton, control handles, and rig. Each group is assigned to a layer of the same name. Each muscle is connected to the skin. This is an easy process, but seeing which vertices connect to which muscle can be a toggling nightmare. To prevent this problem, turn on Renderer>High Quality Renderer in the perspective viewport. Press 6 on the keyboard to turn textures on. The normal maps are displayed. Open the ArmLeft_Mat shader in the Hypershader. Change the transparency to .15. Back in the perspective viewport, turn off NURBS curves under the Show menu. You can now see the muscles under the skin. Figure 12.9 shows an example of the final viewport.
Figure 12.9 Turning on normal maps and changing the transparency of the arm material allows you to see the muscles underneath.
266
Maya Feature Creature Creations, Second Edition
Step 2: Select the vertices around the bicep muscle. The Paint Selection tool is a tremendous time-saver for this process. However, it has a few peculiarities you need to work around. First, make sure to select the arm geometry before selecting the tool. Next, notice when you select the tool it switches Maya, not the object, into Component mode. This is okay for now, but we will need to switch the arm only to Component mode in order to select muscle objects. Paint all of the skin vertices that make up the Bicep muscle. Right-click on the skin and choose Object mode from the Marking menu. The skin is deselected, but the vertices are still highlighted. Maya is now in Object mode. Right-mouse-click over the skin again and choose Vertex. The arm is in Component mode with the vertices highlighted. Turn off the visibility for the WARKRAT and MUSCLES layer. Turn on the POLYGON_MUSCLES layer. Remember, we can only use polygons with nCloth. Step 3: Hold Shift and select the bicep muscle. Choose nConstraint>Slide on Surface. The constraint is made. Figure 12.10 shows the finished constraint.
Figure 12.10 A slide on Surface constraint is attached from the bicep region of the skin to the polygon bicep muscle.
Chapter 12 Skin
267
Step 4: Select the newly created constraint. Change the following parameters. Connection Method: Rubber Band Component Relation: Chain Strength: 1 Slide constraints are inexpensive and problem solving. They allow the skin to move with the muscle but also keep the skin from sticking. They can be pulled and stretched in a realistic skin-like manner. If we were to use a Point to Surface constraint, the skin would act more like a traditional smooth bind. Step 5: Repeat for all the muscles. Do not worry about overlapping constraints. Having a vertex shared by more than one muscle is okay and in tight spots can be beneficial. The goal is to constrain all of the arm vertices. Step 6: The hand needs extra attention. For the wrist to turn properly, it is necessary to add an extra constraint running from the skin to the bone. Change the transparency to .15 on the handL_Mat shader. Turn off the visibility for all of the muscle’s layers and turn on the visibility for the RIG and SKELETON layers. Select the three rows of vertices around the wrist. Hold Shift and select the carpal bone. Add a Slide on Surface constraint. Change the constraint attributes using the values from Step 3. Use Figure 12.11 as a guide.
Figure 12.11 Select three rows of vertices and constrain them to the carpal bone.
268
Maya Feature Creature Creations, Second Edition
Step 7: The fingers represent some interesting problems. In reality, there are not a lot of muscles in them. They are driven by tendons. The tendons alone do not provide enough information for successful deformations. In addition to the tendons, the vertices also are connected to each bone. Make a selection of the tip of the index finger. You can exclude the last row since it is already constrained to the nail. Constrain the vertices to the indexDistal bone with a Slide constraint. Figure 12.12 shows the finished constraint.
Figure 12.12 The tip of the index finger is constrained to the distal bone of the index finger.
Step 8: Constrain the rest of the finger vertices to each bone. You can overlap the vertices between each bone. Figure 12.13 shows the finished constraints on the hand. Notice the two selected constraints of the pinky finger. They each share the row of vertices at the joint. Apply the same values outlined in Step 3 to all of the connective tissue constraints. The skin is now connected to the muscle, bone, and tendon. The skin is not bound by ordinary methods. This makes it easy to make modifications to the rig, muscles, or skin geometry at any point prior to creating a final animation. Since everything is connected by parenting and constraints, any one of the parts can be altered. Even the rig can be modified without having to redo the entire skin. If the
Chapter 12 Skin
269
Figure 12.13 Slide on Surface constraints are added for each bone.
geometry is altered, it is best to reapply the constraint, delete the old one, and then add a new one. The constraint will update if you do not replace it, but only during simulation, and it can take a few frames to do so. The scene file skin5.mb contains the final setup for the arm.
H IGH -R ESOLUTION S KINNING For a higher end version of the creature, you can smooth the geometry one level prior to adding constraints. The vertex count is doubled. This does a lot more than smoothing the geometry. By adding more vertices, you are also increasing the quality and accuracy of the skin simulation. Although this may sound beneficial, it can be problematic and in some cases undesirable. The key word to focus on is accuracy. Our interpretation of accuracy can differ from the solver’s interpretation of accuracy. Adding more vertices means the underlying anatomy also needs to be more accurate. Seemingly innocuous discrepancies can turn into monumental headaches. The output polygonal geometry can be increased at any time by modifying the nurbsTessellate node in the channel box. Figure 12.14 shows the two attributes to change to increase the polygon subdivisions.
270
Maya Feature Creature Creations, Second Edition
Figure 12.14 The two attributes used to change the amount of geometry in the polygon muscles are highlighted.
C ONCLUSION It is important to remember that your creature’s skin is a dynamic simulation, and it must adhere to all of the procedures and properties of running a simulation. If you are unfamiliar with the inner workings of dynamic simulations, take some time to learn their functionality. Understanding the attributes of nCloth objects and constraints and how they correlate to skin is key to setting up your creature successfully. Experiment with one attribute at a time to grasp its effect. nCloth is still a relatively new feature to Maya. Finding information on the subject is scarce. The Maya documentation can provide a great start. It is important to remember that the skin can only deform based upon its geometry. This is good and bad. If the skin only has a few faces, the deformation might look blocky. At the same time, if you increase the amount of faces, the skin can actually pick up too much detail and deform “perfectly.” This sounds good, but it is actually bad. What happens is that the skin wraps tightly around the muscle, showing every little inaccuracy. It is possible for vertices to slip in-between muscles and become trapped. By having less geometry, the skin is forced to taper the effects of anatomic collisions, making for a more realistic form. Changing the parameters of the skin at this point offers few results. To maximize the skin’s performance, it is the muscles that must be modified. If something is wrong with the skin, chances are that it is the muscle underneath causing the problem. In the next chapter, we will look at modifying the muscles in order to maximize the skin deformations. In a traditional pipeline with a smooth bind, this phase of development would be synonymous with painting weights. Instead of painting weights, we will tweak muscle position, bulge, stretch, and most importantly, motion. Motion is defined as how the muscle moves with the skeleton. It is the muscle twisting and keeping in harmony with other muscles.
Part
V Production
271
This page intentionally left blank
13
Animation
he Warkrat’s arm is rigged. Now it is time to test it. The only way to see everything in action is to create an animation and run a simulation. The point of this is to see how the skin reacts to the muscle system underneath. It does not require an extravagant animation. It is best to create a simple animation, but one that pushes the limits of skeletal motion. To critique the setup effectively, it is paramount to cache the simulation. Caching is the process of storing the positions of each vertex per frame in a single file. These “cache” files are then read back by Maya in real time. This allows you to watch the deformations and critique them at the proper frame rate and from all angles. The frame rate, however, is dependent on the speed of your system. If the mesh is dense, it might not play black at the right speed. In this chapter, the skin is finalized. It is fitted to the muscle system and tested with an animation. This is an important step. If the skin is not compressed around the muscles, the gap between the two causes a delay. Instead of looking like skin, it tends to look like a paper bag.
T
273
274
Maya Feature Creature Creations, Second Edition
I NITIAL S TATES Once the skin is shrunk around the anatomy, it needs to be locked in place. This is called setting the initial state. Anytime you need to keep the effects of the simulation, you can lock or bake the alterations into the vertices’ positions. Setting the initial state allows you to return to the first frame of animation with the current shape of the skin intact. This is used for setting up the skin, as well as establishing the first frame to any animation. The following tutorial takes you through the process of shrinking the skin around the anatomy and setting it as the initial state.
TUTORIAL T UTORIAL : A NIMATION S KIN
Step 1: Load the scene file initialState1.mb from the CD:/Chapter13/Skin/scenes. The scene contains the Warkrat’s arm geometry, NURBS muscles, polygon muscles, skeleton, control handles, constraints, and rig. Each group is assigned to a layer of the same name. Animation has been applied to the arm control handle. It has been muted to keep the arm from moving. Before shrinking the skin to the anatomy, you want to preserve the original geometry for later use. Select the arm and duplicate it. Create a new layer and name it ORIGINAL_SKIN. Assign the arm to the layer. Step 2: Select the constraints added in Chapter 12, “Skin,” to each nail. These constraints are Point on Surface constraints. Their purpose is to lock the skin to the nail and keep it from slipping or separating. To ensure this, change the Constraint Method to Weld. You can select all three constraints and modify them simultaneously. Use Figure 13.1 as a guide. Step 3: The Rest Length scale is set to .9. This means the connections between each vertex will scale down 10% percent, in turn, causing the skin to shrink. As it does, it collides against the passive nCloth muscles, tendons, and bones. Press Play on the timeline. The skin shrinks. Let the timeline play out until the skin stops moving. This should be around frame 20 or so. It never completely stops moving, but it does settle. Figure 13.2 shows the skin in its shrunken state. Step 4: Stop the animation and evaluate the results. The skin takes on the shape of the underlying muscle structure. The modeled detail of the skin should line up with the muscles it represents. The skin can be off slightly. If it has shifted greatly, resize the muscle to better fit the skin. Play the animation again to check.
Chapter 13 Animation
275
Figure 13.1 Change the Constraint Method for the nail constraints to Weld.
Figure 13.2 The skin is pulled around the muscles as a result of a lowered rest length.
276
Maya Feature Creature Creations, Second Edition
Step 5: Select the arm geometry. Choose Edit nCloth>Initial State>Set From Current. The position of every vertex is updated. The arm geometry is now locked to its current shape. This is considered the initial state. Go to frame 1. The arm retains its shape. The scene file initialState2.mb has the finished arm.
M USCLES
AND
B ONES
As mentioned in Chapter 12, the parameters of the skin are not critical. Self-collision and friction are adjusted based upon need. The rest of the parameters are not adjusted. From here, only the objects influencing the skin are tuned. The following tutorial explains how to set up the forearm muscle for correct movement.
TUTORIAL T UTORIAL : M ODIFYING S KIN P ERFORMANCE
Step 1: Load the scene file skin1.mb from the CD:/Chapter13/Skin/scenes. The scene contains the Warkrat’s arm geometry, NURBS muscles, polygon muscles, skeleton, control handles, constraints, and rig. Each group is assigned to a layer of the same name. Animation has been applied to the arm control handle. It has been muted to keep the arm from moving. Select armL. Highlight the Translate and Rotate channels from the Channel Box. Choose Channels>Unmute Selected from the Channel Box interface. Before playing the animation, check the animation preferences. Make sure the Playback speed is set to Play Every Frame. If the simulation skips a frame, the results are erroneous. Change the timeline to end at frame 270. Use Figure 13.3 as reference. Step 2: Playing through the timeslider at this point allows you to watch the animation play back as fast as your computer will update. Most likely this is not fast enough. Instead, select the arm geometry and choose nCache>Create New Cache tool options. Use Figure 13.4 to set the options. Step 3: Choose Create. The animation begins to play. The difference is that the vertices’ positions are being written to a file at every frame. When it is finished, you can scrub through the timeline and evaluate the skin.
Chapter 13 Animation
277
Figure 13.3 Unmute the animation on the armL control handle.
Figure 13.4 Set the options to create a new cache file.
Step 4: Several trouble spots are exposed. Take a look at Figure 13.5. It shows the inside of the arm at frame 100. Pay attention to the elbow and forearm.
278
Maya Feature Creature Creations, Second Edition
Figure 13.5 The skin at frame 100.
The muscles push out and move awkwardly in this area. Figure 13.6 shows the muscles at the same frame.
Figure 13.6 The muscle structure at frame 100.
Chapter 13 Animation
279
The muscles are overlapping one another because of their poor motion. The Ulnarius muscle is causing most of the problems. However, it is all of the forearm muscles that are moving incorrectly. Step 5: To fix the problem, the motion of the muscle needs to be averaged as the forearm twists. Currently, one muscle handle is pulled 100% with the radius, while the next muscle handle is 100% to the Ulna. Turn on the visibility for the MUSCLES layer. These are the NURBS muscles. Make sure the visibility for the polygon muscles is off. In the Select by Name field, at the top of the Maya interface, type *UlnarisL*. This selects all of the components that make up that particular muscle. Create a new layer called ULNARIS and assign the selection to it. Step 6: Turn off the visibility for the MUSCLES layer. The only muscle remaining is the Ulnaris. Select the following muscle control handles. Figure 13.7 shows the handles placement at frame 100. iControlUlnarisL2 iControlUlnarisL3 iControlUlnarisL4 iControlUlnarisL5
Figure 13.7 The four control handles that need to be fixed for the Ulnaris muscle.
280
Maya Feature Creature Creations, Second Edition
Step 7: Make sure that you are at frame 1. Unparent all four handles. iControlUlnarisL4 has a parent constraint on it. Delete this constraint. Step 8: Select the Ulna geometry. Hold Shift and select the radius geometry. While still holding Shift, choose iControlUlnarisL2. Switch to the Animation module. Choose Constrain>Parent tool options. Turn on Maintain Offset, Translate, and Rotate. Click Add. By selecting two nodes at once, the muscle handle is parent-constrained to both. This allows for blending between the two parents. Step 9: Repeat Step 8 for the three other handles. Step 10: Play through the animation. The muscle looks better but not perfect. There is also a glitch that happens around frame 97. One of the handles is flipping at this frame, causing the muscle to twist to an extreme amount. Figure 13.8 shows the problem. To get rid of this problem, we simply tell the constraints not to flip. Select all four handles. In the Channel Box, click the parent constraint node. Change the Interpolation Type to No Flip. The geometry is not updated automatically. Move the timeline back to frame one and scrub back to frame 97. The muscle is now correct. Figure 13.9 shows the corrected muscle shape. Step 11: The muscle needs to gradually stretch as the arm twists. By altering the weight or influence from the radius bone and ulna you can make the muscle gradually twist with the forearm. Select iControlUlnarisL2. Choose the parentConstraint node in the channel box. Change UlnaLWO to .7 and RadiusLW1 to .7. Use the chart below to set the other handles. iControlUlnarisL3 UlnaLWO: .8 RadiusLW1: 7 iControlUlnarisL4 UlnaLWO: .6 RadiusLW1: .85 iControlUlnarisL5 UlnaLWO: .8 RadiusLW1: .5
Chapter 13 Animation
281
Figure 13.8 The muscle is twisting because of the new parent constraints.
Figure 13.9 Changing the Interpolation Type to No Flip prevents the muscle from twisting.
282
Maya Feature Creature Creations, Second Edition
Step 12: Repeat Steps 5 through 11 for all of the forearm muscles. Adjust the parental weighting for each muscle. Step 13: Another problem with the skin’s deformation is that the joints are ill defined, specifically the elbow and finger joints. Take a look at Figure 13.10.
Figure 13.10 The elbow and finger joints lack realistic definition.
Look at the finger. It is very rounded at the joints. When the finger bends, it should appear squared off. The same is true for the elbow. It isn’t as bad since there is a muscle pushing it out. Looking at it from a different angle with the wireframe on reveals that it is undefined and being obscured by the second tricep muscle on the inside of the creature’s arm. Figure 13.11 shows the problem. Step 14: These problems are fixed by shaping the modeled bones better. At this point, the bone’s length can be cheated to force the skin out. Regardless of the frame number, push and pull the bones vertices to extend beyond their lengths. Do not make adjustments in Object mode, only in Component mode. Translating, rotating, or scaling upsets the children of the bones, so move the vertices. The Sculpting tool can be used as well. Figures 13.12 and 13.13 show before and after pictures of the skeleton.
Chapter 13 Animation
283
Figure 13.11 The elbow does not protrude like it should.
Figure 13.12 The skeleton before any modifications have been made to the bones.
284
Maya Feature Creature Creations, Second Edition
Figure 13.13 The skeleton after modifications have been made to the bones.
Step 15: After all of the adjustments have been made, select the arm geometry and choose nCache>Delete Cache. The skin is now ready to be cached again. Choose nCache>Create New Cache. Figure 13.14 shows the arm with all of the changes made to the anatomy. The final version of the skin scene file has been saved as CD:/Chapter13/ Skin/scenes/skin2.mb. The next step for the creature’s skin is to get the originally modeled geometry to deform just like the shrunken nCloth skin. This is done by adding a Wrap Deformer to the nCloth skin. The Wrap is made from the duplicated skin created in Step 1 of the Animation Skin tutorial. The geometry is identical so the Wrap Deformer does not have any costly interpolations. The following tutorial explains the process.
Chapter 13 Animation
285
Figure 13.14 The arm after all of the changes have been made.
TUTORIAL T UTORIAL : R ENDERING S KIN
Step 1: Load the scene file skin2.mb from the CD:/Chapter13/Skin/scenes. The scene contains the Warkrat’s arm geometry, original arm geometry, NURBS muscles, polygon muscles, skeleton, control handles, constraints, and rig. Each group is assigned to a layer of the same name. All of the muscles and bone have been fine-tuned, as outlined in the “Modify Skin Performance” tutorial. Turn the visibility on for the ORIGINAL_SKIN layer. Turn off the visibility for the WARKRAT layer. This is done to facilitate selection. Step 2: Select the skin geometry. Turn off the visibility to the ORIGINAL_SKIN layer. Turn on the visibility for the WARKRAT layer. Hold Shift and select the nCloth skin. Step 3: Switch to the Animation module. Choose Create Deformers>Wrap tool options. Make sure that the default settings are being used by choosing Edit>Reset Settings from the Create Wrap Options box. The defaults ensure the best performance based on two like pieces of geometry. Choose Create.
286
Maya Feature Creature Creations, Second Edition
Step 4: The wrap is now applied. Turn off the visibility for the WARKRAT layer. Turn the visibility on for the ORIGINAL_SKIN layer. When the animation is played, the Wrap Deformer moves along with the nCloth skin. Step 5: The Wrap Deformer can now be rendered through whichever means necessary. You can add any and all maps and render as you would any ordinary piece of geometry. If you find the muscles or bones still needs modification after the Wrap Deformer is applied, simply hide the wrap and make the necessary adjustments. The only time the Wrap Deformer should be reapplied is if the nCloth skin’s initial state is modified. The displacement maps have been added, and the final image rendered in Mental Ray. Skin3.mb contains the final arm. You can also view the movie at CD:/Chapter13/Skin/images/skin3.#.iff.
C ONCLUSION The number one thing to focus on is the anatomy. It is built to support the skin. Even if your character is anatomically incorrect or extreme like the Warkrat, you can still achieve smooth deformations. You can go back and tweak every part of the muscle at any point in the pipeline, even after the character has been animated. It is difficult to predict exactly how the skin will react to the anatomy. Modifying the muscle and bone during the test animation phase is part of the process and the only way to truly achieve the look you are after. The one drawback is that every time you make an adjustment, it is necessary to delete the cache and create a new one. Changes to the skin are not instantaneous. In the next chapter, the arm is used to explore the power of nCloth. Having a creature that is a complete dynamic system offers more than smooth deformations. We now have a body that interacts with itself and its world.
14
World Dynamics
n
Cloth provides a lot more than just fancy deformations. It provides a way of creating entire interactive worlds. One solver can simulate everything from metal to skin. On top of that, it allows these very different objects to interact with each other realistically. In this chapter, the power of nCloth is explored. The first tutorial looks at how simple objects can be effortlessly integrated to work with the skin. The next tutorial takes a look at tearing nCloth, which is an interesting effect used to simulate the creature’s skin being cut open.
287
288
Maya Feature Creature Creations, Second Edition
O BJECT I NTERACTION Since the skin is an active nCloth object, it collides against other active nCloth objects assigned to the same solver. The muscles are passive and will do the same. However, active nCloth does not affect passive nCloth. It only goes one way. This is not a problem since nCloth provides the ability to make objects rigid. The following tutorial creates a few active nCloth cylinders for the arm to interact with.
TUTORIAL T UTORIAL : C YLINDERS
Step 1: Load the scene file cylinders1.mb from the CD:/Chapter14/World Dynamics/scenes. The scene contains a plane, three cylinders, and the Warkrat arm setup. The arm has been animated and does not have a Wrap Deformer around it. It is only the nCloth skin. The plane is an nCloth passive object. Select the thin, smaller cylinder named squishyTube. Choose nCloth> Create nCloth. This cylinder will use the default nCloth parameters. This creates a soft, flexible object. Step 2: Select the middle cylinder. It is named steelDrum. Choose nCloth> Create nCloth. Open the Attribute Editor. The Editor opens to the nCloth settings. Close to the top of the editor is a button called Presets. Click and hold with the left mouse button. A drop-down menu appears. Scroll down to Concrete. Another menu unfolds. Choose Replace. All of the parameters are updated. Step 3: Select the end cylinder. It is named balloon. Choose nCloth>Create nCloth. Open the Attribute Editor. Use the Air Bag preset for this cylinder. This preset alone doesn’t give us the effect we are looking for to create a balloon-like object. Scroll down in the Attribute Editor until you come to the Pressure tab. Click this. Change the Pump Rate to 2. This causes the cylinder to inflate. Step 4: Select the arm and Choose nCache>Create New Cache. The simulation is solved. Step 5: Examine what happened to each object. All cylinders are knocked over and collide with the ground. Each cylinder exhibits very different properties. Take a look at Figure 14.1.
Chapter 14 World Dynamics
289
Figure 14.1 The arm knocks over the three cylinders.
The first cylinder to be hit, the squishy tube, has little resistance to the arm or any other object. It deforms freely. The second object, the steel drum, pushes back. A close-up shot reveals the drum being dented, as well as the finger skin being pushed in slightly. Figure 14.2 demonstrates. The open space between the two objects is from the thickness of the surfaces. The last object, the balloon, is simply bumped away. The scene file cylinders2.mb has the final setup.
TUTORIAL T UTORIAL : S KIN S LICE
Step 1: Load the scene file knife11.mb from the CD:/Chapter14/World Dynamics/scenes. The scene contains a primitive knife object and the Warkrat arm setup. The arm does not have a Wrap Deformer around it. It is only the nCloth skin. The knife has basic rotation animation to slice through the arm.
290
Maya Feature Creature Creations, Second Edition
Figure 14.2 The steel drum gets dented and depresses against the skin.
Select the knife and make it a passive nCloth object. Create a new cache. The knife gives the skin a glancing blow. You can stop the simulation shortly after the knife clears the skin by hitting Escape. Step 2: Based on where the knife struck, select a group of edges in the knife’s path. Use Figure 14.3 as a guide. Step 3: Choose nConstraint>Tearable Surface. The tearing of the surface is controlled by the Glue Strength attribute. By default, it is set to .1. For our animation, change the value to .01. The higher the value, the stronger the force needs to be to break the constraint. Setting it to a value of zero causes the constraint to break immediately. Step 4: Before caching the animation out, it is necessary to relax the skin surface. This entails making sure that the skin is in a natural, stable position. Starting an animation without this typically causes strange fluctuations in the surface. Relaxing first ensures that your skin does not pop or move in a strange manor for the first couple of frames. There is an automated way of doing this. Select the skin surface. Choose Edit nCloth>Initial State>Relax Initial State. The process runs for a minute or so.
Chapter 14 World Dynamics
291
Figure 14.3 Select edges in the path of the knife.
Step 5: The animation is ready for simulation. Choose nCache>Create New Cache. Figure 14.4 shows the arm at frame 15. The knife has just left the surface.
Figure 14.4 Frame 15 of the arm-cutting simulation.
292
Maya Feature Creature Creations, Second Edition
Step 6: Once the animation is cached and approved, it can be prepared for rendering. One problem with tearing the surface is the inability to add a Wrap Deformer. Used to return the surface to its original shape, the wrap is useless because it cannot be torn like the nCloth object. There are a few tricks, however, we can do to improve the nCloth surface. Whether before the surface is simulated or after, the nucleus solver only sees the original object that was turned into an active nCloth surface. Any history applied to the surface after this is ignored by the solver. However, the history is connected to the active nCloth shape, working similarly to how the NURBS and polygon muscles work. By adding history, the surface is improved upon without jeopardizing or increasing solver time. Select the surface. Choose Mesh>Smooth. The geometry is tessellated. Scrubbing through the timeline shows the surface is deforming, as it should, but with a higher resolution. Change the Divisions of the polySmoothFace node in the Channel Box to 2. The triangle count is now around 32,000. Scrub through the animation to frame 11. The cut is now rounded and smoothed—no more jagged or squared polygons. Take a look at Figure 14.5.
Figure 14.5 Smoothing the surface cleans the roughness of the cut up.
Chapter 14 World Dynamics
293
Step 7: A major issue with cutting open the surface is that the thickness, or lack thereof, is now noticeable. The skin is paper-thin. Fix this by extruding the surface. Choose Edit Mesh>Extrude. Set the Local Translate Z value to .012 in the Channel Box. This matches the simulation thickness of the nCloth surface. Figure 14.6 reveals a close-up of the thickness of the surface. The scene file knife2.mb contains the final setup.
Figure 14.6 Extruding the surface gives it a thickness.
C ONCLUSION There are limitless possibilities using nCloth as skin. It is a fast, accurate, and versatile solution to a long perplexing problem. nCloth is not without its drawbacks, but with patience and understanding, it can be used to create amazing results. Take a look at Figure 14.7. The same surface used in the skin slice tutorial was used again without the knife. Instead, the Volume Tracking Method was used for the Pressure Method. A value of 2 was used for the Pump Rate. After several frames, the arm pops at the constraint. This is an interesting effect that can be used for wounds or simply blowing up a character. When the skin explodes, what does it reveal? It reveals its anatomy, exactly as it should.
294
Maya Feature Creature Creations, Second Edition
Figure 14.7 The surface was pumped up and popped like a balloon through the tearable surface constraint.
As computer systems get faster and nCloth is refined further, dynamic characters can increase in complexity. Perhaps soon, the anatomy will actually have fluid blood coursing through modeled veins. Eventually, life will be replicated in its entirety, allowing for perfect photorealism. Until then, check out www.speffects.com for more tips, tricks, updates, and forums. Here is the completed creature in its final form in Figure 14.8 and Figure 14.9.
Chapter 14 World Dynamics
Figure 14.8 The final creature rendered in Mental Ray from the front.
Figure 14.9 The final creature rendered in Mental Ray from the back.
295
This page intentionally left blank
Index
Numbers 0 and 1 alpha gains, significance of, 176 0 to 1 texture space, relationship to UVs, 117 2D detail, transferring to 3D models, 92 2D rough draft, example of, 14 2D texture maps, extracting 3D information into, 70. See also maps; texture maps 2K image, explanation of, 156 3D, process of tracing in, 101 3D base mesh example of, 15–16 linking to modeled anatomy, 17 3D information, extracting into 2D texture maps, 70 3D models, transferring 2D detail to, 92 3D objects, tracing, 101 3D Paint Tool options, using, 162 3D sculpture, tracing over, 98 3dPaintNormal1.mb file, loading, 161 3dPaintNormal2.mb file, contents of, 165
A active nCloth, characteristics of, 11 almaloy armature wire, using, 40 alpha gain, purpose of, 176 alpha intensity, changing for displacement maps, 153–154, 174–176 alpha offset, setting for displacement maps, 177 anatomy, modeling, 17 anatomy layers connective tissue, 29 fat, 29 muscles and tendons, 26–29 skeleton, 23–25 skin, 22–23
anatomy-driven creatures, building, 34 animation preferences, setting, 276 animations, playing, 276 Approximation node, adding for displacement maps, 177 arm bones, emphasis on, 210 arm muscles, creating for Warkrat, 35 arm1.mb scene file, opening, 215 armatures, sculpting, 38–41 armL, modifying, 276 armLeftDisp.iff, saving, 171 arms animating, 23 attaching for base mesh, 62 creating base mesh for, 55 creating empty group node for, 222 creating muscles in, 234–238 cutting, 291 filling in for base mesh, 62 fixing holes in, 261 interaction with cylinders, 288–289 with muscles, 253–254 observing, 213–214 rendering, 152–153 rigging, 215–227 UVs for, 125 for Warkrat, 111–112 aspect ratio, setting for normal maps, 156 Assign/Edit Textures option, using with normal maps, 162 Attribute Editor, using with displacement maps, 178 attributes, opening, 120 automatic mapping, using with nails, 134
297
298
Index
B baking, process of, 98, 148 ball joint, description of, 209 ball-and-socket joints, description of, 207–208 base mesh for arms, 55 assembling hand for, 58–61 attaching hand in, 63 for chin, 58 creating for foot, 49 creating primitive polygon cylinder for, 48 creating shelf for, 47 dividing quads in, 65 filling in arms for, 62 filling in geometry for, 62 for head, 55–57 for nose, 58 opening scene file for, 46 protruding nail for, 53 sculpting details into, 83 selection interface for, 65 for shoulders, 55–57 for torso, 53–54 using Combine tool with, 61 using Component mode with, 51–52 using Constrain option with, 66 using Extrude tool with, 48–49 using Insert Edge Loop tool with, 51, 61 using Split Polygon tool with, 59 for Warkrat, 111–113 Bend Resistance attribute, using with nCloth, 191 bicep, creating for Warkrat, 111 bicep muscle creating, 235–236 using Slide on Surface constraint with, 266 BicepL, customizing, 243–244 black, value for alpha gain, 176 blinn material, using with tendons, 241–242 bones connection to muscles and tendons, 26 joints of, 24 modeling, 210–212 organization in skeletons, 24 orientation of, 212–214
parenting to joints, 223 as polygons objects, 25 scaling versus pulling, 211 sculpting, 40 shaping for forearm, 282–284 using Sculpt Geometry tool with, 211 Bridge tool completing leg with, 103 using with base mesh, 62–64 using with fingers, 59–60 brushes Max Displacement for, 81–82 modifying radii for, 86 profiles for, 85 resizing, 81 setting Color Opacity for, 164 as stamps, 85 testing, 86 See also Healing brush; Pinch brush Build tab, options in muscle builder, 235 Bulge tool, using in Mudbox, 89 Bump Depth, replacing with normal maps, 172
C cache creating for knife, 291 creating for nCloth fish, 202 creating for skin, 284 camera, manipulating with Make Live, 103 cardiac muscles, description of, 26 CG characters, establishing common ground for, 17 checker feature, adding to color channel, 118–119 chin, creating base mesh for, 58 clay, sculpting with, 38–40 Clone brush, using with normal maps, 158, 163 Clone Source, setting, 164–165 Clone tool, calibrating, 165 color channels adding checker feature to, 118–119 painting individually, 158 Color Opacity, setting for brushes, 164 colored texture maps versus normal maps, 149 colors, matching for muscles, 242
Index
Combine tool, using with base mesh, 61 Component mode using with base mesh, 51–52, 61 using with tendons, 239 Compression Resistance attribute, using with nCloth, 188–189 compression resistance, changing for skin, 262 computer performance, testing, 102 configurations, determining for UVs, 133 Connection editor, using with arm and radius, 223 connective tissue adding for skin, 265–269 anchoring skin with, 29 creating in nCloth, 199 Constrain option, using with base mesh, 66 control handles applying to muscles, 236, 243 displaying for joints, 218 fixing for Ulnaris muscle, 279 moving, 219 repositioning for muscles, 251–252 scale of, 221 for scapula IK handle, 224 Create Polygon tool, using in Make Live, 102 Create Render Node window, using with normal maps, 172 curves binding to FK skeleton of spine, 228 for elbow joint, 219 in muscles, 236 scaling for tendons, 239–240 snapping to scapula joints, 224 using in Mudbox, 90–91 cut, creating for knife, 292 Cut UV Edges feature, using, 123 CVs (control vertices) manipulating for muscles, 247–248 selecting and scaling, 239 cylinders creating and reshaping, 7–8 creating in nCloth, 288–289 for head in base mesh, 55–57 as influences of plane objects, 7–8 inserting loops in, 51
299
with quads, 99–100 for shoulders, 55–57 with subdivision surfaces, 99 for toes, 51 for torso, 53–54 translating, 7, 9 with triangles, 99 using for feet, 49 wrapping around legs, 120 See also primitive polygon cylinder cylinders1.mb file, opening, 288 cylindrical mapping aligning for leg, 120 using with UVs, 118 Cylindrical Mapping tool, distortion related to, 127
D Deform Resistance attribute, using with nCloth, 189 deformers, using with muscles, 236 Delete History tool, adding to shelf, 47 deltoid muscle, customizing, 245 detail achieving high level of, 74 capturing via baking, 98 digital sculpting and displacement maps, 71–72 features of, 70 and normal maps, 70 pros and cons of, 46 See also sculpting displacement maps alpha intensity of, 153–154 extracting, 167–171 manipulating, 177 versus normal maps, 72, 152 pros and cons of, 151–152 rendering with Mental Ray, 174–181 using, 71–72 using Attribute Editor with, 178 using View Dependent option with, 178 See also maps displacementMap1.mb file, opening, 169
300
Index
Distance parameter, setting for base mesh, 61 distortion, occurrence with UVs, 127 divisions adding, 75 changing, 74 dots, creating with Draster’s Nex tool, 105–106 Draster’s Nex tool completing surfaces with, 106 creating dots in, 105–106 creating faces with, 108 creating leg with, 108, 110 downloading, 101 features of, 105 inserting edges with, 106–107 versus Make Live, 105 manipulating dots in, 105–106 using, 101 using Quad Draw tool with, 105
E Edge Loop tool, using with base mesh, 51 edges capping off, 78 extruding with Make Live, 103 inserting with Nex tool, 106–107 selecting, 123 elbow joint manipulating, 219 offsetting, 215–216 Empty Group option, using with arms, 222 endoskeleton, definition of, 24 exoskeleton, definition of, 24 Extract option, using with nails, 257 extracting, process of, 98, 148 Extrude tool adding thickness with, 293 features of, 48–49 extruded faces, scaling, 53 eye sockets, removing faces from, 78–79 eyes adding geometry for, 77 adding loop for, 79 sculpting, 82–83
F faces creating for muscles, 108 creating with Nex tool, 108 dividing in half, 61 selecting and deselecting, 118 selecting for head, 128 selecting for UVs, 117 faces to nails, selecting, 256 fat, properties of, 29 filters, choosing for normal maps, 157 fingers creating areas between, 59 tendons in, 268 UVs for, 125 fish1.mb scene file, opening, 194 fish2.mb, loading, 198 FK (forward kinematics) beneath digital skeletons, 25 explanation of, 23–24 Flip option, using with UVs, 139. See also No Flip option Flood option, using with Relax brush, 247 foot creating base mesh for, 49 selecting base of, 51 UVs for, 132–133 forearm, creating for Warkrat, 112 forearm muscle, preparing for movement, 276–285 form and proportion, sculpting, 38 framing selections, 133 Freeze Transformations tool adding to shelf, 47 using with normal maps, 157 friction applying to skin, 191 gauging for skin, 263
Index
301
G
I
Gaussian Brush Profile, using, 165–166 geometry altering flow of, 77 building out with Extrude tool, 48–49 deforming, 11 skinning, 5, 7 suitability of, 98 types of, 69 global solver, mixing local solver with, 122 grid line, snapping UVs to, 140 group node, creating for arm, 222
.iff format, using with normal maps, 156 .iff plug-in, downloading, 158 IK (inverse kinematics) beneath digital skeletons, 25 explanation of, 24 parts of, 209 IK Spline Handle Tool, using with spine, 228 IK systems, building, 209–210 initial state, setting for skin, 274–276 initialState1.mb file, using with skin, 274–276 Insert Edge Loop tool using with base mesh, 51, 61 using with eyes, 79 See also loops Isoparm option, using with muscles, 251
H hairy and hairless skin, characteristics of, 23 handle, role in IK (inverse kinematics), 209 hands assembling for base mesh, 58–61 attaching in base mesh, 63 UVs for, 125 hardwareNormals1.mb file, opening, 172 head node, using with layers, 75 head seam, fixing, 158–160 headLeftNormals.iff file, opening, 158 heads assembling, 158–161 creating base meshes for, 55–57 laying out UVs for, 126–132 sculpting, 77–87 selecting faces for, 128 Heads Up Display (HUD) tool, activating, 47 Healing brush, using with normal maps, 158. See also brushes high-resolution detail baking into texture maps, 16 sculpting, 15–16 hinge joints, description of, 207 horizontal direction, U as, 116 Hotkey Editor, using, 123 HUD (Heads Up Display) tool, activating, 47 humans, characteristics of, 17 humerus bone, description of, 211 Hypergraph, using with layers, 75
J jaw, tapering around, 128 Jiggle presets, using with muscles, 237–238 Joint tool, using, 215 joints of bones, 24 control in IK, 209 orientation manipulators for, 216 parenting bones to, 223 placement of, 215 types of, 206–208 using with skeletons, 23–24 See also manipulators
K keyboard shortcuts Bridge tool, 50–60 Component mode, 239 Delete History added to shelf, 47 Edge Loop tool, 51 HUD (Heads Up Display) tool, 47 Insert Edge Loop tool, 51 primitive polygon cylinder, 48 Smooth tool, 74 knife11.mb file, loading for skin slice, 289–293
302
Index
L Lasso Select tool, using with UVs, 117 layers altering transparency in Mudbox, 89–90 creating in Mudbox, 87 organizing in Mudbox, 88 sculpting in, 75–76 left arm, displacement map for, 171 left mouse button, relocating points with, 78 legs aligning cylindrical manipulator for, 120 completing with Bridge tool, 103 creating with Nex tool, 108, 110 laying out UVs on, 117–125 moving seams on, 123 reassembling, 124 unfolding, 122 wrapping cylinders around, 120 light, relationship to normal maps, 149–151 lips refining for UVs, 130 sculpting, 82–83 “live” surfaces, creating, 101 local solver, mixing with global solver, 122 loops for capping off edges, 78 for eye sockets, 79–80 inserting in cylinders, 51 quad versus triangulated, 100 using with heads, 77 See also Insert Edge Loop tool
M Magic Wand tool, using with normal maps, 158 Make Live tool creating muscle bulge with, 104 extruding edges with, 103 features of, 101 manipulating camera with, 103 using Create Polygon tool with, 102
manipulators for cylinders, 120 universal transform, 120 using with skeletons, 23–24 See also joints mapped UVs, revealing, 133 maps changing resolutions of, 156 extracting, 148–149 transferring, 150 See also displacement maps; normal maps; texture maps; transfer maps Marquee Selection tools, using with normal maps, 158 marquettes, sculpting, 37–40 materials, assigning UVs to, 143 Max Displacement, locating for brushes, 81–82 Maya versus Mudbox, 87 versus sculpting software, 73 Maya Hardware, rendering maps with, 172–173 Mental Ray final creature in, 294–295 rendering maps with, 174–181 mentalRay2.mb scene file, location of, 180 Merge Threshold option, using, 138 merging preventing, 61 vertices, 138 MESH layer, using with fish1.mb, 194–195 meshes. See base mesh Mirror Geometry tool, applying, 137 mirroring, implementing for UVs, 137–141 models, breaking up, 74 mouth, UVs for interior of, 136 Move and Sew UV Edges feature, using, 124 Move Seam option, using with NURBS, 251 Move tool using with muscles, 235 using with nCloth, 186 Mudbox altering layer transparency in, 89, 91 creating layers in, 87 creating veins and tendons in, 89
Index
organizing layers in, 88 using curves in, 91 using Pinch brush in, 89–90 using Smooth tool in, 89–90 using stencils in, 92–93 Muscle Builder UI choosing, 235 using with tendons, 238 muscle bulge, creating in Make Live, 104 muscle fibers, visualizing, 111 muscle groups, types of, 26 muscle jiggle, controlling, 237–238 MUSCLE layer, using with fish1.mb, 194, 196 muscle motion, averaging, 279 Muscle Parameters, setting, 237 muscle placement, drawing for Warkrat, 36 muscle shapes, customizing, 243–244 Muscle Spline Deformer, using, 249–250 muscles accomplishing, 253 adding shaders to, 241–242 applying control handles to, 236, 243 in arms, 253–254 closing ends of, 245 creating faces for, 108 creating for arms of Warkrat, 35 creating in arms, 234–238 Cross Section options for, 236 curves in, 236 customizing, 245–253 deformers for, 236 digital, 28 displaying components of, 244 matching colors of, 242 overlapping, 279 parts of, 234 positioning insertion points for, 239 pushing under skin, 249 in real life, 26–28 retaining history on, 258 sculpting, 37 Stretch Volume Presets for, 237 types of, 26–28 See also passive muscles
303
N nails attaching skin to, 261 automatic mapping, 134 protrusion for base mesh, 53 selecting faces to, 256 using Weld constraint with, 274–275 nCloth attaching skin to spines in, 201 Bend Resistance attribute of, 191 Compression Resistance attribute of, 188–189 creating connective tissue in, 199 creating cylinders in, 288–289 Deform Resistance attribute of, 189 fixing sliding skin in, 201 moving passive sphere in, 191 object types of, 11 Rest Length Scale option in, 189, 193 running simulations with, 11–14 selecting vertices in, 201 Stretch Resistance attribute of, 187–188 See also Nucleus engine nCloth fish, creating, 194–203 nCloth skin adding Wrap Deformer to, 284 creating, 260–264 See also skin nCloth surface, improving for knife, 292 nClothBasic1. scene file, opening, 186 nClothBasic2.mb scene, opening, 190 nConstraints, using with Nucleus, 191–193 neck area, creating for Warkrat, 35 Nex tool completing surfaces with, 106 creating dots in, 105–106 creating faces with, 108 creating leg with, 108, 110 downloading, 101 features of, 105 inserting edges with, 106–107 versus Make Live, 105 manipulating dots in, 105–106 using, 101 using Quad Draw tool with, 105
304
Index
No Flip option, using with forearm muscle, 280. See also Flip option normal maps choosing filters for, 157 versus colored texture maps, 149–151 versus displacement maps, 72, 152 displaying for connective tissue, 265 eliminating polygons with, 70 engaging in Mental Ray, 180 grayscale image of, 150–151 painting in 3D, 161–167 painting in Photoshop, 158–161 rendering, 172–173 rendering with Mental Ray, 174–181 using, 70–71, 149–151, 155–157 using Render module with, 162 using Target Meshes option with, 157 See also maps Normalize tools, using with UVs, 143 normalMap1.mb scene file, opening, 155 noses creating base mesh for, 58 refining for UVs, 130 nostrils adding geometry for, 77 refining, 79, 84 nrigid objects, polygon muscles as, 258. See also rigid object Nucleus engine features of, 186 and nCloth attributes, 186–191 and nConstraints, 191–193 See also nCloth NURBS, editing for muscles, 247, 249, 251 NURBS control handles displaying, 218 using with tendons, 241 NURBS muscles, selecting, 257 NURBS objects, using, 82 nurbsTessellate node, modifying, 269
O opacity, setting, 82
Orient Joint tool using, 216 using with radius joint, 222 ORIGINAL layer, using with fish1.mb, 194 orthographic images, drawing, 41–43
P Paint Operations tab, options on, 163 Paint Selection tool using, 118 using with connective tissue, 266 paint strokes, saving, 163 palm, adding splits to, 59 parent constraint, adding to spineGrp2 node, 230 passive muscles, creating, 257–259. See also muscles passive nails, creating, 257 passive nCloth, characteristics of, 11, 14 Passive option, using with nCloth, 186 passive sphere, moving in nCloth, 191 Pencil Curve tool, drawing scapula with, 224–225 Photoshop, painting normal maps in, 158–161 Physics Skin.mov animation, playing, 10 Pinch brush, using in Mudbox, 89–90. See also brushes pipelines, overview of, 14–18 pivot joints, description of, 208 planar mapping, using with UVs, 130–131 planar projections, using with UVs, 132–137 planes creating, 5–6 in orthographic images, 41 selecting for nCloth, 11 Playblast, creating for nCloth fish, 203 Point to Surface constraints, using with skin, 261, 274 points, relocating, 78 pole vector constraint, adding for elbow, 219–221 poleVector control handle, choosing, 218 polygon count, determining maximum for, 75 polygon muscles, assigning to layer, 258 polygon objects, bones as, 25 polygon sphere, sample triangles in, 75 polygonal geometry, increasing output of, 269
Index
305
polygons creating on geometry, 101 determining capacity for, 74 efficiency of, 69 eliminating with normal maps, 70 reducing use of, 98 Polygons shelf, creating, 47 polyMergeVert feature, using with base mesh, 61 polySmoothFace nodes, adding, 74–75 polySmoothProxy1 node, modifying, 76 power-of-two map, creating, 156 precision setting, changing for joints, 219 primitive polygon cylinder, creating, 48. See also cylinders projection methods, examples of, 130 proportion and form, sculpting, 38 prototypes, sculpting, 37–40 Proxy tool, using with layers, 75 pulling and scaling bones, 211 Push option using with muscles, 249 using with Sculpt Parameters Operation, 81
Relax Initial State option using with knife, 290 using with nCloth fish, 203 Render module, using with normal maps, 162 renderers Maya Hardware, 172–173 Mental Ray, 174–181 rendering knife animation, 292–293 previewing, 174 skin, 285–286 Rest Length Scale, altering in nCloth, 190, 193 RIG layer, using with fish1.mb, 194, 196 rigging arms, 215–227 overview of, 215 spine, 228–232 rigid object, converting sphere to, 186. See also nrigid objects root joint, description of, 209 Rotation_Joints, altering in nCloth, 194 Rubber Band constraint, using with nCloth fish, 198
Q
S
Quad Draw tool, using with Draster’s Nex tool, 105 quad versus triangulated loops, 100 quads cylinders with, 99–100 dividing in base mesh, 65 maintaining for heads, 77 versus triangles, 99–101
saddle joints, description of, 207–208 Save Texture on Stroke option, using with normal maps, 162–163 scaling and pulling bones, 211 scapula bone, rigging, 223–225 Sculpt Geometry tool options for, 85 using, 73–75, 83 using with bones, 211 sculpting armatures, 40–41 bones, 40 in layers, 75 marquettes, 37–40 muscles, 37 precision of, 75 process of, 38–40 skeletons, 38–39 working environments, 41 See also digital sculpting
R radius bone modeling, 211, 222 placement of, 214 twisting over ulna, 213 radius rotation, correcting, 226 ramp texture, using with tendons, 241 Rebuild Surface tool, using with NURBS, 249 Relax brush, using with muscles, 247, 249
306
Index
sculpting software versus Maya, 73 sculpting tools using, 73–74 using on vertices, 69 using with forearm, 282 seam moving on leg, 123 painting, 165–166 Select shell command, using, 123 selection interface, using with base mesh, 65 selections deselecting, 118 framing, 133 growing, 117 Self Collide setting, using with skin, 263 shaders, adding to muscles, 241–242 shading effect, fixing for displacement map, 170 Shape Brush profile, using, 85 shelf, creating for tools, 47 shoulder joint, orienting, 218 shoulder seam, fixing, 165–167 shoulders, creating base mesh for, 55–57 shunt muscle, example of, 26–27 simulations, running, 11–14 skeletal joints ball-and-socket, 207 drawing, 5–6 hinge, 206 pivot, 207 saddle, 207 skeletal muscles, description of, 26 SKELETON layer, using with fish1.mb, 194–195 skeletons components of, 23 digital, 25 purpose of, 24 in real life, 24 sculpting, 38–39 sketches, creating, 34–36 skin adding connective tissue for, 199, 265–269 anchoring with connective tissue, 29 animating, 259, 274–276 attaching to nails, 261
attaching to spines in nCloth, 201 caching, 284 changing compression resistance for, 262 creating, 262 creating high-end version of, 269 flexibility of, 188 Friction attribute of, 191 gauging friction for, 263 influences of, 5 manipulating in nCloth, 199 modeling, 274 modifying performance of, 276–285 pushing muscles under, 249 rendering, 285–286 setting initial state of, 274–276 shrinking, 274 shrinking and falling off, 260, 262 shrinking in nCloth fish, 198 simulating, 100 thickness of, 263–264 types of, 23 using Point to Surface constraint with, 261 using slide constraints with, 267 using Wrap tool with, 285 See also nCloth skin skin bump image, stamping, 85 skin folds, creating for Warkrat, 35 skin layer, creating, 22–23 skin sliding, fixing in nCloth, 201 skin surface, relaxing, 290 skin texture, creating for Warkrat, 85–87 skin thickness, adjusting in nCloth, 199, 293 skin1.mb scene file loading, 256 modifying, 276–285 skin2.mb scene file rendering skin in, 285–286 using with passive nails, 257 skin3.mb scene file, using with nCloth skin, 260 skin4.mb file, using with connective tissue, 265–269 skinBump.jpg, using, 85 skinning characters, methods of, 5–10
Index
Slide on Surface constraint using with bicep muscle, 266 using with wrist, 267 Smooth Bind, using with spine, 228, 231 smooth muscles, description of, 26 Smooth tool using, 74, 82 using with veins in Mudbox, 89–90 smooth-bound objects, creating, 5–10 Snap tool, using with base mesh, 59–60 spheres converting to rigid objects, 186 selecting for nCloth, 11–12 spin muscle, example of, 26, 28 spine creating for Warkrat, 35 rigging, 228–232 spine constraint, adding in nCloth, 202 spine FK joints, rotating, 228–229 spine1.mb scene file, opening, 228 spineGrp2 node, adding parent constraint to, 230 spline IK, rotating for spine, 229 Split Polygon tool features of, 78 using with base mesh, 59 using with nostrils and eyes, 77 spurt muscle, example of, 26–27 squishyTube cylinder, selecting, 288 stamp spacing, changing, 85 steelDrum cylinder, naming, 288 stencils, using in Mudbox, 92–93 Stretch Resistance attribute, using with nCloth, 187–188 Stretch Volume Presets, applying to muscles, 237 Stroke parameters, using, 85 Subdivision Surface Approximation node, using with displacement maps, 179–180 subdivision surfaces, including in cylinders, 99–100 Super Sculpey, using, 38–40 surface flow guides for, 110 importance of, 98 surfaces, completing with Nex tool, 106 swimming-type motion, creating with nCloth, 194–203
307
T Target Meshes option, using with normal maps, 157 Tearable Surface option, using with knife, 290, 294 teeth, UVs for, 136 tendons adding colors to, 241 creating in Mudbox, 89 digital, 28 in fingers, 268 in real life, 26–28 scaling curves for, 239–240 tessellating triangles, dividing, 178 tessellation, adding, 177 texture, terminology related to, 148 texture maps baking high-resolution detail into, 16 and surface flow, 98 and UVs, 116 See also 2D texture maps; maps texture4.mb file, loading, 137 texture5.mb file, loading, 141 thickness, adding to surfaces, 293 toes connecting in base mesh, 62 creating cylinders for, 51 UVs for, 125 tools, creating shelf for, 47 torso creating base mesh for, 53–54 UVs for, 125 tracing in 3D, process of, 101 transfer maps, using, 154–155, 170. See also maps transferring maps, 98, 148 transformations, freezing, 157 triangles determining number created, 74 dividing tessellations of, 178 managing with displacement maps, 71 versus quads, 99–101 in sample polygon sphere, 75 tessellating, 177 use in Warkrat, 98
308
Index
Tutorials Animation Skin, 274–276 Arm Muscles, 234–238 Bash Mesh, 46–67 Connective Tissue for Skin, 265–269 Cylinders, 288–289 Displacement Maps, 167–171 Draster Nex, 105–113 Layers, 75–76 Make Live Tool, 102–105 Mirroring for UVs, 137–141 Muscle Shapes, 243–244 nCloth, 12–14 nCloth Basics, 186–194 nCloth Fish, 194–203 nCloth Skin, 260–264 Normal Maps, 155–157 Normalizing UVs, 141–144 Painting Normal Maps in 3D, 161–167 Painting Normal Maps in Photoshop, 158–161 Passive Muscles, 257–259 Passive Nails, 256–257 Pipeline Overview, 14–18 Rendering Skin, 285–286 Rigging Arm, 215–227 Rigging Spine, 228–232 Sculpting the Head, 77–87 Skin Performance Modification, 276–285 Skin Slice, 289–293 Smooth Bind, 5–10 Tendons, 238–243 UV Layout, 117–132
U ulna bone description of, 211 placement of, 214 rigging, 215 twisting radius bone over, 213 Ulnaris muscle, fixing, 279 Unfold UVs tool, using, 121–122, 140 uniaxial joint, explanation of, 206 universal transform manipulator, using, 120 UV Sets, grouping, 141
UV Texture Editor, work area for, 116–117 UVs aligning, 140 assigning to materials, 143 creating, 125 determining configurations for, 133 for foot, 132–133 grouping and scaling, 141 for interior mouth, 136 laying out, 116, 132–137 for legs, 117–124 matching, 140 moving, 120–121 normalizing, 141–144 and planar mapping, 130 projecting, 117 refining lips and noses for, 130 revealing, 133 separating, 138–139 snapping to common grid line, 140 for teeth, 136 and texture maps, 116 using Flip option with, 139 for Warkrat’s head, 126–132
V V direction, role in UVs, 116 veins, creating in Mudbox, 89 vertex connections, using Rest Length Scale with, 189 vertices merging, 138 overlapping in fingers, 268 repositioning, 98 selecting in nCloth, 201 snapping in Make Live, 103 stacking for base mesh, 61 updating for skin animation, 276 using sculpting tools on, 69 verifying connections to muscles, 265 View Dependent option, using with displacement maps, 178 Volume Tracking Method, using with knife, 293–294
Index
W Warkrat back of arm for, 111–112 base mesh for, 111–113 creating, 34–36 creating base mesh for, 46–67 displacement of, 178 final version of, 295 fixing seam in shoulders of, 165–167 forearm for, 112 front and back of, 94 mirroring for UVs, 137 skin texture for, 85–87 triangles used in, 98 Web sites Draster’s Nex Tool, 101 .iff plug-in, 158 tips, tricks, updates, and forums, 294 Weld constraint, using with nails, 274–275 white, value for alpha gain, 176 working environments, sculpting, 41 Wrap Deformer adding to nCloth skin, 284 rendering for skin, 286 using with nCloth fish, 203 Wrap tool, using with skin, 285 wrist, rotating, 213, 267
309
License Agreement/Notice of Limited Warranty By opening the sealed disc container in this book, you agree to the following terms and conditions. If, upon reading the following license agreement and notice of limited warranty, you cannot agree to the terms and conditions set forth, return the unused book with unopened disc to the place where you purchased it for a refund.
License: The enclosed software is copyrighted by the copyright holder(s) indicated on the software disc. You are licensed to copy the software onto a single computer for use by a single user and to a backup disc. You may not reproduce, make copies, or distribute copies or rent or lease the software in whole or in part, except with written permission of the copyright holder(s). You may transfer the enclosed disc only together with this license, and only if you destroy all other copies of the software and the transferee agrees to the terms of the license. You may not decompile, reverse assemble, or reverse engineer the software.
Notice of Limited Warranty: The enclosed disc is warranted by Course Technology to be free of physical defects in materials and workmanship for a period of sixty (60) days from end user’s purchase of the book/disc combination. During the sixty-day term of the limited warranty, Course Technology will provide a replacement disc upon the return of a defective disc.
Limited Liability: THE SOLE REMEDY FOR BREACH OF THIS LIMITED WARRANTY SHALL CONSIST ENTIRELY OF REPLACEMENT OF THE DEFECTIVE DISC. IN NO EVENT SHALL COURSE TECHNOLOGY OR THE AUTHOR BE LIABLE FOR ANY OTHER DAMAGES, INCLUDING LOSS OR CORRUPTION OF DATA, CHANGES IN THE FUNCTIONAL CHARACTERISTICS OF THE HARDWARE OR OPERATING SYSTEM, DELETERIOUS INTERACTION WITH OTHER SOFTWARE, OR ANY OTHER SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES THAT MAY ARISE, EVEN IF COURSE TECHNOLOGY AND/OR THE AUTHOR HAS PREVIOUSLY BEEN NOTIFIED THAT THE POSSIBILITY OF SUCH DAMAGES EXISTS.
Disclaimer of Warranties: COURSE TECHNOLOGY AND THE AUTHOR SPECIFICALLY DISCLAIM ANY AND ALL OTHER WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, SUITABILITY TO A PARTICULAR TASK OR PURPOSE, OR FREEDOM FROM ERRORS. SOME STATES DO NOT ALLOW FOR EXCLUSION OF IMPLIED WARRANTIES OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THESE LIMITATIONS MIGHT NOT APPLY TO YOU.
Other: This Agreement is governed by the laws of the State of Massachusetts without regard to choice of law principles. The United Convention of Contracts for the International Sale of Goods is specifically disclaimed. This Agreement constitutes the entire agreement between you and Course Technology regarding use of the software.