2D games occur in two dimensions, as shown in the previous chapters. These dimensions, in Cartesian coordinates, are the x and y axes. 3D games extend the dimension with a third axis, z, and the origin (0,0,0) is the point where all three axes intersect. Unlike 2D games, which tend to take their graphics from flat 2D images-the kind that can be manipulated and edited in a photo program such as Photoshop or GIMP-3D games require new sorts of graphics. Specifically, 3D games require 3D graphics-the kind that can be viewed from any 3D angle. Let's consider a goblin. In a 2D game, the goblin could be drawn on paper, scanned into the computer, and colored in. It cannot be viewed from any angle other than that from which it was drawn. In 3D, however, this will not work because if the camera were rotated to view the goblin from some other angle, the user would not see the other side of the goblin. Graphics in 3D games, then, are models, or sometimes called meshes. These exist in three dimensions and are created by artists in a similar way to a sculpture. There are a variety of programs available to create such models, and two of the most widely used applications to do this are 3ds Max, which is commercially available, and Blender 3D, which is open source and free.
Blender 3D can be downloaded from http://www.blender.org/.
Once the different 3D models are created, including any animation properties and so on, they can then be exported into a file to be included in a 3D game. Such files are then typically loaded into a 3D game and presented to the screen using a paint-to-canvas mechanism similar to that used for 2D games.
Typical 3D games like these are often created using SDKs such as OpenGL or DirectX. And from these SDKs a number of other libraries have been derived, in the same way ClanLib is based on OpenGL. These libraries add extra functions and classes to make the development of games quicker and easier. OGRE 3D is just such a library, in this case for 3D games. It is based upon both OpenGL and DirectX, and when OGRE applications are executed, users have the choice to select which of those libraries should be used. Subsequent sections of this chapter examine OGRE 3D more closely, starting with how it can be obtained.