• On TV.com: Sexy summer bodies photo gallery
August 16, 2007 5:01 AM PDT

Post-Siggraph book review: "GPU Gems 3"

by Peter Glaskowsky

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 technology analyst for The Envisioneering Group. He is a member of the CNET Blog Network, and is not an employee of CNET. Disclosure.
Recent posts from Speeds and feeds
Jerry Lewis and the elusive Video Assist patent
GPUs and the new 'digital divide'
Apple's future in mobile computing
Digital cinema is looking 'Up'
Want it? Make it, DIYers
iPhone not sweet on 'neat'
Living the Star Trek life
Early analysis of Amazon's Kindle DX: E-news
advertisement

Making sense of Windows 7 upgrades

faq The basics and the fine print on Microsoft's options for those eyeing the next operating system from Redmond.
• Full Windows 7 coverage

Road Trip 2009: Big Sky Country

CNET News reporter Daniel Terdiman takes his car full of gadgets to the Rockies and the Great Plains in search of tech, science, nature, and more.
• America's Fortress: Cheyenne Mountain

About Speeds and feeds

Peter N. Glaskowsky is a computer architect in Silicon Valley and works part-time as a technology analyst for The Envisioneering Group. 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