3d Engine Programming Tutorials

From Spacesimulator.net

Jump to: navigation, search

In these lessons I will explain step by step how to construct a 3d engine in C using OpenGL. I assume that you already have a basic knowledge of C. The engine that we are going to build will be structured to account for open environments, include features suitable for space simulators (after all, we are at spacesimulator.net) and will take into account that in the future will be added sections to manage landscapes and more advanced tutorials in which I will reveal some solutions that I have implemented in my own 3D engine. However, I will proceed gradually from the most elementary concepts to the more complex ones.

The code was originally developed using Visual C Version 6 for Windows, but I think you won't have too many problems using other compilers.

You can find several Libraries and Resources following this link: Tutorials Libraries and Resources

To see some projects from the community you can visit: Tutorials Based Projects

I am looking for ports to other platforms and other languages, please see the Collaboration page for further details

Donations can be done following this link. Thanks so much for your support!

Screenshot Tutorial Add-Ons Source Code
The 3D Engine
Basic definitions: 3d engine, vertices and polygons. The first step to create the data structure for a 3d engine.
Dutch | English | Finnish | French | German | Italian | Portuguese | Russian | Spanish
C/C++
OpenGL and GLUT Framework

Warning: the source code of this tutorials contain an error that is under correction, please read here for more info.

Here we analyze the rendering pipeline, the graphic library OpenGL and the utility library GLUT. At the end of this lesson we will be able to show a rotating solid object!
English | French | Italian | Mexican | Russian | Spanish
OpenGL 3.3 Porting
English
Linux
MacOS
MacOSX(Cocoa)
SDL
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
Texture Mapping
How to load an image and use it to cover an object. This technique is called texture mapping and is the most responsible for the realism of the scene.
English | Italian
OpenGL 3.3 Porting
English
Linux
MacOS
MacOSX(Cocoa)
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
3ds Loader
The data structure for a complex object can't be written by hand. There are a lot of programs that help to create 3d meshes in a very quick way. In this lesson we study how to load a 3ds file, a format that is really famous on the net.
English | German | Italian
OpenGL 3.3 Porting
English
Linux
MacOS
MacOSX(Cocoa)
SDL
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
Vectors, Normals and OpenGL Lighting
Lighting is the other important thing, after texture mapping, that adds to the scene further realism. Without lights all the objects seems flat. We will study also Vectors and normals because they are indispensable to make lighting calculations.
English | German | Italian
OpenGL 3.3 Porting
English
Linux
MacOSX(Cocoa)
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
File:scrsht_tut_matrices.jpg Matrices and multi-objects loading
In this lesson we will improve and extend our object structure, we will be able to load some objects in our scene and manage their positions and rotations using matrices.
(Not yet written)
OpenGL 3.3 Porting
English
Linux
MacOSX(Cocoa)
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
File:scrsht_tut_camera.jpg Camera and 3d freedom
Of course our biggest aim is to explore the universe by moving ourselves through it as we like, making the monitor a free moving video camera. How can we do this? Simple: with the videocamera tutorial!
(Not yet written)
OpenGL 3.3 Porting
English
Linux
MacOSX(Cocoa)
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
File:scrsht_tut_fonts.jpg Print fonts using display lists
All this advanced graphic programming and then? We forgot to print simple fonts on the screen! We will do this using a bitmapped font, the best way to develop multiplatform games!
(Not yet written)
OpenGL 3.3 Porting
English
Linux
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
File:scrsht_tut_iniparser.jpg INI configuration files - Parser
Where can we store all our Universe settings? Ini files are the best choice! Very useful and portable library to read/write INI files!
(Not yet written)
OpenGL 3.3 Porting
English
Linux
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
File:scrsht_tut_sdl.jpg SDL Framework and FPS calculation
This os-platform independent framework will give us the possibility to manage all the boring stuff that a videogame needs: graphic context, sound and input.
(Not yet written)
OpenGL 3.3 Porting
English
Linux
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
File:scrsht_tut_physics.jpg Physics: Dynamics, Acceleration and Force
Physics, the secret to give life to our spaceships. In this tutorial we will add the essential rules to our engine to simulate a real universe.
(Not yet written)
OpenGL 3.3 Porting
English
Linux
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)
File:scrsht_tut_collisions.jpg Physics: Collision Detection and Collision Response
Another tutorial on Physics: this time we will learn basic collisions detection and collision response.
(Not yet written)
OpenGL 3.3 Porting
English
Linux
Windows(VC6)
Windows(VC.NET)(OpenGL3.3)

Personal tools