3D Game Engine Design
Posted 22 March 2003 - 02:50 AM
August 10, 2002
Written by David H. Eberly Hardcover
561 pages Book & CD-ROM 1st edition (September 2000)
Morgan Kaufmann Publishers
So you know OpenGL and you want to write your own 3D game engine? Then this book is for you; more or less. I have been working on my own game engine while learning more advanced OpenGL in the process and found this book to be a great help. However, it is not a complete guide and other supporting texts will be necessary in order to fully dive into the world of 3D graphics. In a nutshell, the book contains two important topics for working with 3D: the structure of a 3D engine and the 3D equations that need to be implemented.
Each chapter in the book details a new concept for the engine. The second chapter is probably the most useful for the majority of us. It has a lot of information on 3D geometry and its application in a game engine. The book goes on to introduce the process of creating an efficient scene including how to use culling and clipping (removing objects from the rendering queue that are not in the scene in order to speed up rendering). It also covers "picking" (mouse selection within a 3D environment), collision detection and bounce. Any developer who has written or tried to write a 3D game engine may find the chapter on collision detection worth the price of the book alone.
After these, the chapters become very advanced and may not be useful for all game engines. The chapter on curves was an interesting read but was far out of my league. Other chapters covered surfaces (including rounded surfaces); dynamic objects (moving objects); bones within a character; changing the level of detail as an object moves further from the camera; and working with terrain. I found the latter to be extremely interesting; it gave some very useful equations for creating landscapes that, when further from the camera, began to drop polygons but still retained the general look. Around chapter twelve, the chapters started covering ideas that seemed very abstract and did not make a whole lot of sense to me. The final chapter provides some good examples of special effects such as lens flares and particle systems.
Although reading theory and application of 3D game engines is all fine and good, what I was really looking for in this book were the equations. How do you know if a line (defined by two points) is intersecting a plane (defined by three points)? This book will tell you exactly how to do it. It does not just do points, lines and planes though, it also discusses spheres, ellipses, capsules and many other mathematical objects. In addition, the author covers polygon reduction, with the specific example of how to take a two-hundred polygon object and reduce it to just twenty polygons. Equations like these are priceless when it comes to coding a game engine. However, they are not explained in the book with source code examples but by using matrix and vector algebra. Luckily the book includes a CD which has nearly every equation discussed in the book implemented in a C++ source file.
Unfortunately, the book is written for an audience of people who have a basic understanding of vector and matrix algebra, linear algebra, multivariate calculus, and data structures. Depending on your mathematics background, you may find some chapters too advanced or, alternatively, just right. Fortunately, the source code goes a long way in helping "mathematically-challenged" programmers to include certain features in their engine without necessarily understanding why they work.
I found the title of the book slightly misleading. Programmers may purchase the book thinking that it will step them through the process of creating a feature-rich game engine but that is not quite what it does. This book helps you through the tougher aspects of creating a game engine (such as the mathematics) but it does not include anything that discusses in detail certain aspects like realistic physics (character movement, realistic terrain for example) or the simplifications that can be made to optimise a game/opengl/downloads.html">3D API on the Macintosh platform, many Mac game developers are looking for documentation which uses it to help them with their projects. However, you should be aware that this book is not a guide to OpenGL. In fact, it only discusses OpenGL very briefly. So my advice to beginner OpenGL programmers is use this text along with an OpenGL specific guide and also download the various tutorials at NeHe.gamedev.net.
With Mac OS X and Cocoa on developers' minds, I expect to see more books in the future with the word "Mac" somewhere on the cover but many of the titles available today are targeted at Windows developers. In the case of this book, the publisher, rather annoyingly, printed that the included CD-ROM was for use on Windows and Linux machines. As a Mac enthusiast, I was slightly turned off by the comment but from what I have seen of the source code on the CD, Mac programmers should have no problems using it. In addition to forgetting the Mac platform, a quick review of the CD-ROM's license gave me pause, which was a bit too restrictive in my opinion, so if you plan on using the code I recommend you read it carefully to avoid any legal problems.
Overall, the author shows a deep understanding for the material that he covers in the text. Unfortunately that does not mean you will too. That said, this book is a must have for anyone interested in developing their own professional quality 3D game engine, even if you cannot understand it all. Not only does it cover the basics but it also discusses some of the technologies that will push the game consoles of tomorrow (e.g. Nintendo's GameCube and Microsoft's X-Box).
In conclusion, if you are thinking of writing your own 3D game engine then I would begin with downloading the tutorials from NeHe.gamedev.net first and then, once you have a solid understanding of OpenGL, pick up this book.
Highlights of topics covered:
Geometrical transformations and coordinate systems
Quaternions and Euler angles
Distance methods for a variety of shapes
Introduction to the graphics pipeline
Model and world coordinates
Projecting perspective and Camera models
Efficiency issues for clipping and lighting
Skinning Techniques for generating game terrain
Character animation, using keyframe animation and inverse kinematics
Collision detection for static and dynamic graphical objects
Geometrical level of detail considerations
SFX: lens flare, bump mapping, volumetric fogging, projected light and shadows, particle systems, morphing techniques
C++ language features for effective object-oriented design
Posted 22 March 2003 - 04:34 PM
Posted 22 March 2003 - 10:36 PM
Posted 23 March 2003 - 04:13 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users