Final Year Project: Procedural Planet Generation

This was my final year project at university, a large project of my choice, worth two modules involving a large programming component and a report of approximately 10,000 words. The project I chose for mine was the procedural generation of planets using the GPU, as I am very interested in procedural generation, and like the idea of being able to create many useful assets quickly and easily through the use of clever algorithms. The aim of my project was to write an application and evaluate the viability and usefulness of fully generating a planet with terrain, all on the GPU without needing to store the information in memory. This meant generating all the necessary parts of the planet on-the-fly each frame, so the generation code

My project takes advantage of the new features introduced in Direct3D11, mainly the tessellation features, which allow low poly geometry to be passed in as "patches" then when configured the tessellation hardware is able to generate many more triangles and so a more detailed model. My application works by using a small, flat grid of squares as an input, which is then tessellated and duplicated 6 times to represent the planet as a cube. This is then transformed to a sphere and offset by values calculated with the terrain generation algorithms to create the final planet model.

Tessellating every part of the planet to maximum polygons, while looking the best, would be much too slow to be run in real time, which was one of my goals. I therefore needed to implement both a level of detail and culling system, to make sure only the visible parts were drawn and to an appropriate level of detail. The level of detail system was based around adaptively tessellating different parts of the planet depending on their distance from the camera, so the closer parts contain more triangles and are therefore higher detail.