Once again Pixar is redefining what is possible in animated movies. Cars 2 boasts the most advanced computer animation ever created. It may look similar to the first Cars movie from a distance, but dig deeper and you will find that they are not even close. Five years is an eternity in modern animation.
The legendary and ever-changing networked computer monster that Pixar uses to render the final movie frames is called the render farm, and it's been given a huge upgrade for this movie - they tripled the number of processors and memory, and the in-house Renderman software has been substantially modernized as well to cope with new physics models for wave motion and reflection processing.
There are many ocean scenes in the new Cars movie so they implemented a new mathematical wave model that creates far more realistic water, just like you'd see on a real ocean, with sharp edges and micro-breaks and tiny waves on top of larger ones, all with pitch-perfect lighting. The virtual paint on the cars in the movie now sports embedded metallic particles like real paint, each one catching the light and creating depth. And the fog around the many lights of Tokyo at night is tinted by their color. This stuff has never been done before.
Ahh but all of this beauty doesn't come cheap, or easy. The render farm is composed mostly of "Render Blade" servers with multicore Intel Xeon processors running a custom version of the Linux OS. The current configuration contains 12,500 processors, huge amounts of RAM, a state-of-the-art cross-linked network backbone, and dozens of file servers and associated support equipment.
That's a lot of computer horsepower. But just to give you an idea of the staggering array of calculations that must be done to render complex scenes, the average time to render a final frame in Cars 2 is 11.5 hours. Yep, it takes half a day to render one frame of this movie on average. And the more complicated frames involving heavy reflections and fog and water dynamics took up to 90 hours each. That's 3 3/4 days! For one frame! And there are 24 frames in one second of a movie. Pixar is very very careful to do lots of pre-rendering and testing to ensure they only have to render the final frames once.
So what's sucking up all the processor time in these frames? Well, there are the various calculations that involve the solid models that make up the characters and the mapping of textures onto them, etc. But mostly, the vast majority actually, is consumed by something called ray tracing. Ray tracing is just about the most time-consuming thing you can ask a computer to do.
In the real world, the relationship between light and object is a very complicated one. Light of a certain color and intensity is emitted from some source (the sun, a flashlight, etc), travels through air or glass or water, striking surfaces along the way, occasionally hitting a solid or semi-solid surface. Some of that light bounces off the surface, and some is absorbed by it. How much is absorbed depends on the surface material, the angle of the light, and lots more things. The light that is reflected may scatter in many directions. Its color is affected by the color of the surface (in fact, color is just light reflecting at a specific frequency). Eventually the light will reach a point where most of its energy has been absorbed and it will fall below our visual threshold.
Now, imagine keeping track of a beam of light and its effects as it goes on its journey from emitter to fizzling out. THAT is what ray tracing does. The computer calculates the entire journey of thousands or millions of beams of emitted light as they bounce off surfaces and through glass and air and water until eventually all the beams reach near-zero energy and become invisible to us. During this journey the light may bounce off hundreds or thousands of surfaces, it may split and change color, it may cross the path of other beams of light and interact with them. It may go through fog or water or colored glass many times. It is not an exaggeration to say that this symphony of interaction strains the limits of human comprehension. It is an enormous mountain of trillions upon trillions of calculations. That is why a single frame of Cars 2 can take a 12,500 processor supercomputer 90 hours to calculate.
The fact that the end result is so stunningly beautiful really gives me a new sense of admiration for what people are capable of doing.
Here's the basic sequence Pixar uses in the creation of a movie frame. It's very simplified and omits the process for animating a scene across multiple frames:
Basic scene composition is sketched in storyboard form. |
Character and camera staging using rough models. Note the tire orientation markers. |
Primary and secondary character keyframe animation added. |
Baseline colors and textures added. Remove markers. Prep for final render. |
Final render with ray tracing, fog effects, and lens flare. |
"In computer graphics, ray tracing is a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects. The technique is capable of producing a very high degree of visual realism, usually higher than that of typical scanline rendering methods, but at a greater computational cost. Ray tracing is capable of simulating a wide variety of optical effects, such as reflection and refraction, scattering, and chromatic aberration." - Wikipedia
No comments:
Post a Comment