Assignment 5 - Singapore Grand Prix

 

Creating the 3D space:

For this assignment, it is required that we create a scene which we can race in. The basic requirements of this assignment will be constructing a terrain and a skybox for the 3D environment. The petrol station that was previously made will be added to this environment and a race course will be made for the Go Kart racing.

 

Adding Terrain:

In order to create a terrain, we need a height map to be used together with a 2D terrain image to create the 3D model of the terrain. Due to the inavability of a map generator, I decided to create one using a image to simulate the snow-covered mountains. The height map is constructed using photoshop. The dark patch in the middle is meant for adding the petrol station created previously so that there will be a plain to rest on.

Creating the terrain with height map.

Terrain constructed in OpenGL.

 

Constructing the Skybox:

A similiar skybox to the one shown during lecture was found. Hence, I decided to use it as it fits into my theme of mountains as well.

Seamless Skybox.

 

Other enhancements:

As show in the screenshots below, a small race course was constructed beside the petrol station. Collision detection is employed on the polygons that makes up the wall, preventing the Go Kart from moving off course. A fog has also been added to simulate small weather changes.

 

Controls:

t Toggle Terrain Mesh
f Toggle Fog

 

Assignment Source | Executable Files