Adaptive Refinement Promises Faster Rendering on Graphics Chips

Henrik Wann Jensen Named to List of "Brilliant 10" in Popular Science
Henrik Wann Jensen

10.04.04 - On the heels of winning an Academy Award earlier this year for his groundbreaking work in computer graphics, Computer Science and Engineering professor Henrik Wann Jensen has now been honored by Popular Science. In its October 2004 issue, the magazine names Jensen to its list of the "Brilliant 10" - the best and the brightest among young scientists. The 2004 list is the third since the publication began compiling its annual honor roll.
[More]

October 4, 2004 -- Rendering realistic, computer-generated scenes can be a time-consuming exercise even on the most powerful computers. But computer scientists at the University of California, San Diego have developed a technique that accelerates certain graphics computations by two or three orders of magnitude, at very little cost. "It's really simple and requires only a few extra lines of code," says Craig Donner, a fourth-year Ph.D. candidate in the Computer Science and Engineering department of the Jacobs School of Engineering. "It was just an idea that nobody had thought of or implemented."


That idea applies adaptive refinement to graphics chips, and was presented recently at SIGGRAPH, the leading academic conference for computer graphics. In a technical sketch and companion article, Donner and professor Henrik Wann Jensen detailed the technique for rendering a scene by tiling the screen and disregarding those tiles that are inactive. The result: significant speedups, depending on tile size and the algorithm used.


"It was three or four times faster as an overall speedup," explains Jensen, who is affiliated with the California Institute for Telecommunications and Information Technology [Calit²]. "This technique provides significant speedups by exploiting computational similarity, coherence and locality." (For his work in computer graphics, Jensen has just been named one of only ten young scientists in Popular Science magazine's annual "Brilliant 10" list; see companion article on that honor.)


Adaptive refinement is not new, but the UCSD team is the first to apply it to graphics processing units (GPUs), and specifically to the fragment processor, one of two programmable areas on a GPU. The project grew out of Jensen and Donner's work with colleagues from Stanford University on photon mapping with graphics processors.


Photon mapping simulates the indirect illumination of a scene fairly efficiently, and typically has been done on powerful workstations. But driven by the demands of gamers, chip designers have dramatically improved the power and speed of GPUs. "They've gone from barely being able to run the simple 2D graphics of your desktop graphical interface, to being able to run these really complicated games that you see coming out now at full frame rates, 60 frames per second," says Donner. "It's pretty amazing."


Photon mapping uses multiple passes, and on later passes, the active areas become sparse, i.e., only part of the pixels on the screen are active, and over time some will no longer be active. "This large geometry that most people are using for their computations is fairly wasteful," explains Donner. He and Jensen concluded that it might not be necessary to do photon mapping on the entire image. "We had to perform this photon mapping computation only on specific parts of the image we were generating," recalls Jensen. "It dawned on us that you really only need to operate on part of the screen at a time."


Doing computation on a GPU typically involves rasterizing a piece of geometry on to the screen so it covers the entire screen, and then doing work on every single pixel in that image. "Yet not every pixel is doing useful work so you are wasting the resources of the hardware," claims Donner. "So what we settled on doing is actually tiling the screen and then culling away tiles that are no longer performing useful computations."


Craig Donner Craig Donner Craig Donner
Ph.D. candidate Craig Donner introduces the concept of adaptive refinement in computer graphics. Length: 3:37
[Video]

Donner talks about the tiling technique used to speed up multi-pass 'sparse' graphics computations. Length: 3:10 [Video]

The graduate student explains how he derived the optimum number of pixels for adaptive refinement. Length: 2:32
[Video]



To figure out which tiles are inactive, the researchers took advantage of an existing feature of most recent graphics processors that permits 'occlusion queries'-asking for which tiles are active and have been drawn since the last query.



The researchers tested their technique on both photon mapping (which is very complicated, requiring hundreds of thousands of lines of code) as well as on a simple graphics algorithm known as a Mandelbrot Set (pictured). In both cases, adaptive refinement improved performance, especially in the later stages of each computation. For the easier computation, rendering was over three times faster. But with photon mapping, it was almost 300 times faster. "The more complex the computation, the more work you'e wasting on fragments that aren't doing anything useful," explains Donner. "So the more complex your calculation, the more you gain with this method."Ph.D. candidate Craig Donner introduces the concept of adaptive refinement in computer graphics. Length: 3:37



The optimal tile size in both scenarios was 16-by-16 pixels, but they say it depends on the algorithm itself. "Slightly larger tiles work better with smaller fragment programs that finish quickly," says Jensen, "while smaller tiles may be better suited to complex algorithms with long fragment programs." They also found that the best tile size is from 8 to 32 pixels wide on current hardware, and subdividing gives the best results when 40 to 60 percent of the fragments are active



According to the researchers, adaptive refinement should also be applicable to all sorts of other computations now done on graphics hardware.



In 2002, Craig Donner was the primary programmer on "Smoke and Mirrors," an interactive, multimedia installation funded in part by the institute and designed by UCSD visual arts professor Sheldon Brown, who is Calit²'s New Media Arts layer leader at the university, and director of the Center for Research in Computing and the Arts (CRCA). Donner also collaborated with Brown and others on the new visualizations of the Calit² building, now under contruction. The interactive 3-D model and multimedia visualizations were created by students Ben Maggos and Matt Hope, while the 3-D environment was controlled with a custom built 'scripter' developed by Donner.


Related Links

"Faster GPU Computations Using Adaptive Refinement" http://graphics.ucsd.edu/papers/adaptive/
Henrik Wann Jensen http://graphics.ucsd.edu/~henrik/
Craig Donner http://graphics.ucsd.edu/~cdonner/