Avatar's GPU Connection
“Oops, he did it again….” James Cameron’s Avatar burned holes in most of our wallets as it blazed its way to the top of the heap of highest-grossing films ever, knocking Titanic (also by Cameron) off the pedestal it sat on for nearly 13 years. Oh, and Avatar has also garnered nominations for 33 (and counting) film industry accolades, including nine Academy Awards.
And perhaps no other movie—at least since Star Wars—has had as many people walking out of the theaters wondering to themselves, “How did they do that?” The answer is far more complex than we have space to cover adequately in this entire issue, let alone a few pages. However, one of the many secrets behind Cameron’s ability to put the CG world of Pandora on the big screen in such photo-realistic, believable detail is the close partnership between Peter Jackson’s Weta Digital visual-effects company and NVIDIA.
New Zealand–based Weta Digital had been using NVIDIA hardware in its visual effects pipeline, and the company currently uses both Quadro and Tesla GPUs to render effects for films.
And you better believe that every ounce of the parallel-processing horsepower in these high-performance GPU platforms was brought to bear on the unique challenges presented by Cameron’s vision for Avatar. Indeed, “unique” is an understatement: Weta Digital was tasked with creating sequences for the film that including as many as 800 fully CG characters in highly stylized digital environs, making Avatar the most computationally intensive project Weta Digital has worked on to date.
The complexity of Avatar motivated us to think about rendering differently,” explains Sebastian Sylwan, Weta’s head of research and development. “We do our final beauty-pass renders with RenderMan, but to optimize artistic iterations on Avatar's huge data sets, we moved the bulk of the calculation to a pre-computation step. The issues we needed to solve weren’t as much about rendering as they were about high-performance computing, and we realized that using the massively parallel power of a GPU to solve problems is NVIDIA’s expertise.”

In March of 2009, Weta Digital Rendering Research Lead, Luca Fascione, Weta Digital Chief Technology Officer Paul Ryan, and Jacopo Pantaleoni, an NVIDIA research senior architect, discussed what Weta was up against. “Paul let me know that for the first time in the history of CG visual effects, the number of polygons required was going to be measured in billions rather than in millions,” says Pantaleoni. “Luca described their unique approach to lighting, and their need for a scalable solution to ray trace the entire, amazingly complex world [of Pandora].”
Over the course of several months, Weta and NVIDIA worked to co-develop a completely new ray-tracing engine (dubbed PantaRay) to dramatically increase the power and speed of Weta’s visual effects pipeline.
PantaRay was designed specifically to accelerate the pre-computation of the scene-occlusion information that was used throughout Weta’s rendering pipeline, to allow for very fast recomputation of image-based lighting. NVIDIA ported PantaRay from a CPU-based server to a CUDA-based GPU server architecture running Tesla S1070 GPUs, which resulted in a 25x speed increase.
Essentially, this approach enabled Weta to render more complex scenes in less time for Avatar, while using less memory and fewer processors. Weta artists were able to create new iterations of scenes more quickly, and make more changes to scenes—ultimately achieving much higher quality, photorealistic results.
A shot that exemplifies the advantages Weta achieved with PantaRay can be seen in the movie’s promotional trailer. The shot from a helicopter looking over a huge flock of hundreds of purple creatures flying over water, with a massive tree-covered mountain in the background was pre-computed in just a day and a half using PantaRay. “That shot would have taken a week with previous methods,” says Weta’s Fascione. “The fact that it was so much faster with PantaRay meant that we were able to create a much more beautiful shot—you can see fine detail on every bush, every leaf. The color separation between distances is clean and clear. The computational power of PantaRay made the difference.”
Weta Digital plans to incorporate PantaRay running on NVIDIA Tesla GPUs into its pipeline for the upcoming Steven Spielberg/Peter Jackson film, Tintin, as well as exploring new ways in which PantaRay and GPUs can further accelerate its overall visual effects pipeline.

