Home | Anime | Movies | Soundtracks | Graphic Novels

Mathematics for 3D Game Programming & Computer Graphics
Publisher: Cengage Learning

Before getting into the intricacies of Mathematics for 3D Game Programming & Computer Graphics, I feel I need to explain my own personal level and areas of eduction.

My day job is a programmer for a national advertising company. I typically work on various forms of accounting software used in the day-to-day business of this company. I graduated from LSU with a degree in computer science some five years ago and while I don't use the higher level math that my coursework put me through on a dally basis, I did go through two Calculus classes, one on Differential Equations and one on Numerical Methods. I have also read a couple of books on 3D game engine development and felt, when first getting Mathematics for 3D Game Programming & Computer Graphics, that I would have a good, solid foundation for what this book had to offer.

Let's just say, I'm glad for the knowledge I had going into the book. It definitely wasn't enough to keep me from reading sections several times or from having to work through many of the equations multiple times, but I never felt completely lost or too badly overwhelmed by what the book was teaching me.

First thing's first, this is a math book. While there are code samples and snippets throughout the text (using OpenGL for it's low-level API), you won't come out of Mathematics for 3D Game Programming with a working 3D engine like a couple of other books I've read. Instead, you will find yourself with a strong grasp of the math that lies under the surface of such a program. You will learn about optimization techniques to speed up your processing of the data, as well as quite a few tricks of the trade to prevent some embarrassing graphical issues like shearing, tearing and bad cloth simulation.

This is the Third Edition of Eric Lengyel's Mathematics for 3D Game Programming & Computer Graphics, and there have been a few additions and changes. According to the book's preface, the view frustum section has been added to in order to discuss oblique near plane clipping, more information about shadow casting and the stencil shadow algorithm have been added to Chapter 10. Chapter 14's discussion of the inertia tensor has been extended. The chapter discussing cloth and fluid simulation has been added to as well as faster methods for calculating sine and cosine in the book's last chapter. Since I have not read the previous edition, I can't say how much was data was actually added, but I can say that each of these topics are thoroughly covered.

At the end of each chapter is a summary of the topics taught and the equations presented, as well as a few exercises to try out in order to determine just how strong your grasp of the concepts presented is. I found both of these sections to be good indicators of how well I learned what the book was teaching me, so while they wouldn't be the be-all and end-all if Mathematics for 3D Game Programming & Computer Graphics were used as a textbook in a class, they would definitely help students realize what they need to re-read.

Anyone who has even considered developing a 3D engine or a 3D graphics program can tell you that it all starts with vectors. These collections of points are the building blocks for everything else. Lengyel devotes an entire chapter to this concept and he covers it well. From there, the discussion of vectors becomes matrices and math involving the two, as well as what that all means in a 3D application. These first chapters form the core to everything else taught in the book, and getting a good grasp of these ideas and what the operations performed on them mean to the actual data being manipulated is a must before proceeding onto the slightly higher-level topics.

Once you get past the transforming of the vectors and matrices, Mathematics for 3D Game Programming & Computer Graphics goes into actually handling geometry in 3D space. This chapter not only discusses the different types of shapes you can create with OpenGL, but also how to generate the actual scene that is seen by the camera. This last part primarily deals with the math involved in determining what can and can't be seen, but it is still a must know, especially when similar techniques start showing up in the shadow-generation chapter, Chapter 10.

The book continues on by talking about the actual rendering process with chapters on Lighting and Shading (Chapter 7) as well as Ray Tracing (Chapter 6). The math involved with Ray Tracing deals primarily with following rays from a light source, while the other chapter handles determining how that light reacts to those surfaces. You will find yourself primarily dealing with various forms of polynomial equations, trigonometry normal vectors and texture mapping in these chapters. This topic only grows as the book covers techniques for determining if a polygon is visible and ways to modify the light source to perform interesting visual effects.

From there, the book talks about ways to determine if the polygon count can be reduced in order to make the math less complicated. For instance, if an object is significantly far away from the camera, then you can turn down the resolution of the object you are looking at since many of the details will be lost. This is done by combining multiple polygons and smoothing out the details. Chapter 9 goes through several techniques for doing just this.

Mathematics for 3D Game Programming & Computer Graphics takes a chapter to discuss defining smooth curves in 3D space. This is in part because modern hardware has the ability to do the math necessary to create a convincingly smooth curve, but also because objects like cameras can follow curved paths to make for very smooth actions. Everything from Bezier Curves to B-Splines and NURBS are discussed in this chapter.

At this point, the book breaks away from the strictly graphical-related math and delves into collision detection and basic physics. While these are important to a 3D game engine, they don't deal directly with the visual aspects of that engine, that is, until you realize how much of that information is necessary for the Fluid and Cloth Simulation chapter (15).

The physics topics discussed are fairly entry-level. Formulas for calculating friction, projectile motion and force at an angle are discussed in Chapter 13. After that, Chapter 14 delves into slightly more complicated situations like angular velocity and rigid body motion. While the book doesn't go into fluid motion, the chapter dealing with fluid simulation talks about computationally cheap means for making convincing-looking liquids.

The last chapter of Mathematics for 3D Game Programming & Computer Graphics deals with Linear Systems, Differential Equations and a few optimization techniques that will make some of the math easier.

So, is Mathematics for 3D Game Programming & Computer Graphics a good book? Yes. If you have the inclination and the aptitude for the kind of math necessary for putting together a 3D application, then Mathematics for 3D Game Programming & Computer Graphics acts as both a good learning tool and guide. Like I said, you won't come out of it with an actual 3D engine, but you will have the necessary mathematical ground work to develop one.



-J.R. Nip, GameVortex Communications
AKA Chris Meyer
Related Links:


This site best viewed in Internet Explorer 6 or higher or Firefox.