The particle system follows a very clean class structure, allowing very easy integration into any game using OpenGL. Each system is composed of individual particle emitters and particle affectors. Multiple affectors can be added to each emitter, and multiple emitters can be added to each system. Each affector and emitter have many properties that can be changed, and can be updated dynamically while the game is running by accessing and modifying the appropriate properties. Furthermore, I integrated the changes that Spencer made with regards to instancing — each particle system and emitter can be instanced to increase performance.
To further increase performance, all particle physics, and other miscellaneous tasks such as billboarding, are done on the GPU with GLSL shaders. The end result bypasses the fixed-function pipeline completely, allowing complete control over the appearance and behavior of the particle system. This relieves the CPU to only handle particle generation and passing off the data to the GPU. To further increase performance later on, a switch from immediate mode rendering to something like vertex buffer objects (VBOs) would help. The only reason VBOs were not implemented for this project was due to time. Performance is still very good though, even on a low-powered laptop with an Intel integrated graphics chip, displaying a particle system with many thousands of particles.
For the UI aspect of the project, wxWidgets was chosen over other OpenGL-friendly UI implementations such as GLUT and SDL due to its flexibility. However, wxWidgets was not at all easy to deal with and came with hours upon hours of work just to get it to compile, so the resulting UI unfortunately does not have much functionality with regards to tweaking the active particle system in the display. The entire UI was designed, but I did not have time to implement the event handlers that change the particle system (some aspects of the system CAN be controlled, just not ALL). The user is able to zoom and rotate around the particle system in the viewer, and the FreeImage library was used to enable loading PNG files (so nice alpha-blending additive effects can be achieved).
Particle System Instance
Particle Emitter
|
Color Fade Affector
Gravity Affector
Swirl Affector
Move Affector
|