Multimedia & Games   3D Graphics   Other Graphics   Misc   Blog   About   CV

Rune's Particle System

Information

Rune's Particle System is an include file package for use with POV-Ray 3.5. Water, smoke, fire and sparks are just some of the things it can simulate. With a generic and non-specialized engine, the system makes it easy to customize the simulation to a wide range of uses. The package comes complete with include files, documentation, and several sample scene files that makes it easy to get started.

The documentation is included in the zip file, but you can also see it here.

Features

Oct 19 2002

The system does not use very advanced algorithms. It doesn't support particle-to-particle interaction, so things like water and smoke can only be simulated with limited realism, because the system has no fluid dynamics. Still, in some cases the system produces very nice results. The real strength though is that this system is very user-friendly and easy to use compared to many other particle systems I've seen.

Feature highlights:

  • The look of the particles can be completely customized by the user.
  • Several predefined types of particles in separate include files.
  • Support for collision detection against any object.
  • Upon collisions the particles can bounce or float along the surface, depending on the settings used.
  • Support for object emitters of any solid object.
  • Death objects can be specified that kill particles upon collision.
  • Gravity and wind can be defined for every point in space and can change over time.
  • The number of calculation steps is independent on the number of frames.
  • Support for looping animations.


The particle system is a project I made for fun. I've been working on and off on it since February 2001, and now in October 2002 it's finally finished. Many thanks to the beta testers who in the later stages helped me to test the system for bugs, and by coming with suggestions for improvement.

Fountain demo scene (146 KB)

Oct 19 2002

View animation:
Fountain demo scene
( right click to download ) This is an attempt at a somewhat realistic scene with a fountain of water. The particles are thrusted upwards and then fall down. The water at the bottom is not part of the particle system though. This scene also demonstrates the faked motion blur of the water drops. They are simply scaled longer in the direction of movement.

Magic Lamp demo scene (376 KB)

Oct 19 2002

View animation:
Magic Lamp demo scene
( right click to download ) Here a lamp object is used as an object emitter, so that particles are emitted from the surface of the object. The particles here are small lens flares. This animation also demonstrates transferring of kinetic energy, where the particles inherit some of the movement from the object they are emitted from.

Flow demo scene (314 KB)

Oct 19 2002

View animation:
Flow demo scene
( right click to download ) In the particle system, the collision settings can be set so that particles flow along the surface they hit. This can be used to create some nice flowing water, like in this animation.

Camp Fire demo scene (128 KB)

Oct 19 2002

View animation:
Camp Fire demo scene
( right click to download ) The particle system can also be used to make some nice fire effects, where each particle acts as one flame. These flames are each made of spheres filled with media.

Smoke Trail demo scene (250 KB)

Oct 19 2002

View animation:
Smoke Trail demo scene
( right click to download ) Smoke is also a good task for a particle system. The smoke in this demo scene is thrusted out backwards from the missile, and is also affected by wind. This demo scene is not very realistic, as I just wanted to show off some effects, like how you can control the color of particles over time if you want.

Hose demo scene (64 KB)

Oct 19 2002

View animation:
Hose demo scene
( right click to download ) A simple simulation of water, where the particles bounce off the ground. Bouncing is easier to do than flowing, so this was one of the first water-simulations I did.

Magic demo scene (128 KB)

Oct 19 2002

View animation:
Magic demo scene
( right click to download ) Magic-like star dust effects like this is what originally made me start creating the particle system. The physics here are simple - the particles are only affected by simple gravity. A good start if you want to create a particle system.

Pentagram Fire demo scene (146 KB)

Oct 19 2002

View animation:
Pentagram Fire demo scene
( right click to download ) The particle system can also be used to set objects on fire. Here a pentagram symbol is used as an object particle emitter, so that particles are emitted from the entire surface area of the object.

Blow Up demo scene (748 KB)

Oct 19 2002

View animation:
Blow Up demo scene
( right click to download ) Four particle systems are used here: One for the initial explosion, one for the steady beam of fire and smoke, one for the dust, and one for the debris. The effect is not completely realistic, as the system has no fluid dynamics to control how the smoke behaves, but this is as good as it gets with this system.

Inner workings

Oct 19 2002

The core of the particle systems is the arrays with the data for each particle. To simulate the movement of the particles, the same calculations are done over and over again. In each calculation step the following happens:

  • Each particle is moved by it's current velocity (current location minus last location) plus gravity (for example -y). More forces can be added if necessary. The life is also decreased by an amount. Furthermore things like collision detection are also calculated here.

  • In each calculation-step some particles die (Life goes below 0). When this happens the life is set to -1 so the system can recognize that the element is "empty".

  • In each calculation step new particles are also created (they are created in "empty" elements). Their initial "last" location is set equal to the current position of the emitter-point. Their initial "current" location is the same as the "last", but with some randomness added. The life of the particle is also initialized.


For each frame in the animation a number of calculation steps are done. After the last step for a given frame, the particles are placed in the scene according to the latest calculated locations, and after that, file I/O is used to save the data in a file to make it available to the next frame in the animation.

That's just the basics. It would take forever for me to explain it all in details. For general information about particle systems, I suggest that you have a look at Hugo Elias' page about the subject. You can also look at the source code of my system to see how it works, and you can also mail me if you have any specific questions.

Be notified at rune|vision updates

Now and then I'm working on new stuff: Animations, images, computer games, and other things. If you fill in your email address below, you'll get an email newsletter at major updates at rune|vision (1-3 times a year). You can always unsubscribe again, and naturally, your email address won't be given to any third parties, or be visible to any of the other subscribers.
Email: Subscribe Remove

Write comment

Do you want to write an email personally to me? Then click here.
(This is the best choice if you need an answer from me.)

Write a comment about Rune's Particle System:
(Your comment will be shown below.)
Your name:
Your email address: (optional)
Your website: (optional)
Your comments:
(no HTML or URLs)
Spam-protection: Please solve this equation: 4 + 8 =
Submit the form:

Comments about 'Rune's Particle System'

Mar 13 2008 from Don Barron [website]
Greetings,
I'm really enjoying your hose particle system. But which parameter do I modify to control the particle speed?
Yours,
Don Barron

Jun 13 2007 from Anekelea
your particle system looks great I've been looking for a way to "make" fire and fountains thank you for making this possible

Mar 27 2007 from Joe [website]
Dude, you own

Aug 2 2006 from Specky
Impressive! I've been wondering if there were any particle systems for POVray available...but I guess that that answers that question...

Apr 16 2006 from Jack
These are amazing!!!!!

Jan 28 2006 from Jay [website]
Wow! I've done a 2d particle system which I'm now converting to 3d, yours very impressive and gives me some great ideas. Thanks for putting this up here.

Nov 2 2005 from Dmitry
I neeed to develop particle system

Mar 31 2005 from haz
bravoooo ! great work on POV :) and tasty animations !!!


Feb 1 2005 from ICE
Hi Rune,
Firstly a massive THANK-YOU for doing all of this! I think your particle system is dynamic and absolutely fantastic-i have been looking for something like this for months-well done and please, please, please keep up the good work-yippee!

Rune's Particle System