Home » Archive by category "Intermediate"

Lesson 13: Face generation

OpenGL 3D Generated Face
We can generate 3D faces from 2D flat images. Using OpenGL this can be challenging, after all it is not a lot more than a primitive triangle rendering API. The technique we will use in this tutorial is very similar, if not nearly identical, to terrain generation in our previous tutorial....
Continue reading »

Lesson 12: Terrain Rendering with OpenGL

OpenGL Terrain
In this tutorial we will render terrains. Essentially a terrain is a complex 3d model.  It conists of vertexes, faces, texture coordinates, normal vectors etc.  Al though it is possible to load complete models such as Wavefront OBJ models, it is generally better to dynamically generate them.  First, we...
Continue reading »

Lesson 7: OpenGL Keyboard Control

cube3
You will need to change the previous code for this tutorial. OpenGL is used to communicate with the Graphical Processing Unit, so by default it does not contain keyboard control. You will need a library to communicate with the keyboard. We can use SDL (which we have been...
Continue reading »

Lesson 6: OpenGL transparency and blending

cube3
In this short tutorial we will demonstrate how to do blending in OpenGL. You may notice in the final code we load two different textures:  one background texture and one object texture (glass). The background will be a normal square. The cube will blended on top of it,...
Continue reading »

Lesson 5: Fire in OpenGL, Particle Engine

fire
To create a fire/explosion like effect we can use the same particle engine as in the previous tutorial (starfield) but we have to modify the code a little bit. All particles move upwards; in addition, every particle has to moves at a different speed, and start from the...
Continue reading »

Lesson 4: Starfield Particle Engine OpenGL

starfield
  We introduce a simple particle engine. A particle engine can be used for many purposes in 3d graphics such as fire, explosions, lasers, stars and many other fun things! To make a particle engine, we need to have a particle set.  The set consists of N elements...
Continue reading »