Truth Seeking through Game Making
Monday, May 02, 2005
  3D: The Transformation Pipeline

Have you ever wondered how a 3D game is made? Or more specifically, how graphics are displayed on the screen as 3D graphics? I have. In my previous post, I said that is not easy to acquire this knowledge. However, I think it is worth spending a significant amount of time in this area. This is especially true if you intend to develop a 3D game as a programmer – whether the 3D engine, physics or Artificial Intelligence (AI). As I mentioned in my previous post, I will spend the rest of this year learning how to build a 3D rendering engine from scratch.

You will probably be wondering why one wants to learn how to build a 3D rendering engine when there are so many commercial and open-source rendering engines out there. It is true that I will probably never be able to create the next Doom3 or Unreal engine. However, developing the Doom3-beater is not my initial goal; instead my goal is to build a solid foundation of 3D knowledge in order to truly understand, utilize and modify other 3D rendering engines. I want to know what I am doing when I use a 3D engine or graphic API’s “vertex shader” or its simple “drawCube” functions.

Whether I plan to use a pre-built 3D engine or to create my own using a graphics API (Slade3D, haha) like OpenGL or DirectX Graphics, I would like to understand what the API is doing behind the scene. I do not want to be in a situation where I have to spend ten years debugging some annoying unexpected result. That would be disastrous. Without understanding the underlying mathematics that drives a mathematical construct (the 3D world), I do not think I will go very far in the realm of 3D.

I spent the last few nights learning/refreshing about the basics of 3D. Particularly the transformation pipeline (what every vertex of a 3D object must go through) and how vertices and matrices mathematics are used in an engine. I will try to give a brief summary of what I learnt.

I was somewhat shocked to realize how much math one needs to know to comprehend how a basic 3D polygon is rendered on the screen. Furthermore because of the huge amount of calculation the CPU/GPU needs to perform, no 3D API use trigonometric calculations we just discussed to their transformation pipeline; instead another mathematical construct, matrices (plural for matrix) are used.

Phew, that is a lot to learn. I wonder where John Carmack learnt all these from before he programmed Doom. In addition to all these 3D concepts (in its minute detail), I had to refresh a lot of math. I will continue with the math in the next post.

 
Comments:
Does anyone want to read about this stuff?

Or should I write on my opinion on the local game industry instead?

feedback needed ^^ thx
 
Glad to know that you are matrix transformation in ASP.NET. I assume it is for some sort of graphical interface in 2D maybe 3D?

I think i will continue writing, but I will organize my blog entries into categories to safe some of my faithful visitors' time.
 
Post a Comment



<< Home
John Tan is an entrepreneur, programmer, games developer, game designer. He lives in Cyberjaya, Malaysia and operates a startup game company, Hatchlings Games. His current interest is on Web 2.0 Gaming.

ARCHIVES
January 2005 / February 2005 / April 2005 / May 2005 / June 2005 / October 2005 / November 2005 / December 2005 / January 2006 / February 2006 / May 2006 / June 2006 / September 2006 / November 2006 /


Powered by Blogger