Imagine Jerry Lewis starring in a Kurosawa movie, and you have the essence of DreamWorks’ CG feature animation Kung Fu Panda. Directed by Mark Osborne and John Stevenson, the film puts comedian Jack Black in the title role of Po, a pudgy panda who works in his family’s noodle restaurant and dreams of becoming a kung fu master.
“Everyone loved the idea of a soft, furry panda doing kung fu,” Stevenson says. “It seemed like a funny concept.” Even so, the idea languished at the studio for some time, stuck in story development stasis. “When Melissa [Cobb, producer], Mark [Osborne], and I looked at it, we thought it would be interesting to keep the idea of a panda learning kung fu, but to do that in a real kung fu movie.” And things began moving.
The directors and producer kicked around various versions of a story, and then they cast Jack Black as Po. That decision sent the story coalescing around Po, an improbable fan who gets a chance to live out his dream. “The way it happened changed constantly during the last four years,” Osborne says, “but the basic story line of a panda who goes from zero to hero didn’t change. We liked the collision of these two worlds—an epic movie as cool as the great kung fu movies, but with a central character who is comedic and fun to watch.”
When the awkward giant panda lands an opportunity to study kung fu with master Shifu (Dustin Hoffman), a small but powerful red panda, he meets the Furious Five, Shifu’s prize students who protect Po’s home, the Valley of Peace, from harm. Each superstar student is a different animal who represents classic martial arts fighting styles. Tigress (Angelina Jolie) is direct and aggressive. Monkey (Jackie Chan) is unpredictable and playful. Viper (Lucy Liu) is sly and lethal. Crane (David Cross) is graceful. And, Mantis (Seth Rogen) is tightly wound, fast, and precise. Ian McShane voices the film’s antagonist, the snow leopard Tai Lung, a powerful and angry fighter who escapes from a 20-year imprisonment and seeks revenge.
From left to right: Po, Shifu, Crane, Monkey, Mantis, Viper, and Tigress each represent kung fu fightingstyles for humans, but DreamWorks character designers fought a tendency to create anthropomorphicanimals by, for example, positioning the characters’ heads forward rather than upright.
A crew of approximately 300 at DreamWorks turned the story into the feature film, a heroic task. “Our mantra on the film was, ‘If it’s easy, we’re not interested,’” Stevenson says. “If we knew how to do it, we needed to look further because it’s already been done. Markus [Manninen, visual effects supervisor], in particular, was always on the receiving end of that. When we saw people sweating in their offices, we knew they were onto something.”
Osborne laughs: “We wanted to see a sea of white faces. But, our crew wanted the challenge. That tingly sensation of fear pushed them forward. It was thematic for a movie about a guy terrified to live out his dream.”
In the Flow
At DreamWorks, the visual effects supervisor oversees the processes and technology for the whole production. Manninen, who had been at Framestore CFC, joined DreamWorks Animation to take on that role for Kung Fu Panda. He started by bringing the pipeline—the proprietary software developed at PDI/DreamWorks in northern California—to the DreamWorks Animation facility in Glendale, California. Although DreamWorks’ feature Over the Hedge would transition onto this pipeline toward the end of production, Kung Fu Panda was the first film totally created with the unified pipeline.
“I remember my first Kung Fu Panda meeting in August 2003,” Manninen says. “My studio boss said, ‘I’m sorry. I don’t know how you’re going to make this movie.’ It had furry, feathery characters with loose, draping clothing doing kung fu. It had everything that’s hard in CG going on all the time. I realized we had to be smart about the workflow to accomplish the movie.”
Manninen began by looking for bottlenecks in the process, places where computations bogged down the artists. He then defined a workflow that used computer processing for the heavy lifting.
DreamWorks uses Hewlett-Packard machines on the desktop and in the renderfarm, HP xw9400s with dual-core AMD Opteron processors in a dual-socket chassis and, more recently, HP xw8600s with quad-core Intel Xeon processors. In the renderfarm, the studio is adding multi-core c-Class HP BladeSystems. Chief technology officer Ed Leonard estimates that rendering Kung Fu Panda took 24 million CPU render hours on the studio’s approximately 6000 cores. By contrast, Shrek took five million hours.
“The big advancement for Kung Fu was that we had 64-bit software across the entire tool-set chain for the first time,” Leonard says. “Generally, when you add visual complexity, you have to chop the scenes into pieces. We didn’t need to do that. It increased the production efficiency from soup to nuts.” Animators, for example, didn’t have to work with separate layers of characters. Lighters could work with more visually complex scenes.
To save time and give animators better control of characters’ silhouettes, DreamWorksdeveloped a process that let animators run cloth simulations while they were animating.
In addition to the existing core software capability, the R&D team made the lighting tools more interactive by taking advantage of the multi-core hardware. “The lighting tool used to run on a single frame,” Leonard says. “Now the tool can reach in and grab multiple cores. The fantasy is that someday we’ll have a director working with a lighting director as they would on a live-action set, moving lights and seeing the result in real time. We’ll need an order of magnitude or two more in chip architecture, but that’s where we’re heading. And we’ll have software that scales directly to that hardware in the next 18 months or so.”
In addition, the R&D department added functionality to underlying cloth and fur tools, giving Manninen’s team APIs for building production-ready systems that helped the artists create, perform, and render the martial arts animals.
Animal Action Heroes
Production designer Ramone Zibach began working on the project in July 2003, imagining how they would design animals that needed to walk on two legs. “We wanted to make them flexible enough for the kung fu side, but until you get into it, you don’t know how easy it is to make the animals look too human,” he explains. “We didn’t want Po to look like a guy in a bear suit.” Lead character designer Nicolas Marlet solved the problem in part by having the animals’ heads come forward on necks that angled into their backs, rather than fitting their heads on the torso straight up, as in human anatomy. “Nico had a great knack for having the characters retain the animal proportions and do what they needed to do,” Zibach says. “He designed almost everything, and a lot of his designs were successful on the first round.”
Zibach moved Marlet’s approved designs into Adobe Photoshop and painted them to create a more 3D look for final approvals. For Po, Zibach created fur brushes that worked well with Marlet’s graphic designs. “I didn’t want to paint photoreal fur,” Zibach says. “I did plush doll versions.” The plush doll look made its way into final CG versions of Po and the other furry animals. “That short fur worked out great for the look and the budget,” Zibach says. Moreover, the short fur didn’t change the silhouettes created by the animators when they performed the characters.
From Zibach’s brush, the characters went straight into modeling, where artists sculpted the characters from his paintings. “I was really happy with the process, from drawing, to painting, to modeling, to final surfacing,” he says. “It was really linear. We didn’t do sculptures by hand; we did all our modeling in [Autodesk’s] Maya.”
Storyboard artist/animator Rodolphe Guenoden, who has studied and practiced martial arts for 18 years, choreographed the scenes and designed the fighting style for the animals, with help from wushu master Eric Chen, who taught classes at DreamWorks for the animators and crew.
“We tried to stay as close as we could to what he showed us,” Guenoden says. Because each animal represented a martial arts fighting style, Guenoden tried to give the characters the animalistic style used by humans as much as possible in his storyboards.
For narrative scenes, the environments incorporatenegative space often seen in Chinese brushpaintings, and the restricted camera with littleZ axis movement seen in anime. By contrast,kung fu scenes have dynamic camera movesand action, particularly for speedy Mantis.
The monkey was easiest because in the ancient monkey style of kung fu, the human mimics the attitude of a monkey. Other animals offered the opportunity for inventive variations. For example, humans shape their hands to mimic a crane striking, but Guenoden didn’t want the Kung Fu crane to strike with his beak. Instead, he took advantage of the bird’s ability to fly. “It seemed like it could be on wires, like the fighters in kung fu movies,” he says. “We used the crane’s legs to punch and kick, and his wings to deflect, emphasizing his graceful form with curving moves.”
Guenoden gave the tigress agility, adding the ability to jump to the traditional tiger style that emphasizes upper-body strength. The tigress doesn’t use her claws, although there is a human form of claws in the tiger style. However, Tai Lung, the antagonist snow leopard who fights with a brutal version of the tiger style, does.
The mantis and viper were the most difficult. In the mantis fighting style, a human mimics the insect’s little hooks by grabbing and pulling an opponent’s wrist. “But, a praying mantis is very tiny, so we played with another attitude, exploding on the strike,” Guenoden says. “We made our mantis superfast—a streak of color passing by.”
To give the limbless viper a fighting style, Guenoden found ways to make the strikes recognizable in silhouette. “When she strikes with her tail, we found breaking points that would represent a hip, knee, ankle,” he says. “It took a little bit of work.” To make it work, Guenoden, who is a traditional animator, handed his choreographed shots to Fredrik Nilsson, a CG animator, who tried to match the drawings.
As for Po, the porky panda’s style comes from his personality and physique rather than the bear style of martial arts. “He had to admit that he was fat, with a big, round belly and short arms,” Guenoden says. “He’s so comical.”
Although the rigging was complex—the characters had to be flexible and fast, with spines that could twist and, in the case of viper, break a serpentine shape into angles—the crew didn’t need to develop new rigging tools.
Kung Fu Cloth, Fur, Feathers
However, Manninen’s team did develop new cloth-simulation tools. “Usually, animators animate, render the animation, look at the playback, get approvals, and then render the animation with cloth simulation,” he says. “But, we created a process using Syflex that allows the animators to run cloth sims while they’re animating. Because this is kung fu, we really needed to help the simulation look cool; we wanted to create a flowing look with the simulated clothing.”
Thus, for this film, when the animators first sent the performance to the renderfarm, the character came back fully clothed and the performance included the cloth dynamics. “Animators could see during the animation process whether the simulation looked the way they wanted or if something needed to change,” says Manninen. To clothe the creatures, character effects technical director Oliver Finkelde cut costumes that fit the various animal proportions, taking into account how the cloth would fall from the shoulders, particularly for master Shifu.
As for the fur, the plush look reduced the need for simulation, with one important exception. “The fur created in surfacing was almost like the final look of the character,” Manninen says. “But, even though it was short, we had to have motion because of the clothing, so we developed an automated process called Smoosh that bent the fur down as the clothing moved over it, and then fluffed the fur back up.”
PDI/DreamWorks’ lighting and rendering software generated and rendered the procedural fur for the Kung Fu animals based primarily on texture-map information, with guide hairs controlling Shifu’s eyebrows and long moustache. Smoosh runs almost like a simulation pass. “It looks at the proximity between clothing and skin, where the skin has fur, and creates texture maps per frame,” Manninen explains. When the cloth and skin are close enough, the texture maps tell the renderer to bend the hair.
To strengthen the emotional content of scenes, lighters chose specific colors rather thanslavishly striving for realism. Here, cold blue fights powerful red without turning purple.
“These were the kinds of things that made the movie possible,” Manninen says. “We had always done [the texture maps] by hand, but never at this scale. Taking advantage of computing power meant the artists didn’t have to do this work by hand. We did similar things for feathers.”
Manninen had worked on feathered creatures while at Framestore CFC, and he drafted a colleague from that studio, software developer and CG artist Alex Parkinson, who had helped feather Harry Potter’s Hippogriff. “We had to have an automatic way to produce the feathers, not only because of the crane, but because we wanted to populate the world with geese,” Manninen says. “And we knew the secondary characters would be close to camera.”
To make the feathers behave properly together, R&D developed a “de-interpenetration” process that handled the problems of interpenetration per frame and also temporally. The studio expects to reveal details of the technique at SIGGRAPH. “It allowed us, almost like Smoosh did, to have the simulation be 99 percent process,” Manninen says.
Finkelde handled the grooming and feather shading. “It was a big task, and it worried us the longest,” Manninen says. “But when you see the crane in high resolution moving around and doing what he does, you know it was so worth it.”
Crash, Boom, Bam
In addition to fur, feathers, and cloth, the effects team needed to break things. “We had to sell the kung fu action,” Manninen says. “Unless you truly believe in this world, you don’t feel any peril.”
Zibach worked with art director Tang Kheng Heng to design the locations. “We were influenced by Chinese watercolors and ink-brush paintings,” Zibach says, “and by Eyvind Earle’s personal work that lent itself to an anime look.”
For happy sequences, Zibach designed landscapes and buildings with simple, rounded silhouettes; for dangerous scenes, the buildings and landscapes had pointed silhouettes. “It is a simple theory, but we were pretty slavish to it, and I think it worked out well,” Zibach says.
Similarly, the designs encouraged the lighters to heighten emotions with colors. “We pushed colored lighting further than we’ve seen in CG—the saturation and the overall theory of not being realistic with color,” Zibach says. “We used gold for Po when everything is great. But, when Tai Lung gets out of prison, his color is cold, desaturated blue.”
During the prison escape sequence, for example, Tai Lung’s blue fights Commander Vachir’s powerful kung fu red. “It was a stony environment, so that made it easier to place the lights, but the big trick with red and blue was to not mix purple,” Zibach says. “Lighting pulled off a pretty big challenge.”
For the final shot (top), animators and effects artists worked together frame by frame. Bottom, left to right: The rough layout for staging and the camera, the bridge breakage, addition of ambient mist and VFX, and added debris and particles.
The prison break, which evolves vertically, became one of the most complex and difficult sequences. “Tai Lung is on one side of a rope bridge, and the army is on the other,” Manninen says. “We had to procedurally break the bridge over time so that there’s a constant evolution of bridge breaking while he’s making his way across.”
The effects animators used a rig based on the viper’s rig to control the four ropes holding the bridge. “It was the craziest bridge fight you could think of,” says Osborne. “We had a lot of communication back and forth between effects and animation to make sure the characters stayed on the bridge. But, we also had a lot of other technical challenges—houses collapsing, cabins blowing up, and kung fu breakage.
For this, the effects team developed a fracture tool set and workflow. “We blew up a building at the end of the film because our lead effects animator Lawrence [Li-Ming] Lee had such a cool way of doing it,” Manninen notes.
First, the art department painted the CG asset, and then the effects team drew fracture lines based on that painting. “We took the painted maps and basically created a voxel grid over the whole model,” Manninen says. “It was a cellular automata concept using the painted colors on the surface. We’d grow a region until all the voxels filled in, and then on top of that, we’d run noise to get fine details.”
The procedural system created broken edges that worked particularly well for stone and cement. Marching cube algorithms converted the voxels into a polygonal mesh that retained the texture coordinates. “We assumed we’d be breaking a lot of stuff, so we wanted no restrictions on how many times we could do that,” Manninen says.
At the end of the film, as might be expected, Po wins the fight with Tai Lung and becomes the hero. To do that, Po throws Tai Lung off balance, not so much with his unique kung fu moves, but with his humor. Because Tai Lung doesn’t know how to deal with that, he loses his balance.
Without such a concentration on a processing-dependant workflow, the crew on this action comedy might have lost its balance, too, when faced with a film about, as Osborne puts it, “stuffed animals beating the crap out of each other.” But, like Po, the seasoned team did the scary thing that seemed impossible. And, their heroic efforts made this dream work.
Barbara Robertson is an award-winning writer and a contributing editor for Computer Graphics World. She can be reached at BarbaraRR@comcast.net.