• On MovieTome: Concept art of Iron Man's super-villain!
August 16, 2007 5:01 AM PDT

Post-Siggraph book review: "GPU Gems 3"

by Peter Glaskowsky
  • Font size
  • Print
  • Post a comment

As I described in my recent blog entries about Siggraph 2007, there's a lot of cool stuff going on in hardware and software development for graphics processors (GPUs).

GPUs are programmable devices like the more familiar CPUs, but the programing model is very different. A CPU core implements a simple linear model; programs consist of one instruction after another, though a good CPU scans the instruction stream for opportunities to execute a few instructions in parallel. A busy GPU, on the other hand, always does hundreds of things at once. CPUs aren't good at running GPU code, and vice-versa.

Most new computer-science graduates have a good understanding of CPU programming, but GPU programming is a very different skill that is usually acquired after a software engineer enters the workforce. And since GPU designs change dramatically every year or two, and different vendors build their chips differently, GPU programming skills must be constantly relearned.

All GPU vendors offer training for the engineers who program their chips, and this training comes in many forms. NVIDIA's developer-training program produces the "GPU Gems" series of books. The title is an homage to the "Graphics Gems" series of the early 1990s, which documented the rapid progress of the computer-graphics industry during that time. The Graphics Gems books are still in print and still indispensible for graphics software developers.

GPU Gems 3, edited by Hubert Nguyen and published by Addison-Wesley, is the latest in the new series. It's full of programming examples that are specific to NVIDIA's software-development environment, but the principles behind the examples can also be applied to AMD graphics chips.

The techniques described in this book, combined with the latest graphics chips from AMD or NVIDIA, can produce amazing results. Like the other GPU Gems volumes, GPU Gems 3 is printed in full color so readers can see exactly what they're going to get. Chapter 14, titled "Advanced Techniques for Realistic Real-Time Skin Rendering," also contributed the cover image: a truly photorealistic rendering of a human face.

This image can be rendered in real time on a state-of-the-art graphics chip-- but just barely, so it'll be a while before the necessary techniques can be incorporated into games.

Chapter 14 also illustrates the key to achieving these results. In the real world, a scene like this cover image would be "rendered" using about 10^20 (100 quintillion) photons interacting with an even larger number of atoms in the subject's face before a tiny fraction of them end up in the viewer's eyes.

In a GPU, it's impossible to model the behavior of all of those photons. A different type of rendering known as ray tracing works this way, but is too slow to produce good results in real time.

Instead, GPU programming consists of one drastic shortcut after another. Objects start out as roughly faceted collections of polygons. Surface appearance is defined by 2D artwork wrapped around the object. The perspective errors that would otherwise appear in this artwork are smoothed out by other tricks. Lighting effects, such as the subsurface scattering that real photons would undergo, are faked by another series of tricks.

The process of 3D rendering mimics the evolution of 3D rendering-- a progression of tricks creating images by successive approximation.

Expertise in GPU programming consists of achieving the best results within the performance limits of the hardware available. In practical terms, this means that the more shortcuts you use, the better your results. A new method that yields 90% of the visual quality from 50% of the instructions means a second layer of refinements can be applied, producing better results than the full-quality version of the first effect.

Hence the focus of the GPU Gems books. They're essential for anyone working in computer graphics, and fascinating reading for those who can handle the complicated math and want to know how these amazing results are achieved.

Peter N. Glaskowsky is a computer architect in Silicon Valley and a technology analyst for the Envisioneering Group. He has designed chip- and board-level products in the defense and computer industries, managed design teams, and served as editor in chief of the industry newsletter "Microprocessor Report." He is a member of the CNET Blog Network and is not an employee of CNET. Disclosure.
Recent posts from Speeds and Feeds
So long, and thanks for all the hits
Wrapping up Speeds and Feeds, part 5: Access
Wrapping up Speeds and Feeds, part 4: Security
Wrapping up Speeds and Feeds, part 3: Ruggedness
Wrapping up Speeds and Feeds, part 2: Reliability
Wrapping up Speeds and Feeds, part 1: Efficiency
Tilera's balancing act: 100 cores vs. market realities
The Gizmo Report: WikiReader--simple, singular
advertisement

The browser battles go on and on

roundup From Firefox to IE and from Chrome to Opera and Safari, there's no sitting still for browser makers looking to keep their products fresh and competitive.

3G wireless still holds promise

The next generation of 4G wireless may get all the headlines, but advanced 3G technology will likely dominate services for the next few years.

advertisement

About Speeds and Feeds

Silicon Valley-based computer architect and chip analyst Peter N. Glaskowsky attends a variety of industry conferences throughout the year to meet with industry thought leaders and dig into the future of computing technology. In Speeds and Feeds, he analyzes trends in system architecture and interface design, as well as market and political pressures surrounding those trends. He is a member of the CNET Blog Network and is not an employee of CNET. Disclosure.

Add this feed to your online news reader

Speeds and Feeds topics

advertisement
advertisement

Inside CNET News

Scroll Left Scroll Right