Forget animating clothes by hand. Our 40 tips, supplied by experts from every sector of the 3D industry, will help you create faster, more c...
Forget animating clothes by hand. Our 40 tips, supplied by experts from every sector of the 3D industry, will help you create faster, more controllable clothing simulations
Clothing simulation has now become a standard part of professional animation jobs. Whereas, a few years ago, it would have been necessary to resort to a third-party plug-in – or to fake the motion of the cloth by hand – most modern 3D packages have sophisticated cloth simulation systems built in as standard. We asked four experts from different fields within the 3D industry to give us their tips for making better use of these simulation tools. We begin with the market sector in which artists traditionally operate under the least time pressure: feature animation. Accordingly, Pixar cloth lead Claudia Chung focuses on the process of setting up a cloth pipeline, and the way in which complex shots can be broken down into a series of smaller problems that can be resolved completely with simulations. Whereas feature animation is often stylised, visual effects work places greater pressure on artists to achieve photorealistic results. In her tips, The Orphanage’s Daniela Calafatello discusses the importance of getting the fundamental properties of a simulation – such as mesh resolution anbd orientation – correct in order to achieve believable cloth motion. Next, we turn to the high-pressure world of game cinematics. As the time available in which to fine-tune a shot decreases, the need to produce a simulation that works first time increases. In his tips, cinematics veteran Malcolm Thomas-Gustave sets out measures that artists can take during set-up to minimise problems later on. Finally, The Mill’s David Knight discusses the most time-pressured field of all: advertising. With turnaround times measured in days, it is not always possible to rely solely on simulation. David’s tips explore ways in which artists can ‘cheat’ simulations, or combine them with traditional rigging techniques, to achieve results more quickly. Together, our experts’ tips provide a fascinating, wide-ranging overview of the field. No matter what kind of projects you work on, you should find advice here that will help you achieve faster, more controllable simulations. ANIMATION
BY CLAUDIA CHUNG Our first set of tips relate to a world in which absolute realism is not a priority. However, cartoon animation creates its own problems for the cloth artist, making it vital to establish a good basic workflow, as Pixar’s Claudia Chung explains: “Animation is a world in which strangely proportioned characters move in ways that would never be seen in real life. The world we simulate, however, is based on a physics-driven model. The role of the cloth lead is to marry the two. “At Pixar, we invest the time to set up cloth models before we enter production, a process broken into three equally important steps. First, we design and model the garments onto the character. Next, we finesse the movement and material properties by running the garments through various animation cycles and tweaking simulation parameters. Finally, we prepare the garments with customised, built-in simulation controls to be used in production. “This three-step process ensures a simulation-savvy garment that will run through every shot successfully. Of course, this is an idealised – and therefore unattainable – scenario. To combat the wildly animated caricatures we deal with, we also construct a toolbox of solutions that help to shepherd garments through shots.”
01 COLLABORATE WITH THE ANIMATION DEPARTMENT The character’s performance is what drives the movements of their clothing, so foster a collaborative relationship with the animation department. Explain to animators how cloth simulation works and how they can adjust their work to minimise abnormal body movements or gross intersections. Keep an eye on shots currently in animation. If there are difficult ones coming through the pipeline, such as a character who rips open his jacket, offer to run simulations in parallel with the rough animation. This will minimise problems when the fully animated shot is ready for simulation.
02 SPEND TIME ON LOOK DEVELOPMENT Early in production, invest some time in developing the look and movement of garments in your film. This look can vary from film to film. For example, in Ratatouille, the characters took on a puppet-like quality that was also reflected in the miniaturised feel of the chefs’ garments.
03 BREAK SHOTS INTO SOLUBLE PROBLEMS Break complex shots into soluble problems. These grabs are from a 134-frame shot from Ratatouille, in which Skinner (right) grabs Linguini’s jacket seven times, each grab lasting for around three frames. I first ran the simulation with basic controls to see how the cloth would behave. Result: the sleeves fell off Linguini’s arms and Skinner’s scarf intersected itself (top image). Fixing these problems meant I could focus on the grabs sequentially, knowing the rest of the shot was stable. I worked with an animator to position Skinner’s hand so that it would land on the current position of the jacket, close in a fist pulling the cloth taut, and cleanly release in time for the next grab.
04 MASTER PATTERN THEORY The better tailored a garment, the better it looks and moves on a character. Studying traditional pattern theory will teach you where the seams of your garment should be; how a garment should hang off the body; and which folds are natural and believable, and which are artificial. For example, the shoulders of a garment modelled in 3D can look stretched or lumpy. On a real shirt, there is a seam around the shoulder. The cloth will fold around this seam when the arm is up and collapse into the armpit when the arm is down. Study the flat pattern above: the curve of the seam first rises to accommodate the roundness of a shoulder, then falls to remove material near the armpit.
05 DON’T FORGET THAT THE FINAL PRODUCT IS 2D Remember that the final product of a 3D animation is a 2D image. Animators usually pose their characters to the camera. Even though a simulator is a physics engine that sees cloth in a 3D world, you can also cheat to camera. Push a character’s off-camera limbs away from the body in unnatural ways to keep cloth from intersecting or snagging. If the garments end up intersecting visibly to camera, clean those areas by setting the opacity of the faces of the penetrating geometry to zero. In even more problematic situations, I have simulated layers of cloth separately and then animated them to camera to appear as if they are interacting.
QUICK TIPS
06 Work with the character modeller to create an anatomically correct body. Then cheat the body in ways that will support the shapes of your clothes.
07 Pin garments to characters in strategic regions, such as those hidden from camera or beneath other layers of clothing.
08 Simulate the cloth on the character’s first-frame pose for at least 10 frames before a shot begins. This will allow the cloth to settle, minimizing ‘oozing’.
09 Simulate only the frames in which a character appears in shot. This minimises problems due to stray keys on frames outside that range.
10 Intersections between a character and itself, other characters or set pieces are the most common culprits for unstable simulations.
VFX
BY DANIELA CALAFATELLO For our second set of tips, we turn to a world in which absolute photorealism is a necessity: that of visual effects. The Orphanage’s Daniela Calafatello explains why paying attention to fundamental properties of a simulation like mesh resolution will pay dividends later. But even with the relatively long deadlines to which artists on feature films work, it is still necessary to ‘cheat’ in order to achieve results faster, as Daniela explains below:
“For most visual effects productions, the primary aim is to achieve a realistic look for the cloth. During the simulation phase, the final goal is to create something good enough to substitute for a real costume.
“Starting with solid foundations such as the proper resolution and topology for the mesh, and establishing the correct scene scale, will help achieve more consistent and predictable results.
“But while your original simulation may get you most of the way there, during production, there never seems to be enough time for tweaking. Instead, tricks are employed to finesse the raw simulation results, such as local simulation, using wind to fake motion, simplified collision geometry, low-resolution simulation meshes and the use of corrective shapes.”
11 GET YOUR TOPOLOGY RIGHT Cloth engines build springs along the edges and faces of a mesh. Most solvers give you the ability to control the characteristic of these springs. Having the edges aligned with the strands of the fabric that you are simulating can be helpful in achieving a more natural, realistic end result. Most of the time, the threads that make up clothing run parallel to the length of the body or are inclined at 45 degrees to it. Consider turning the edges of the mesh to match the fibres of the fabric being simulated.
12 SIMPLIFY THE COLLISION GEOMETRY Collisions and contacts between fabric and other objects in the scene are hard to achieve in computer animation. Shots where a character needs to manipulate cloth are particularly complex, and can result in an excruciating back-and-forth process between the animator and the simulation artist. To help in this situation, some cloth engines have the ability to make cloth and collision objects ‘sticky’, giving you some degree of control over the way in which they interact. Other solutions are to animate constraints between the cloth and the collision object; or to parent a simplified proxy mesh to the object that is supposed to collide with the cloth and use that to drive the simulation.
13 USE AN APPROPRIATE RESOLUTION Resolution is very important for cloth simulation, since a mesh can only bend and fold at points where there are edges in the geometry. Find a real garment that is close to the one you are trying to simulate. Observe where the cloth folds, and find the smallest fold you are trying to reproduce digitally. Measure its size in relation to the entire garment. Now make sure you have the same relationship in your digital costume: each face of your geometry should be no larger than the smallest wrinkle you have decided to capture.
14 CREATE A LO-RES MESH To simplify simulations, the original cloth geometry can often be stripped down to create an optimised simulation mesh. After achieving the desired look, its motion can be applied to the final, highly detailed object via a Wrap deformer (in Maya; other packages use their own terminologies). This mean that pockets, button and folds removed from the renderable mesh to create the simulation mesh can be naturally reinserted once it is driving the final costume.
15 USE WIND TO FAKE MOTION Sometimes it’s impractical to move your object far or fast enough for a particular shot. If your character is supposed fly at 300 mph, but is moving only a few units in your 3D application, consider applying wind to simulate the extra motion. It’s an old live-action trick that gives great results.
QUICK TIPS
16 Check how your solver expects the mesh to be constructed. Some solvers prefer triangles to build the spring system, other expect quads.
17 Check that you are working at the right scale. All the forces in your simulation will react differently according to the scale of the scene.
18 Before simulating, get rid of all folds and double-layered parts of the cloth: keep them in the renderable mesh the simulation will eventually drive.
19 If time is tight, consider using corrective shapes on the cached meshes for small adjustments to the cloth, like fixing minor intersections.
20 Cloth can be used as a modelling tool. Instead of sculpting folds by hand, create a tube of cloth and drop it on the character to create realistic forms.
CINEMATICS
BY M. THOMAS-GUSTAVE
As the timescale of a project shortens, and the time available for experimentation disappears, it becomes increasingly important to set up your cloth simulation in a way that will minimise problems later. Shortcuts and cheats begin to come to the fore, as the focus of the job shifts from absolute accuracy to simply getting it out of the door on time, as game cinematics veteran Malcolm Thomas-Gustave explains:
“Computer animation is a fastpaced working environment that can leave you looking both ways as deadlines blur past you – and this is particularly true when working on pre-rendered game cinematics.
“Most of the work is outsourced and has to finish within the developer’s deadlines, even if the work is commissioned with only a few months to go. Time management is key, because you don’t have that extra week, extra day – or sometimes, even an extra couple of hours – to finesse the work.
“With cloth simulation falling so close to the end of production, it is one of the elements that gets slammed the hardest. This can lead to long nights of simulating and fixing and hoping that everything renders out. But there is hope, because, with careful planning and strong foundations, you’ll be able to tackle those last-minute changes the night before delivery.”
21 USE A SEPARATE CACHE FOR THE RUN-UP In any simulation, the character’s clothing is always going to move from a default pose to the animation pose at the start of the shot. There are several ways to achieve this, but the fastest solution I’ve found is to animate between two caches: the animation cache and a bind pose cache. Layer the bind pose cache over the animation cache and animate it turning off between the beginning of the run-up that precedes the actual ‘live’ animation and the start of the animation itself; or even a bit before the live animation if you need to give it more time to settle in. You can leave a mesh in the scene file that you just use to export a single frame cache for your start position.
22 TRY NON-SIMULATION COSTUME SOLUTIONS Proper rigging can save a lot of simulation time. By giving a character a built-in costume, you can pick and choose where you need a full-on cloth simulation. These solutions can also be useful if you want to turn off simulation on part of the garment and just go with the skinned version. This requires more set-up time, but in many situations, the payoff is well worth it..
23 ESTABLISH YOUR DEFAULT SETTINGS When given a range of shots to work with, pick a few that typify the types of motion your character is going to have. Then focus on the simulation settings for those shots. This gives you a base set-up that you can quickly modify when tackling the remaining shots. Your settings don’t need to work for every possible situation, just the ones you’re going to encounter a lot.
24 AVOID DEFORMATION RIGS I never use the actual deformation rig in a file if I can avoid it. There are two main reasons: first, you have to update the file with rig updates, and second, it gives much slower feedback than a cache-based system where you bake out vertical positions from an animated character, then reapply that data to a clean mesh. I prefer to build a cloth file that essentially attaches to the cache file. If you change something in the rig, it won’t affect the cloth; the only time you need to change anything is when the model itself changes.
25 USE SEPARATE SIMULATION AND COLLISION GEOMETRY Create separate simulation and collision geometry. The resolution of the simulation geometry is dependent on how tightly you want it to be able to fold; but collision geometry should always be as light as possible. I only increase the resolution of collision geometry when I absolutely have to, and I try to avoid using the actual character mesh at all costs. A lo-res collision cage cached out with the rig is the best bet; although wrapping your cage to the cached character is also viable, if slower.
QUICK TIPS
26 Combine objects that will have the same settings. Two straps hanging from a shirt can form just one object if they’ll always act identically.
27 When two characters interact, their cloth doesn’t have to. You can simulate one, use it as a collision object, then simulate the other against it.
28 Not every cloth object in a scene needs a unique simulation. A loopable cache gives a quick solution for background set pieces like flags.
29 Consider using a simulation for cloth direction and gross movements, then using deformers to fake wind and other fine details.
30 Be mindful of which settings have the greatest impact on simulation time. Avoid changing them when tweaking a simulation, if possible.
ADVERTISING
BY DAVID KNIGHT
If there is a world in which time is even tighter than game cinematics, it’s advertising. With turnaround times sometimes measured in days rather than weeks, it becomes imperative to create simulations that work first time. Below, The Mill’s David Knight explains how detailed knowledge of a particular toolset – in this case, Maya’s nCloth – can help achieve this. His tips relate primarily to a single job: the recent ‘Do The Moves’ commercial for Comfort fabric conditioner.
“When working in advertising, your biggest enemy is time. Even talented artists find that they occasionally produce work of a lower quality because of a tight deadline. And given its inherently technical and time-consuming nature, cloth simulation for advertising is often considered the worst of the worst.
“However, the technology has improved a lot and today, with tools nCloth in Maya, the headache of simulation has been reduced to a point where it has become feasible to use it in day-to-day operations. What I used to consider a obstruction in my work has now turned into a trusted ally…
“The pressure of a tight deadline is still ever-present but arming yourself with reliable, predictable tools, whose capabilities often exceed their intended functions, will help you reach that deadline.”
31 MIX SIMULATION AND SKINNING TO CUT SET-UP TIME Even a simple clothing set-up can take a long time to create – but, using the rig given to you, you can reduce your simulation set-up time dramatically. Let’s say you have a female character with an old-school skinning set-up in which the geometry of her skirt is skinned to her legs and hips. In Maya, start by applying nCloth to the mesh. nCloth looks at the construction history of the scene, so you can use the basic deformations off the skinned skirt’s animation rig to take care of all the complex setting up: no constraints and no worrying about intersection around the hips. In your nCloth node, turn the Input Attract slider all the way up. Then, via Edit nCloth > Paint Vertex Properties > Input Attract, start painting the Input Attract value onto the mesh. White means follow the skinned skirt; black means normal cloth simulation. Paint white around the character’s waist and flood the rest of the mesh with five per cent white to make the rest of the skirt follow the skinned version just a little. The skirt will now stick nicely to your character’s waist, while the simulation will make the rest of the fabric behave realistically.
32 MIX MULTIPLE SET-UPS Sometimes, a character’s animation will definitely not result in the cloth movements you need. For a shot in which a dancing character’s scarf was supposed to wrap around her neck, I created four separate set-ups. The first was the loose scarf flapping around while she danced. The second was the scarf in its final pose, wrapped around her neck from frame one, also flapping away. For the third, I scrubbed the animation of the loose scarf until I reached the point where I wanted it to start wrapping around the character’s neck. Here, I created a duplicate, adding bones along the long loose part of the scarf, then skinned the scarf to the bones. Over the next few frames, I keyed a few poses of the scarf with the bones wrapping around the neck. The fourth was just a Blend Shape of all three previous set-ups. By simply keying the Blend Shape to morph from one to the next as the animation dictated meant I did not have to deal with a single overly complex set-up.
33 THINK OUTSIDE THE BOX Despite its name, nCloth doesn’t just simulate cloth: the number of uses for a good cloth simulator is staggering. In nCloth’s case, these range from soft bodies to rigid bodies and even liquids. For the Comfort ad shown in tips 31 and 35, I used nCloth in more than ten places. Only one of these was to simulate clothing.
34 PRE-TEAR YOUR CLOTH Generally speaking, you want to leave as little to chance as possible when setting up any simulation. Dynamically tearing cloth will waste large amounts of time through trial and error. Instead, the way I do it is to pre-tear my object by cutting extra edges into the geometry, laying out exactly how I want my tear to form. Then I make sure that none of the vertices along my tear is welded. Once I have added my nCloth node to the scene, I create component constraints to sew the tears together until the time comes for the cloth to split apart, creating separate constraints for each vertex. Once I have animated the cloth stretching, I can then simply animate the strength of these component constraints to zero as needed. Result: perfectly controllable tearing.
35 USE CLOTH TO HELP RIGS When asked to rig a palm tree for an advert, I set up the tree using bones, skinned the parts of the mesh to the bones, then added a cloth simulation on top of the rigged tree. I then used nCloth’s wind and wind shadowing functions to add a little secondary dynamic movement to the leaves. An approach like this means that the animators don’t need to worry about the leaves; and you don’t need a complex set-up to tune every detail manually.
QUICK TIPS
36 As with any technical task, preparation pays. Three minutes spent planning ahead is three hours you save yourself through trial and error.
37 Presets are your friends. There is never a good reason to reinvent the wheel. Why do the same with your cloth simulations?
38 Trim excess fat off your simulations. That means no collisions, fewer samples, low-res geometry: anything to make your simulation lighter.
39 Exploit multiple cloth caches. If fixing your simulation breaks it somewhere else, paint in parts of your old working cache for a nice quick fix.
40 Cloth alone may give you the result you want. But why build a house with just a hammer? Using other tools as well may give the same result faster.
Related links:
3dworldmag.com
COMMENTS