How Bump Mapping Works Print E-mail
Written by Tuan "Solace" Nguyen
Saturday, June 10, 2000
Article Index
How Bump Mapping Works
Limitations
Advantages of EMBM
Per Pixel Shading

Per-Pixel Shading

With the release of NVIDIA's GeForce 2, another method of bump mapping is now available for our PCs. They call it per-pixel shading, and it can create visual nirvana.

What is per-pixel shading? It's a method of applying special rendering effects... per pixel. It allows material and real world effects to be applied individually to a pixel for more accuracy and intensity. Per-pixel shading will redefine the visual look and feel of imagery for PC graphics. Per-pixel shading has long been used in film production to create a more realistic and lifelike appearance for computer generated imagery. If you've seen Toy Story, you'll definitely remember Buzz Lightyear. Remember the translucent reflection on Buzz's helmet? How the environment and light streaks reflected off the glass but also let the image underneath show through? That was done with per-pixel shading. Until now, it wasn't practical to use per-pixel shading on a PC because of the intense power and processing requirements needed. Sure, you could have done that in 3D Studio but could you have done it in real-time? Could the effect be applied to an entire frame at high resolution in 1/60th of a second? Not until now. 

Per-pixel shading is useful for simulating natural phenomena and accurate surface attributes such as fur, cloth, metals, glass, rock, and other highly detailed surfaces.

Traditionally, effects were done on an entire triangle and sometimes an entire texture using a technique called interpolation. Special effects were done using calculations based on the vertices of the triangle and interpolating the entire area from the vertices. The end result is a generalized visual appearance… like an estimate or approximation of the final image. The benefit of using interpolation is it is fast to apply. But, the downside to it is that with large triangles, the resulting image contains artifacts, which degrades overall image accuracy and quality.

Vertex Lighting:


Per-Pixel Lighting:




Using per-pixel shading, effects and calculations are applied to individual pixels. Since the triangle will be composed of many pixels, the resulting image is highly accurate in representing what the image was intended to be. Let's assume that a generic triangle is drawn together (including its area) using 100 pixels. Now, we also have a effect pallet of 10 effects. Each pixel then, can accept any one of the ten that are available. That's an outcome of 10,000 different possible effects just for that one triangle. If interpolation was used, then the effect is fixed using that one out of ten effects and generalized across the entire triangle. Below is a visual comparison between interpolation and per-pixel shading.



Notice how the sphere and ring look extremely complex? In actuality, both are very simple and do not contain radically different geometric differences. However, the dents and grooves are vastly superior to previous forms of bump mapping and contain a extremely high level if clarity and sharpness.

NVIDIA's GeForce2 GTS supports per-pixel diffuse, specular, spot, and point lighting. The ability is accessed through Dot Product 3 commands in DirectX and is accessed through NVIDIA's register combining extensions in OpenGL. Per-pixel lighting can be used to create dramatic per-pixel bump-mapping effects without extra geometry, such as in the center candle below.



Conclusion

These are demanding times, and as gamers, we are more demanding than even the games we play. We demand the utmost in visual quality as well as game play quality. With PC graphics technology increasing every six months, the only way we're all headed is in the right direction.

Currently, the most promising forms of bump mapping are Environment Mapped and Per-Pixel Shading. Are both out there to kill T&L? No, both are here to supplement and increase visual detail along with T&L's geometry capabilities. For physical detail, mesh detail, and object geometry detail, T&L will be there ready to render. For surface detail such as skin, pours, roughness and geometry lighting effects, bump mapping will be there.

The future of graphics looks very bright indeed. And there are plenty of technologies still yet to arrive. But rest assured that when they do arrive, we will be here.

Until next time…

 

 

Comments (0)Add Comment

Write comment

busy