Main Site Links Resources Tutorials
News VB Gaming Code Downloads DirectX 7
Contact Webmaster VB Programming Product Reviews DirectX 8
  General Multimedia Articles DirectX 9
      Miscellaneous

Real-Time Rendering Tricks and Techniques in DirectX
Author:
Kelly Dempski
Publisher: Premier Press
ISBN: 1-931841-27-6
Purchasing: [Amazon.Com] - RRP US$59.99
Reviewed: 28th May 2002

Front Cover Shot:

Overview

Straight away you can tell that this book is one for graphics programmers, and the more experienced ones at that. "Tricks and Techniques" indicates that there are a lot of different parts to the book - and not one of the books that takes you from zero to expert in 900 pages.

Anyone who's done much D3D8 programming already will be aware that once you've learnt the basics - initialization, rendering and the mathematical/technical language to go with it - you're pretty much on your own: you have the paint, paint-brush and a canvas, what you draw is entirely up to you. It is books like this and the Game Programming Gems series (reviewed here and here) that allow you to get bite-size information on cool new techniques that advance your graphics engine one-step beyond that of a beginner.

A Full Meal

This book works well as a reference book of individual tricks and techniques, as do the Game Programming Gems books, but it is not limited to being just a long list of chapters on different tricks and techniques. The book has a start, and it has a finish - the idea being that you read it from cover to cover, and it will progressively get harder and harder, whilst teaching you more and more about real-time rendering. Once you've read through the whole book and you understand most of the key areas (such as pixel and vertex shaders) you can then go back and use it as a reference archive.

Of the 9 books in the Premier Press Game Development series, this one has the most "parts" to it - 7 in total, with a whopping 40 chapters. Each chapter tends to cover a new technique, or advance upon a previous one, and each part tends to address a new area. Thus it works that once you're familiar with the very basics you can pick a "part" and then read the 5 (or so) chapters it contains to become a real expert in that field. The 7 parts are, in order, these:

1. First Things First - History, math (vector and matrix) refreshers and lighting theory
2. Building The Sandbox - creating the framework source code used throughout the book
3. Let The Rendering Begin - Basic D3D rendering without many clever parts
4. Shaders - An introduction into the huge topic that is D3D8 shaders
5. Vertex Shader Techniques - an in depth coverage of vertex shading
6. Pixel Shader Techniques - Lots of clever tricks and techniques for pixel shading
7. Other Useful Techniques - literally that! Several techniques that don't fit into the previous sections

Hardware Specific Development

The very nature of Direct3D programming is that it continues to push the performance and feature-sets of all the hardware on the market. To really appreciate programming in any version of Direct3D it has been necessary to have a graphics card capable of all the latest features. This is particularly true of Direct3D8 with the inclusion of shader technology - which cant be used at all on incompatible hardware.

In order for anyone to even consider buying a book of this type the author needed to cover everything up to the raw bleeding-edge of graphics programming in Direct3D8. This is exactly what happens, but for the readers it means that you really need to have the 3D hardware to test/develop these programs on if you are to fully appreciate this book. Vertex shaders are possible in software, so that's not a huge problem; however, pixel shading is not possible in software so you HAVE TO have the hardware. If you don't have the hardware there will be several 100 pages in this book that aren't going to be very useful (short of background reading) to you.

Don't let this put you off - there is still a very good coverage of "non-shader" specific tricks and techniques, most of which will work just fine if you've got a half-decent graphics card (my GeForce 256 was good enough for all but the pixel shader demo's). If you buy this book now and don't already have a pixel-shader compatable 3D card, it may well tip the balance and make you willing to part with the cash :)

Having said this, most of the shader code is left at version 1.1 (D3D8.1 supports 1.0 to 1.4) with only a limited mention of 1.2, 1.3 and 1.4. whilst this doesn't seem to affect the content presented, it may well not show the full potential of the current top-of-the-line cards (Radeon 8500 for example).

Monkey see, Monkey do

The new shader technology exposed in Direct3D8 is very advanced - I'd go as far as saying it's one of the most complicated areas of graphics-programming around at the moment. Therefore learning it is a fairly uphill struggle.

If you aren't already aware, shader "scripts" are very similiar to assembly-level programming, and looks pretty cryptic at the best of times, with hundreds of registers and commands to learn and use. You could probably learn them all just by staring at a long list for several hours, but that's definitely not my preferred way of learning. Luckily for us, nor does the author - after the initial background theory and explanation of the key instructions, it's entirely a case of learning by example. This I have to commend the author for. For example, there are 13 chapters in part 5 ("Vertex Shader Techniques"), starting with a relatively simple chapter on how to use them with meshes, working up to 3 different methods of casting shadows (which are pretty complicated). The same goes with the pixel shading chapters, although there are considerably less chapters in this section - only 3.

The CD as a Resource

As with most books in the premier-press series, a CD is included with all the source code and media files required throughout the book. This isn't anything hugely special, very few books (for programming) come without a CD of source-code these days. 

What separates this from the competition is the bonus programs on the CD. As far as programming is concerned, we get 3 bonuses - the DirectX 8.1 SDK, the NVidia effects browser and a selection of ATI white-papers and presentations. If you don't already have it, the 8.1 SDK is essential, the NVidia effects browser makes for a useful tool (particularly if you have an NVidia card). It's also worth spending some time reading the ATI papers and presentations - they don't always make for light reading, but are crammed with useful cutting-edge information.

We also get a demo of Truespace 5, a fine 3D graphics package, and VirtualDub Video Capture Program, which may be of use to some people - but isn't really mentioned in the book, and probably not hugely useful for any of the source code/samples.

In Conclusion

If you are serious about your graphics programming, then this is a good book for you to own. Particularly if you are interested in the cutting-edge shader technology, where this book really comes into its own. Hopefully future versions of pixel/vertex shaders in DirectX 9/10/11 won't make the tricks and techniques presented here completly redundant, if past-history is anything to go by, you'll still be able to use these shader scripts in future versions without much hassle.

Good Things Bad Things
• Very good as a learning aid and a reference source. • Large areas made redundant if you don't have the hardware
• Well written, with a clear breakdown of source code / shader scripts. • May well overlap with "Special Effects Game Programming With DirectX" (reviewed here)
• Good balance of background/theory and practical/applied code. • Shader scripts often limited to version 1.1, with little mention of the absolute-latest version(s).
• Good General structure and design  
• Good content for those not interested in shader-technology  

 

DirectX 4 VB © 2000 Jack Hoxley. All rights reserved.
Reproduction of this site and it's contents, in whole or in part, is prohibited,
except where explicitly stated otherwise.
Design by Mateo
Contact Webmaster