A Flocking Application


Non-Java 3D Approaches

The basic framework for a particle system is fairly standard, and variations only appear when we decide on a particle's attributes and how they change over time. Ideas for these can be gained by looking at implementations in other languages.

Almost every games programming book seems to have a particle system example. For instance, OpenGL Game Programming (Muska and Lipman/Premier-Trade) by Kevin Hawkins and Dave Astle implements a snow storm effect, which can be easily translated from C++ to Java.

A popular particle system API created by David McAllister is downloadable at http://www.cs.unc.edu/~davemc/Particle/. Its C++ source code is available, as well as excellent documentation. It uses the interesting notions of actions and action lists. Actions are low-level operations for modifying particles, including gravity, bouncing, orbiting, swirling, heading toward a point, matching velocity with another particle, and avoiding other particles. Action lists are groups of actions which together make more complex effects. Many of the actions employ Euler's integration method, which underpins the workings of the parabolas in my examples. The API has been ported to various Unixes, Windows operating systems, and to parallel machines. The API would make an excellent model for a Java 3D-based package.

Most graphics software, such as Maya and 3DS, have particle system animation packages that can be used for testing effects.

The two papers that introduced particle systems are by William T. Reeves:

  • "Particle Systems - a Technique for Modeling a Class of Fuzzy Objects," Computer Graphics, 17 (3), p.359-376, 1983.

  • "Approximate and Probabilistic Algorithms for Shading and Rendering Structured Particle Systems," Computer Graphics, 19 (3), p.313-322, 1985.

The first paper was written after Reeves's work on the movie Star Trek II: The Wrath of Khan, for which he created a wall of fire that engulfed a planet with a particle system made of points. The second paper came out of the graphics work for the animated cartoon The Adventures of Andrew and Wally B, where the particles were small circles and lines used to model tree, branches, leaves, and grass.

GameDev has a small subsection on particle systems in its "Special Effects" section (http://www.gamedev.net/reference/list.asp?categoryid=72).



Killer Game Programming in Java
Killer Game Programming in Java
ISBN: 0596007302
EAN: 2147483647
Year: 2006
Pages: 340

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net