Iron Man’s suit. Captain America’s shield. The Batmobile. These all could look a lot more realistic thanks to a new algorithm developed by a team of U.S. computer graphics experts.
The researchers, led by Professor Ravi Ramamoorthi at the University of California San Diego, have created a method to improve how computer graphics software reproduces the way light interacts with extremely small details, called glints, on the surface of a wide range of materials, including metallic car paints, metal finishes for electronics and injection-molded plastic finishes.
The method developed by Ramamoorthi and colleagues is 100 times faster than the current state of the art. They are presenting their work this month at SIGGRAPH 2016 in Anaheim, California. The method requires minimal computational resources and can be used in animations. Current methods can only reproduce these so-called glints in stills.
Accurate rendering of a material’s appearance has always been a critical feature of computer graphics, Ramamoorthi said. It has become even more important with the advent of today’s ever-higher display resolutions.
The standard approach to modeling the way surfaces reflect light assumes that the surfaces are smooth at the pixel level. But that’s not the case in the real world for metallic materials as well as fabrics, wood finishes and wood grain, among others. As a result, with current methods, these surfaces will appear noisy, grainy or glittery.
“There is currently no algorithm that can efficiently render the rough appearance of real specular surfaces,” Ramamoorthi said. “This is highly unusual in modern computer graphics, where almost any other scene can be rendered given enough computing power.”
The researchers’ solution was to break down each pixel of an uneven, intricate surface into pieces covered by thousands of light-reflecting points smaller than a pixel, called microfacets. The team then computed the vector that is perpendicular to the surface of the materials for each microfacet, called the point’s normal. The normal is key to figuring out how light reflects off a surface.
For any specific computer-generated scene, the microfacets on a surface reflect light back to the computer’s virtual camera only if its normal is located exactly halfway between the ray from the light source and the light ray that bounces back from the surface. Computer scientists calculated the normals’ distribution within each patch of microfacets. Then they used the distribution to determine which normals where in that halfway position.
The key to the algorithm’s speed is its ability to approximate this normal distribution at each surface location, called a “position-normal distribution.” This enables the algorithm to easily computer the amount of net reflected light with a speed that is orders of magnitude faster than previous methods. Using a distribution rather than trying to calculate how light interacts with every single microfacet resulted in considerable time and computer power savings.