Procedurally rendered cave

Topic of research
Rendering Earth features such as a cave. Cave

Project to render a realistic cave in OpenGL

Topic of research
Rendering Earth features such as a cave.

Using
1. rendered terrain using random generation or from height map.

2. texture terrain with natural color patterns or wrap with texture maps taken from actually photographed cave surfaces.

3. Light the scene with lighting to recreate the appearance of pictures actually taken in a cave.

4. create 'fly by' scenes that can be rendered into video/animations.

Rendering cave images

What methods are available?

Home

What to try next?


Progress report 1:

One of the first things I investigated for this project was the use of voxels or polygons for the rendering of a cave. While Voxels (volumetric pixels) are a natural fit for creating 3D spaces such as a cave I found that most current cave mapping software such as Compass and Walls use polygons. (I have since done some more reading and found compass has some really interesting VRML export options that I intend to look at) A little reading on the subject led me to the conclusion that while voxels were interesting a better looking and faster render would be possible using polygons, mainly due to the way hardware implementaion in video cards has focused on increasing the speed of polygon rendering. Also helping in this decision was the fact that most of the programs we were creating in class were rendering triangles which is the basis of polygon rendering. I started experimenting with the terrain rendering program and downloaded a few different SRTM data sets to see if Terrain rendered from a triangle mesh would be appropriate for rendering a cave, while the look was approaching what I wanted the fact that the terrain was a single plane adjusted by height-map means it would not by itself render a cave or even an overhang. terrain

Next I took a look at the tunnel demo code from the class examples. This rendered a continuously moving tunnel formed from concentric circles joined with quadralaterals. This gives a tunnel like effect when the quads are filled with solid colors. I set about modifying this so that the circles were connected with triangles instead of quads in the hope of creating a triangle mesh that could be adjusted by a height map similarly to the terrain demo. terrain terrain

While reading about different methods of rendering and trying to solve some openGL compatability issues I stumbled upoun a page describing webgl. I had heard of it previously but at that time it wasn't widely supported by many browsers, I decided to give it a try and by combining techniques learned in class and various tutorials online I hope to use this as the rendering platform for my project. Here are my initials in a web gl canvas.

Progress report 2

Progress report 2:

Continuing with webgl I tried a few different techniques to create a cave like image. Following along with the tunnel idea. I created a cylinder which resembled the tunnel coded in opengl. cylinder

This combined with animated movement and a texture made from a picture of cave wall provided an image resembling looking down a cave passage. tunnel

I felt this was limiting in it's ability to resemble the rough surface of a cave so I returned to the idea of rendering terrain. Following a short tutorial I was able to render terain in webgl. terrain

I continued to improve on the terrain. cylinder and when I managed to apply a texture map made from an image taken in a cave I felt I was approaching the look I was trying for cylinder cylinder

Progress report 3:

Returning to C++ opengl I took another look at the tunnel code to see if I could make it more cave like. tunnel I tried using triangle strips, quads and quad strips but none gave me the look I was trying for. tunnel

So once more I returned to the terrain demo, for a cave I would need at least a couple of planes. I colored one red so I could easily distinguish it from the original 'floor' plane. With a different height map and some smoothing it began to give me the look I was after. plane

I decided that in the event one was to position the camera in the cave looking outward there should be some sort of 'sky box' representing the view so I began constructing a box around my cave. It has a dark brown floor,dark blue walls and a lighter blue ceiling for now. plane

inside the cave inside the cave inside the cave inside the cave