Alien Planet OpenGL Project

This project was a coursework at Newcastle University. The task was to present a Tardis on an extraterrestrial planet with as many graphical effects as we can. The Tardis should oscillating between opaque and fully transparent and it should have a flashing light on top.

  • Timespan: 4 weeks
  • Technologies: OpenGL 3.3, Visual Studio 2013, GLEW, SOIL
  • Platform: Windows

The video above is rendered in real-time and the various effects are explored below.


Tessellation is used to have a fain grained globe. I imported the globe as an OBJ file and thence could not easily add vertices. However, without tessellation both the scale of the planet and the application of a heightmap ended in unpleasant visual result. The pictures below depict the difference.
Alien planet without tesselation


up: no tessellation, down: 4 inner and 7 outer tessellation

God’s Rays

The God’s Rays effect is especially visible when the sun is getting to the center of the screen in front of the camera. The closer the sun is to the center of the screen, the more intense the effect gets. I used two Gaussian distributions functions, one for the x axis and one for the y axis, to determine the strength of the effect. Again, two pictures to depict the impact of the post processing effect.


God's Rays

up: without God’s Rays, down: with God’s Rays


The Gaussian blur is affected by both the camera and mouse movement. The camera position change with the WASD key for the last update and the relative mouse movement will determine the final strength. We have three pictures which depict difference strengths of the effect.



The picture below depicts (beside shadows), the lightning in the scene. The ambient part of the sun color consists of a deep red color touch, the diffuse property will add orange color touch and it gets finalized with a more yellow specular part.


Shadow Mapping

I use a shadow map to cast shadows from the sunlight. Due to the hight resolution, the globe is even self-shadowing.


The HUD contains several useful information for the user like a mini map, a coordinate system axis to orientate in space, key binding informations and the day time clock.

coordinate system  image15  day time clock

Smoke Particles

Over the planet surface are several gushers spread out. The gushers are imitated with smoke particle emitters. They were added to greatly enhance the believability of a live system. The smoke particles are pushed out of the planet on several points and make the scene look more dynamic.

particle effect

Time of Day Change

Besides the particle effect, I further increased the life in the scene by having a day change event. The sun rises between 3 and 6 am and goes down between 6 and 9 pm. Actually the sun is not exchanged, but the final image just post processed.

image13 image16


I have implemented the programmatically creation of an Icosphere. The recursion level for the creation of the Icosphere can be modified and it will create a smooth result. I also have added a UV-Sphere creation method, but I do not use a UV-Sphere, as the texture mapping was not fitting to my purposes. Left is a plain Icosphere with no recursion, whereas the right pictures has a depth of 4.


low poly icosphere high poly icosphere


As the task was to create an alien planet scenario, I assessed that a globe will best represent the scenario. However, I realized that a sphere, both UV and Icosphere, can have a lot of problem when texturing. Especially when applying a height map I faced issues with a seam from one pole to the other on both sphere versions. The final globe OBJ which is used in the project has texture coordinates for having a cube map on the globe. However, the problem was then to find a cube height map. As I did not find a cube height map, I shifted to create a seamless height map in every direction and even seamless when rotated. To archive this, I created a gray scale noise texture which has the same color on all edges. So, basically the final planet had 6 times the same height map applied.


Even though this code will never be shared or made public, I would like to place reference to pages, where I got models and textures from for this project.