Introduction

Procedural geometry is about generating 3D structure through mathematical functions and noise (random numbers). Since 3D structure is defined as lists of vectors (vertices), this is wat is in fact generated by these procedures.

The pictures on this site are screen captures of 3d structures produced using directx11 and were based on techniques described in Chapter 1 ; Generating complex procedural terrains using the GPU by Ryan Geis, in GPUGEMS3s, edited by Hubert Nguyen.

The interesting thing about procedural geometry using noise, is that it has some similarity with processes in nature. In nature there are many driving principles that determine the basic characteristics of things but in all cases the ultimate form is disturbed and made variable by noise. This is not only the case for geological structure but also for living things. As evey biologist knows the DNA or genoom of cells is not a building plan of life, it consists of a set of rules which determine structure and function only to a certain degree. So even the form or function of proteins which are the expression of DNA readout is offset by noise creating variation in all aspects of life.

I have not simply copied the shader code from the chapter of Geis, only the principles and I do not use raycasting to estimate ambient occlusion or have calculated the normals as he has done. For this I have adopted a method described by IƱigo Quilez.

I have used the first derivative of the smoothing function (a sigmoid) to estimate normals for all vertices (As explained by Inigo Q), and the second derivative to estimate ambient occlusion. Both values can be sampled together with the density values for each vertex (in one go) and is therefore much more efficient than the method used by Ryan Geis. Interestingly the normals calculated this way contain extra information that can be used to texture /color the geometry.

If there is interest in how I made these pictures I will publish the shaders I used.

Here are some examples and more to follow because I am still experimenting with these methods ;

dark rock

Red blue

rusty

jade

 

 

 

asteroid

redrock

Some numbers; The geometry in these pictures contain between 250000 and 300000 vertices. On my computer it takes about 15 seconds to compile the shaders and initialize the geometry. Once this has been accomplished, shading with shadows and transformations in 3D are on an interactive time scale. My computer has an intel core i7 975 processor, and a Geforce GTX 580 graphics card (MSI).