Home

Projects

BitBucket

About

Links



Procedural Landscapes

1/21/2007

For the first assignment of the course "3D Computer Graphics and Virtual Reality", we had to implement a procedural technique using OpenGL. This page contains a small summary (or rather a screenshot collection) of our results.

Jaap and I decided to create a procedural generated landscape. We started with generation of mountains, using a perlin noise-like method: starting with a single patch, and subdividing it into smaller patches with random height displacements.


Multiple iterations of our algorithm, left using linear interpolation and right using cubic interpolation.

Improving Realism

When that worked, we tried to improve the realism. We first added a very simple grass texture. Next, we added a skybox, which we rendered using Terragen. Finally, we added fog to create a smooth transition from landscape to skybox.


Top left: the landscape with plastic like shading. Top right: the grass texture applied. Bottom left: skybox added. Bottom right: with fog.

We rendered four different skyboxes with different atmosphere settings. We also used different sun altitudes.


The influence of different atmosphere settings and sun positions on the landscape.

Improving Realism II: Trees

Just for fun, we decided to add trees, also using a procedural algorithm.


A tree.



And another one.

Blending It Together

First, we simply added the trees to the terrain. We were a bit disappointed with the results; it still looked like two separate things.


Trees 'n mountains in the fog.


A wireframe view of a small forest.

Integrating the Trees: Shadows

To make things look better, we added shadows. These are precalculated and stored in a texture.


An early debug screenshot. Note that the leafs are actually quads, the leaf shape is colorkeyed. Also for the shadows the quad shape is used.


Trees in a sunset I.


Trees in a sunset II; the texels of the lightmap are clearly visible on the left.


Trees in a sunset III.


Trees in a sunset IV; including a shadowing glitch.

Closing Words

Altough we weren't able to produce photorealitic landscapes (something we didn't expect to do anyway), we enjoyed the creation of our landscape generator and were quite statisfied with the final results. It was also an interesting first-time OpenGL experience for both of us.