Implementing the Techniques
Depending on your goals and the limitations of your game, some of the suggestions above will work, and some may not. It all depends on what effects you are trying to achieve, what your content will benefit from, and how your engine is structured to scale across different hardware. However, I hope that it points out that the DirectX 6 bump mapping technique available on several cards coming out this year offers an exciting opportunity for developers to add some really cool effects to their games.
Don’t forget what bump mapping was first developed for: adding detail without adding polygons. This is a boon in cases where the application has to scale across a range of systems, and where using multiple LOD models isn’t an option (e.g., the architecture in levels of some first-person shoot-style games). Both the embossing method and the environment-map bump-mapping approach can be used to add details to brick walls, grooved marble pillars, and riveted steel staircases.
Of course, you have to weigh the benefits of bump mapping (adding less triangles and achieving cool effects) against the drawbacks (writing code paths to detect and use different hardware, plus the additional fill rate that bump mapping requires), to see what makes sense for your application. The good news is that as faster multi-texturing graphics hardware comes to market in the near future, the latter drawback will become less of an issue. It is also worth noting that while multi-texturing performed in hardware tends to cause a performance hit on today’s hardware, the multi-pass approach is even more expensive. This is due to the read-modify-write accesses to the frame buffer, and it’s even more of an issue when it’s performed on older hardware, since older graphics chips typically have lower fill rates than today’s newer chips.
Developers writing to the PC platform deal with systems that vary widely in performance. Fortunately, both the bump mapping approaches described in this article help you scale your titles for various types of hardware without a lot of extra development effort and artwork. You just develop your game so that bump mapping features are switched off when the game detects a slower CPU and graphics card, and switch it on to add detail and perform effects on higher end systems. Bump mapping can make the graphics in your next title, pardon the pun, stand out.
Kim Pallister is a Technical Marketing Engineer and Processor Evangelist with Intel’s Developer Relations Group. He can be reached at [email protected]