CS580: Advanced Graphics

Procedural Texture Mapping and Particle Animation

Lukas Lepicovsky

Problem Definition:

Produceral textures have a variety of applications in computer graphics, one application is generating volumetric smoke, fire and explosions. Another application is using procedural textures as a wind force to drive particle animation, both are explored in this project.

Method & Implementation:

My volume rendering is creating using the volume slicing method, I create N 2d textures using the density perlin noise at diffirent z positions. I combine these 2d textures using alpha mapping in opengl. At each pixel in the 2d texture the density of perlin noise is used as a look up into a color table, the density is also used as an alpha value.

To render particles I do the following:
For each time step:

Initialize B particles (where B is the birthrate) , this includes variation in the intial velocity, position, scale etc... This is all contained in the function giveBirth

Next I update the velocites, to do this I first calculate the forces, this is done by looking at the gravity and windforce, the windforce is simply the gradient of the perlin noise function at each of the particles positions. Then I calculate the new velocity using the following formula.
Vnew = Vold + timestep*( F)/Mass. This is contained in the function updateVelocities.

Next I update the position using the new velocites, this in in updateVelocities.

Then I remove particles that are either past their max lifetime or below the ground plane, this in in killParticles.

Finally I render the particles using opengl.

Experimental Results:

Click the links to view the images to view the videos.

Source Code & Excecutable:

The program was created using Microsoft Visual C++ 2005, it uses the GLUT libary and the GLUI interface both are needed to compile it.

Source Code

Excecutable 1 (requires the .net framework to be installed)

Excecutable 2 (does not require framework to be installed but is much slower than the above)

 

References:

The perlin noise function was similar to that of Peachey in [1], page 67, the code was rewritten by Christopher Dyken. I added a fourth dimention to the noise so that it would change over time.

[1] Ebert, D. S., Musgrave, F. K., Peachey, D., Perlin, K., Worley, S.,
* Texturing and Modeling, second edition, Academic Press, 1998.