Click on the link for the webpage access

"We thought the renders looked pretty real, but when you put on the glasses, you believe it even more because now you can see both sides of the face at the same time because your eyes are far enough apart to take in that information." - Guy Williams, VFX Supervisor

Click for Larger Image James Cameron may be the King of this world but he is the God of Pandora, a paradise planet of suburb transcendental beauty. And the artists of Weta Digital are Cameron's angels. Of the 162 minutes of film, 117 minutes equaling 1,832 shots was created by Weta's angels, over 2,000 if you count the omits.

Weta worked on every scene with a Na'vi. The Sci-Fi film is set in the future on the distant planet where humans attempt to mine a mineral whose largest deposit lies under the home of the Na'vi, an indigenous blue humanoid character who is directly linked to the life force of Pandora, and will fight to the death to protect it.

Humans, in an attempt to infiltrate and relocate the Na'vi, develop a DNA hybrid of them and selected humans, and grow Na'vi-like creatures that can be mentally linked and remotely controlled through the DNA-related human mind.

"Once you go into the world of the Avatar," explained Wayne Stables, one of several VFX Supervisors needed to meet the requirements of this incredible film, "once (main character) Jake Sully and the other humans make this link, pretty much everything in the film becomes computer generated.
Click for Larger Image

A realistic jungle with trees and leaves, with grass with the wind blowing through, with exotic plants that still have to look real, that becomes a huge task. Then add in characters that had to look real, had to be completely believable- you had to read the emotion in their face.

But they are blue. And just in case that hasn't made your life difficult enough, you decide to do it in stereo. When you consider this is a large planet, rivers and waterfalls or various other complex phenomena, you can start to gauge the scope of digital FX that was required." And then there is the jungle.
Click for Larger Image
Most of the trees are built by hand, and in a brilliant move, they used Massive for the ground cover. The head of the Massive Department, Jon Allitt, pointed out that if they use Massive to tell characters how to react in a crowd, giving a plant a bit of a brain and basing it's growth on the surrounding terrain could direct how a plant would grow.

Allitt wrote a system that allowed Weta's artists to plant (programming) seeds in Massive that accomplished this, as explained by VFX Supervisor Eric Saindon. "It was very interesting. You could actually watch a forest grow in real time with this solution, and any TD could grow just by painting colors on the terrain." With this elegant solution, the big trees would grow first, then the smaller trees would die off as the big trees took away the light, the smaller trees would fight for position, the ground cover would fill in where it could get light." This offered the ability to have variants built in easily by simply changing the random number seed, a programming term that means when you do a random call, there is a number you can pass through to offset the results.

"We spent a lot of time figuring out the interface in Maya so the TD's could see what they were working on, and the rendering pipeline so we knew how to get this stuff through," said Saindon, who spent three years on the film, starting with figuring out how to do the jungles, lighting and rendering the huge environments.

"We ended up using XML's for our scenes, sort of a big spread sheet that defines what is there for trees, ground cover, anything that made up the jungle. We took the film box files from Cameron, then converted that into the XML format, then started modeling all the plants.
Click for Larger Image

Click for Larger Image "A lot of our modeling techniques were procedural, so we wrote a tree building L-System type that allowed us to build lots of variations on trees, plants, and ground covers in a very efficient way. They came out essentially rigged so we could do dynamics and interactions." The result was roughly 2000 variants on plants and trees for dressing the jungles on Pandora.

Weta wrote a couple of plant building tools, not just L-systems but plant growth rules to guide stages of growth. VFX Supervisor Guy Williams elaborated. "We also had a vine growing tool where we could specify attributes like drooping, spiral around a trunk, how much they stick to the surface.

They could grow vines off those vines, and grow vines to intertwine with all the vines, then go in with paint effects and add leaves and moss and twig detail in-between the vines."
With such a dense forest and constant interaction with the Na'vi, Avatars, creatures, humans, and equipment, the issue of dynamics had to be solved. This was managed by a process of selecting any plant a character contacted and running a script that, within minutes, would replace all the selected plants with dynamic plants that had already been simulated.
"We used a series of lattices to do that," explained Williams. "It was plussed up a bit so the lattices anchored themselves to the ground, then it was completely replaced with a program called RnR that swapped out the lattices for hierarchical curves built for every plant on the show. The cool thing about this RnR system was that it would take any force, not just a collision source, so you could pass rolling wind forces against it to get the appearance of turbulence for a helicopter landing, or a shock wave reaction from an explosion. It was a really nice quick way to put motion through the entire jungle."

The plants also had to have the resolution to hold up at any distance and all plants had to hold up in the foreground. The simplest plant had on the order of 1,000 to 5,000 polygons, relatively low resolution. The average plant was closer to 20 to 100,000 poly range, but some of the high resolutions plants, one called "fernRekA" that looked like a fern whose leaves hadn't unfurled yet, had 1.2 million polygons. Each leaf was modeled.

The foliage had to be this detailed to stand up. "We put a lot of effort into the Avatars," said Williams. "We made sure that every piece of clothing and the Avatars themselves had just as much reality as a live action shoot so we could put them in the place of characters and not have them look simplified. The problem we ran into was when we put these gorgeous looking Avatars into our CG jungle, the jungle looked simple, so we had to start adding polygons and texture maps to the jungle."

Promoting the plants up to the Avatar level "usually meant getting better edge detail or curvature of the leaves, or as simple as adding the smaller structures that come off the plant." They took that concept a step further, by spreading trees and fallen tree trunks throughout the jungle, textured with moss and bark.
Click for Larger Image
  Go to page 2

The initial plan was to create a blue jungle but found that though it looked beautiful, it felt contrived. The nail in the coffin was that the frames became too monochromatic in their lighting. If, for example, the day was overcast the light was predominantly blue, as was the radiosity coming from the ground.
The result was blue light with blue highlights with blue reflections on blue skin "and it all got pretty simplistic. It looked real, but had a surreal quality to it, so we decided to get more accents of color back into the jungle, shift parts back to being green so you could have a blue sky filled with green bounce with a yellow key, and it gave a nice balance of light in the scene."
Click for Larger Image

Click for Larger Image They used Paint Effects to add the final detail, defining the paint effects rules, then would convert it all back to a renderable asset. They had an entire team of people whose job was to do paint effects dressing that sometimes was almost as heavy as the shot. "It made for really lush jungle scenes and gave us so much ability to put so much ability to put so much visual detail into the frame that your mind started to cave in and accept it as being real."

Then there was the biolume. Saindon offered some insight to that process. "We knew the colors, the ideas that Cameron was looking for. Cameron's passion and extensive knowledge of underwater photography is where he draws a lot of his inspiration, so we did a lot's of reference on underwater plants and animals to figure out what the biolume nighttime on Pandora would look like.

We spent a lot of time figuring out each individual plant, then put them together to see what different colors would look like combined. We came up with some very interesting plants but once you make a forest out of this, it was a little crazy; it looked like Las Vegas on steroids. We learned that you had to be very subtle with it. If you overdressed every plant you get something that's hard to watch

And how do you light such an environment, with reflections off the plants and transitions through the leaves to make this huge jungle that completely self-shadows, without doing it traditionally with shadow maps which would have been a complete nightmare? "We had to come up with things like, how do we calculate occlusion, how do we encode that in a relatively efficient manner? Those were the challenges," said Stables.

Imagine a character with lights and shadows, each increasing the complexity. Now imagine the same with a jungle of thousands of trees. "We primarily used image-based lighting, high dynamic range images (HDRI), many of which were shot around New Zealand.

We would accent with area lighting, etc., as needed. By being able to efficiently calculate all the shadowing, all the occlusion for a large environment, then use HDRI to put the illumination in, it enabled us to light very big environments very realistically." The next step was how to render. "We used a couple of techniques," said Saindon. "We did spherical harmonics for building in the lighting for all the different assets so we could look up lighting direction on the plants and get occlusions and lighting directions efficiently and quickly."

Another was stochastic pruning in which, for example, a million-polygon tree close to camera is easy to render, but further away it gets smaller in the buckets within RenderMan, and becomes very difficult to render. "So we used stochastic pruning in which we keep the silhouette of the object but we threw away faces as it moved into the distance." Jon Allitt wrote it as a test and worked so efficiently most TD's didn't even realize it was doing a tremendous amount of work for them.

Click for Larger Image Using this method, a million poly tree could drop to 20 or 30 polygons. It's a similar process as LOD (Level of Detail), but with LOD you have to build the individual levels of detail and during the transitional period both heavy and lighter models are in the scene and can be heavier to render.

With stochastic pruning, as long as the model is built in such a way that geometry can be thrown away, it can look at the bounding box and determine what can be discarded, and it just throws geometry away as the bounding box gets smaller.

There were bugs in every shot, enough to fill any jungle, virtual or otherwise. "Cameron asked how many bugs we had, saying ?I only see about 20.' We told them there were 20,000," said Williams, with a smile. "Cameron laughed that he had to have 20,000 bugs to see 20." It was because the bugs were incredibly small, ranging from the size of a wasp down to a mosquito, and would recede into the distance by about 300 feet.

Many were hidden by the plants and the rest were hidden in the dark, so you could only see the ones flying through the god rays. Cameron had them boost the bug count to 60,000 so he could see 60 at a time. Luckily, they rendered quickly.
Click for Larger Image

"The only problem we had with the bugs is every now and then one would fly right into the lens of the camera. Some camera hog would loiter in front of the lens and hurt your stereo space and your perception of the shot." Because of how Weta does their compositing, "painting out stuff is not too easy to do, so we had to fix it in Renders. We didn't render with holdout mattes; we rendered using depth sorting information using deep opacities. The advantage of that is we could render the character again and again, even if we changed the motion, and not have to rerender the jungle. But the disadvantage is we had to carry around extra data sets of distance from the camera and use that to stitch it together. If you ever wanted to paint out a bug, it was really hard to paint out depth information. You could remove the bug but you would still see its ghost in the fog or in the depth of field, all of which keys off the deep opacities."

The camera, informally nicknamed the Steering Wheel or Virtual Camera, was like a steering wheel that had an LCD monitor. It doesn't actually have a camera, it only has motion control data so as Cameron looked through what was equivalent to the viewfinder, he saw Pandora, the Na'vi, the Avatars, in real time and with no lag. It allowed him to treat the process like a live action shoot. The Steering Wheel was created specifically for this film, as was much of the technology, including the practical 3D camera.

The Virtual Art Department (VAD) would come up with an environment for a certain scene, then Cameron would use the Steering Wheel to walk around the environment with his art department crew and point out needed adjustments, like moving a particular tree so he could shoot from a preferred angle. The VAD artists sat on stage with him so they could immediately move the assets on Cameron's request. It allowed him to scout the location of the digital set with the camera using similar methodologies as if it were a live-action shoot, and the equivalent of telling a Greens Department how he wanted to dress out the scene. It was like a live action movie with all the benefits of a CG movie.

"Doing everything in 3D had a big impact on our methodology," said Saindon. Because Avatar is a 3D movie all the fluid sims and explosions had to be in volumetrics, from fire and smoke to water. "Usually we shoot everything; we go to the back lot, shoot FX and slap them in.

In this movie I don't think we used any practical effects, everything we did was done in 3D and rendered. We've pushed the dynamic effects a lot further on this movie than we have in the past," Saindon explained. "We could no longer cheat, we couldn't use actual footage.

"Jim was very smart at the interoccular and convergence. In a wide shot he set it very narrow; in wide shots you don't see a huge amount of 3D. In a close shot, he would set the IO a little wider. He didn't go crazy with the convergence, he didn't try to pull things off the screen. He set your eye where it needed to be for the shot and didn't try to go crazy with the 3D gags. I always felt 3D was a gimmick, I figured if the movie wasn't good enough to hold up in 2D I wouldn't bother. I have to say the 3D that Jim came up with is drastically better than anything I've seen."

I have to agree. When, on the first sortie, they leave the human outpost called Hellsgate and enter the jungle, pilot Trudy Chacon, played by the feisty actor Michelle Rodriguez, comments, "You should see your faces." I am sure I wore the same expression. It makes you wonder which side of the gate heaven and hell is on.

No matter, I'm moving to Pandora. Please forward my mail.

Avatar Official Link

Weta Digital

Wayne Stables, VFX Supervisor

Eric Saindon, VFX Supervisor

Guy Williams, VFX Supervisor

Jon Allitt

Discuss this article on CGTalk

"~ Love conquers all, but if love doesn't do it, try hard work ~."

Face it... Fight it