A pretty book from a distance
26 Jul 2007 @ amazon.com
I bought this book because, standing in the bookstore thumbing through it, I thought that it seemed like a decent guide to modern GPU effects. The nice high-gloss pages have lots of nice colorful images, and there is a lot of code as well. However, when you actually try to learn something from reading this book, you may hit a roadblock fairly quickly. The problem is that there is precious little space devoted to explaining many of the shaders, and much of that space spells out only the totally obvious anyway, which leaves one doubly frustrated.
As an example, in the bump mapping section, there is a discussion on per fragment L and H computation as a means to getting higher quality results. The first thing to note is the declaration ’v2f IN’. It’s noteworthy because ’v2f’ is not defined anywhere! Thumbing backwards through the book, it becomes clear that this is some sort of structure for passing data from the vertex to fragment shaders, but not having it defined means you’re scratching your head over what exactly is defined. Next, there is this bit of code:
// transform normal to world space
normal.xyz=normalize(normal.x*IN.tangent-normal.y*IN.binormal+normal.z*IN.normal);
WTF? One of the most interesting bits of the whole thing (bringing the normal into world space, as opposed to bringing the light and half angle variables into surface local space), and there is *absolutely no* explanation of why it’s done this way or how that tight little snippet of code was derived. None. It’s really unbelievable.
As another example, the parallax mapping code has this little snippet
// parallax code
...
float height = tex2D(rmtex,uv).w * 0.06 - 0.03;
...
Once again, WTF? What’s with the magic numbers? Of course, once you understand what they mean, it’s obvious, but then again, if things like this were obvious, you wouldn’t be buying a book on the subject now would you?
The book is not garbage, it just needs to be expanded. It’s pretty much impossible to actually learn anything if a particular topic has little more than a title and a few shader fragments thrown at you. I mean, don’t get me wrong, writing a book like that would certainly be fun, but it would be of little use to anyone else.
diverse game topics
08 Jun 2006 @ amazon.com
A trifle surprising that no one else has already reviewed this book. Watt and Policarpo give a nice and current description of the advanced graphics. That are deployed in games. The narrative is a good combination of first principles physics and code examples and screen captures of rendered images. Of course, for motion, the images do this no justice. Still, even the static images should be inspiring to many readers.
Many topics are included. Like how to simulate particle systems. Basically, by discretising Newton’s Equations of motion for a set of objects. This has been done for decades in science and engineering. Neat how it is now feasible for gaming. Though one difference is that in gaming, the rendering of the objects has high importance. Whereas for research systems, this was often a minor consideration.
Character animation is another well covered topic. Shows how to relieve the programmer from having to tediously code the motion of a human character in the game. With sophisticated skeletal frameworks that can be animated. An excursion into linear algebra and matrices.