For Brave, the team at Pixar had to deal with a hero or rather heroine, who is on screen for almost every shot, but who needed wild, yet beautiful hair. The simulation department needed to develop a technique and approach not only viable on a hand crafted trailer shot, but something that could be used almost ‘out of box’ on most shots, or the film was simply never going to make its deadline.
Warning: this article contains plot spoilers.
Merida’s hair is really long
If her curls were unwound Merida’s hair would measure 4 feet long. The character is only 5′ 4″.
The Princess Merida’s hair was almost a three year process to get correct. Earlier hair such as for the characters in The Incredibles had much more groomed hair, but here the character’s hair simulation needed to solve how to get this messy, tempestuous and unpredictable look while still looking attractive and flowing nicely with the animation.
The previous hair system used by Pixar had to be seriously overhauled since:
- Merida’s hair required much greater hair to hair (soft body) collisions than anything Pixar had done before.
- The curls themselves were an issue from a simulation point of view.
Hair is modeled using a series of mass and springs (springs connecting point masses). But very curly hair acts in a contradictory way: curls are very stiff, so the springs need to be quite rigid, but the movement of the hair requires a soft flowing quality that fights this property. If the ‘springs’ were too soft the hair would unwind, if the hair springs were too stiff, her hair would not move realistically. This coupled with the problem of collision and intersection – while holding to the production schedule – made Brave’s hair simulation extremely complex.
Pixar developed and internally released a new simulator, which is multi-threaded. The new code does computation before it sends hair off to the simulator to determine how other hairs would relate. This means that a cluster of hairs would all be dealt with as one group, and the Hair simulation could be multi-threaded. In one sequence Merida flicks her hair from one side of her face to the other, but even such high level gross spatial changes were able to be automatically accommodated.
Mass and weight are two common often misunderstood terms. The fundamental relation between the mass and the weight is defined by Newton’s 2nd Law as:
F = m . a
where F = force (N), m = mass (kg), a = acceleration (m/s2).
Mass is a measure of the amount of material in an object. Mass does not change with a body’s position or movement. The mass is a fundamental property of amount of matter in the object. Weight is the gravitational force acting on a body’s mass.
It is this force that interacts with the stiffness of the ‘springs’ in the digital hair.
To address the curls themselves there is a core thread or curve that runs through the middle of a primary curl. The key hairs are B-splines that are then used to interpolate the motion of the rest of the hairs. So Merida had 1500 hand placed curves which interpolate to some 111,000 curves at final render. Merida’s hair was simulated at about 20 to 30 seconds a frame.
Hair like Merida’s – if real – would itself have quite a lot of actual mass and weight. “Over the course of doing her hair,” comments Pixar simulation supervisor Claudia Chung, “one thing we noticed was that the idea of weight of curly hair defies logic. If you took a curly hair and weighted it and then one took straight hair and weighted it, with the same weight in mass, the way each would react to gravity is quite different.” Merida’s hair wanted to unwind due to the weight of her own hair, so the team tried lighting the mass, but then the hair became floaty “almost like underwater hair. It is not that the mass changes, it is almost as if gravity itself changes.” So the team ended up using a gravity coefficient closer to that of the moon than earth.
Above: watch interviews with some of Brave’s artists at Pixar, thanks to our media partners at The Daily.
In reality, curly hair has a support structure where curls themselves support other curls. Hair needs to not only interact with other hairs, it needs to respond to cloth/cloths of the character – such as hood, wind, water/rain, the face and head of the characters and them in some scenes other hair, such as when the hair of Angus (Merida’s horse) flicks Merida’s hair.
To add further to the complexity of Brave’s special physics, Merida’s hair, and that of characters such as Angus, had to look natural even when the characters moved in accelerated, unrealistic ways. Many characters had vastly exaggerated movements for comic and creative effect, yet the simulations would look completely unrealistic if they inherited this movement fully. Thus the team had to dampen the physics between the on-screen movement and the simulation.
Why is hair actually curly?
Hair curls due to the way it is grown. Curly hair is almost like a ribbon, while straight hair is more tubular.
The amount of curl is dependent upon the number of disulfide bonds between hair proteins found in the hair shaft. The greater the number of links, the curlier the hair.
Hair is primarily composed of keratin, a protein, which grows from the follicle. Cells in the hair follicle generate keratin, and various other proteins. These proteins contain sulfur atoms, and when two of these sulfur atoms pair up and bond one gets a disulfide bond. If the two sulfur atoms in the same protein are at a distance when they join (to form the disulfide bond), the protein will bend.
Water and heat affect hair by affecting those disulfide bonds.
To style Merida’s hair, which had both a range of curl sizes and densities, a groom is created as with any hair simulation. “What the artist figured out is that she couldn’t keep up with the art direction,” says Chung. “Lena Petrovic worked almost side by side with the art director, but she couldn’t keep up so she thought she needed a faster way to curl curves, and she thought about it and she realized, ‘How do I do this at home? I use a curling iron!’ So she implemented a curling iron in the computer and the funny thing is that the implementation of it is really pretty simple, almost trivial. You feed it a diameter and the length and then the computer generates the curl, and then once she has that curl she can tweak the curl to give it more character, so it speaks to the character of Merida.”
One of the problems of curly hair is its volume. The team could not ‘groom’ the hair the way it is seen in the film, so the solution was to groom in an “exploded way, as if Merida had her finger in a light socket,” notes Chung. “That way each curl is standing on its own.” And then artists would apply the simulator on that.
In reality Pixar hit its objective of producing a workflow that would get very close ‘right out of the box’, in fact about 20% of the shots in the film were exactly that, which means “what we got out of the simulator was Merida’s hair as you see it, and many of the shots all we were doing was fixing errant hairs (fly aways) and things that were simple, and not having to touch the dynamics at all,” explains Chung.
Pixar is about about to release RPS 17, but on this film the team at Pixar used RPS 16 for rendering. There was a “new shading element that gave it more depth and complexity,” says Chung, but the hair was rendered using Deep shadows. An approach pioneered over ten years ago, Deep shadows (Lokovic, Veach) was very important as it provided self shadowing in hair which is vital to realism and even today without deep shadows, the actual shadows of hair appear harsh and unrealistic on secondary objects. Deep shadow maps also allow for accurate motion blurred shadows from fast moving hair curls.
While an individual hair can be rendered easily and its properties are easy to accurately render, the composite effects of hair volumes can be extremely complicated, as the optical properties are influenced by millions of micro-scale shadows, and much of the illumination of hair comes from neighboring hair’s light scattering and bounce.
Danielle Feinberg was doing a lighting test in pre-production and a test render failed of the Scottish landscape. The shot had fog rendered but the primary lights were not on for some reason. The result was a dramatic shot with shafts of fog around silhouetted hills and trees. This ‘happy accident’ so appealed to the Pixar veteran that it informed her whole approach to film. It became the basis of the forest lighting, and the “mysterious – ‘I don’t know what’s out there in this magical forest‘- feeling,” she says.
Danielle Feinberg was the director of photography for lighting on Brave. For the last 13 years, she has delighted in bending the rules of light to her every whim. She joined the film three and a half years ago.
Feinberg really likes soft lighting and Merida’s hair really responded and looked “really lovely with soft lighting,” as she explained to our media partner The Daily when they visited Pixar.
“I am still amazed by her hair – just by the fact we could even pull off her hair. We got this really wonderful thing from our simulation and character department,” Feinberg recalls as she describes lighting the characters “luscious red hair. We played with it and added some sub surface scattering to make the light bounce around and simulate that and then we add just a touch of blue to just the highest bits just to get a bit of fuzzy edges to just soften it out just a little – without going so far as it feels like too other worldly, or over the top. There was a little trial and error but they (simulation) gave us such a wonderful model that it was surprisingly easy to light – it’s been pretty amazing.”
By the time Merida was being animated, “there were over 4000 controls on her,” says animator and animation tool lead Bret Parker. Parker came on very early in the production of Brave, while the characters were still being rigged. “To get her to smile is about 30 controls,” which is fairly standard for an animated character at Pixar’s level, but what animators like Parker had to deal with was also the animation of Merida’s hair, when it is also standard in many productions to not have any hair on a figure at the animation stage and only have a stand in fixed ‘wig’ that indicates the physical volume that the hair would occupy on screen.
Early on both the animation team and the simulation team realized that the animators would need some idea of what Merida’s hair would be doing, and also to allow them to add things like her hand flicking her hair or tossing her head – in other words to pose and influence the simulation.
To give the animators something workable that would not slow them down, a cutdown much faster real time simulation was added for the animators for the first time in a Pixar production. This down and dirty quick simulation would indicate roughly what would happen when the final hair was fully simulated and added, but also allowed enough interactivity of the process to not slow down. A normal scene perhaps lasting just a few seconds would normally take a week to animate. “The final animation …I had 4 shots in one sequence, each took a week, so that’s a whopping 10 seconds of animation in a month,” laughs Parker as she discusses her animation process
The quick simulation model system worked extremely well allowing for great posing and animation timing that allowed for the screen time and blocking Merida’s wild hair required. “We knew right off the bat that this was going to be a huge issue especially coming off The Incredibles and Violet’s character,” points out Chung. “The animators needed to see her hair and they needed to see her dress as well, because if you are moving with a dress you move very differently as well. So we created new technology that allowed animation to run sims. We deployed a decimated version of both her hair and her dress, and for the queen as well.”
The animators then had the choice to run the decimated simulation animation which would play at 24 fps or they could pose say the hair with a hair rig, such that these poses would feed into the simulation “like a guide really,” says Chung, “in a very soft way. So when they went into a shot they would have stand-in hair that would give them volume, and then as they went into polishing they would run fast sims for more complex situations where Merida was interacting with her hair. The animation and simulation departments were lock step – we would deploy our artists exactly when animation did – so we sort of had a buddy system.”
Other simulations: horse hair
Perhaps even more complex is the hair simulation needed for Angus, Merida’s trusty horse. Like many of the secondary characters in the film, Angus required a range of different hairs – from his mane, whiskers, fetlocks and to his tail. Angus has some of the most complex hair, with 8 layers ad 111,000 hand placed curves in RenderMan expanding to 1.8 million final curves.
Other simulations: bear fur
By comparison, the bear fur was simpler but it is not as short as it appears, given the size of the character, the hairs under the bear’s arms for example are about one foot long and are defined by about 20 points defining the groom.
There is a key scene in the film where Merida is teaching her mother, now transformed into a bear, to fish. From a simulation point of view this could easily have been one of the most complex scenes. The water simulation needed to react with the cloth simulation, making it wet and with the hair, which is also wet and interacting and affecting both the water sim and the cloth sim.
Hair to hair interactions include friction, static charge which can cause hairs to merge, clump and group. This is magnified several times over if the hair is wet.
In the fishing sequence the mother bear is in the water splashing and the hair/fur is wet, causing matting or clumping. Merida also falls in the water leading to both characters being wet, interacting with water, cloth and hair sims. Says Chung: “The pairing of the water surface and the hair that had to move, and the back and forward – careful process between the effects artists and the simulation artists, because the movement of the fur had to be driven by the water.”
The groom and shading on the bear itself was done before the shot starts, so only the body is ‘wet’ and the top of the bear is assumed to not be really wet, which meant Pixar did not need to dynamically change much during the shot. The sheen and shine are added to the body to indicate the wetness. The effects TD started by setting up the water surface and they drove the direction of the water, “and then they hand off that to the simulation artist who does both the cloth (Merida) and hair and then he – from that – can judge how to simulate those models.
There are a couple of shots in that sequence he also hand crafted clumps of the fur in order for the water to run off the collected fur clumps,” adds Chung, talking about Stephen Gustafson, “one artist took on the whole sequence – it is big achievement for him, I think – he is amazing – Mark Andrews – (the film’s co-director) gave everyone nicknames and Stephen had the nick name of Sim Samurai – ’cause he was so good – and quiet!”
Meanwhile, Merida’s hair was animated to have higher gravity, increased mass and more drag when wet. “The way wet hair moves,” says Chung, “when it is wet it sort of clings – so we had to get that as well.”
Merida’s dress also needed heavy simulation, not only in normal scenes but also in the complex water scene where the dress must be simulated being wet and dry. The dress was built from a digital pattern. Pixar is famous for actually having artists doing digital tailoring who have previous skills and experience in traditional costume, wardrobe, design and dress making. While some of the problems faced in realistic cloth and clothing are related to finding the appropriate level of mesh complexity, or improving the underlying dynamics of cloth or even the excessive intersections and collision problems cloth inherently needs to master, great dress making skills are also needed. Cloth texture selection and pattern cutting is just as important especially for a Princess.
But even the finest cloths get to be dunked in a river in a comedy, and having made Merida’s dress work in air, the team also had to make it work underwater for a brief shot. “For the cloth itself Stephen figured out the parameters for Merida’s dress when it is under the water surface when you have that buffeting,” outlines Chung, “which is very important, and then once she picked up her dress, he figured out how to make it seem heavy and wet.” This was enhanced by environmental shading adjustments, when Merida was near the water surface; “anything around this water surface is now shaded with a wet shader – so there is technology there too.”
Don’t even try this with live action
One of the more difficult shots in live action with a beauty shot of a lead actress is removing a hat, helmet or, in the case of a Scottish Princess, a hood. Normally in live action this is such a problem to achieve without an actress looking bad that it is simply avoided, or it is hidden with a cut or edit, with the action cutting back just after the reveal. And of course on the set the helmet, hat or hood never actually touches the actress’ hair.
But not for Brave.
In one of the hero moments of the film, Merida is revealed from under a hood during an archery contest, and not only is this a close up, but it is done deliberately and very dramatically, requiring a perfect end hero pose of the film’s heroine. And it was required as an early shot for the trailer.
For this shot the simulation team had no choice but to spend a lot of time and hand tweak the simulation extensively. The pipeline was still in its early days and the shot is inherently a difficult one. Simulation does exactly that and simulates what would happen – and in real life that is a mess of hair.
The trailer scene is a defining moment where Merida has to be seen “with her hair in full glory and trying to do that was a tricky feat,” jokes Chung. “We had controls that would guide the simulation, and we can blend between sims. All of our models in a simulation all know what their at rest default pose is, and so you can define a simulation to be more attracted to that pose, but you have to do it with a slight hand – if you are not careful. In fact, it can look very stiff, but if you look at that scene, her hair remains looking soft.”
All images and clips copyright © 2012, Disney/Pixar.
We've been a free service since 1999 and now rely on the generous contributions of readers like you. If you'd like to help support our work, please join the hundreds of others and become an fxinsider member.