Course Project of Computer Graphics (浙江大学计算机图形学课程大作业)
This is a 3D game based on OpenGL, where the user can control a space ship to travel in the universe to view the scenery of stars, planets and other celestial bodies, and interact with the space stations.
Models and textures are from Stellaris. Download
Control the space ship:
W
: accelerateS
: decelerateA
: turn leftD
: turn rightSpace
: file missiles
-
Normal Mapping
Results:
Barren planet with (left) and without (right) normal mapping
Arid planet with (left) and without (right) normal mapping6599
Oceanic planet with (left) and without (right) normal mapping
Sentry Array with (left) and without (right) normal mapping -
Specular Mapping
Different locations in the texture have different reflective properties and lighting conditions.
Results:
-
Particles
We use particles to render stars more vividly:
-
Light Attenuation
Objects farther from stars will appear darker.
-
Terrain Generation Algorithm based on Perlin Noise
We use tiles to model the geometry of the terrain.
Then we developed an algorithm based on Perlin noise to generate random terrain.
Results:
-
Collision Detection
We use AABB method for collision detection.