Particle System
Denis Palmans
CSC 471
Final Project

Description:
This project demonstrates some of the uses of particle systems. The particle system has many settings that can be set to create different effects. You can set the number of particles, particle color, particle life, gravity vector, emitter position, emit direction and spread, collision surfaces, and other minor settings.

There are 3 different main scenes that show some neat things with the particle system. The first scene has 2 flying particle emitters one has a fiery look to it, the other is green and purple and just looked neat. there is also 2 platforms in the middle with blue particles that fall from one to the other, and then to the floor. This was supposed to look like water flowing down. Finally there is a red particle emitter under the first platform who's particles are constricted to a cube. This scene just just shows how the systems can be constricted, and can also bounce or stick to surfaces that are set in the code.

The second scene is where you can 'spray paint' onto the surface. The user clicks the mouse and can paint different things with the particles. The color of the particles can also be changed. The oldest particles slowly fade away.

The third scene is a scene where it is snowing, and the snow falls and rests on the ground until it melts. This just shows how the particles can be mapped with any texture, as they are mapped with a snowflake.

The particle system uses an OpenGL extension to display point sprites for each particle so that each point can be texture mapped instead of just looking like a dot. The particles are also alpha blended together so that the sprites don't just overlap or get displayed in front of each other. The alternative to point sprites is using square billboards and writing code so that they are always pointing towards the camera.
 

 

User Guide:
The 'm' key is used to switch between the 3 different modes.

Mode 1 - Random particle effects:
Click and drag the scene to rotate it.
'a' and 'z' zoom in and out respectively

Mode 2 - Spray Paint
Click and drag to spray particles on the surface.
Right click to access the color menu. This sets the color of the spray paint.

Mode 3 - Snow
Click and drag the scene to rotate it.
'a' and 'z' zoom in and out respectively
'+' and '-' speed up/down the snowflakes.

 

 

Screenshots:

Scene 1 - random particle effects:

Close up of cube:

 

Scene 2 - Spray paint with different colors:

 

Scene 3 - Snow:

 

 

Known Issues:
Only works with a graphics card that supports the ARB_point_sprite extensions.
There are issues on different video cards, where the objects get drawn funny, or not at all.
The surfaces in the scene are all see through, this is due to them also being alpha blended. This was done because when they weren't alpha blended they did not display at all. I could not find out what I was doing wrong, or how to fix this.

I think some of the issues could be due to using GLUT for almost everything in the program, and then using standard opengl include files for the point sprites. I would have liked to have used only standard opengl includes, but I was not sure how to accomplish that as all our projects have used GLUT.

Resources:
The main resource needed was for the opengl extensions. Most of the information was obtained from the game developers forums:
http://www.gamedev.net/community/forums/forum.asp?forum_id=25

Other information was obtained by simple searches on Google, however I did not keep track of these. Several textures were found on random websites.