Particles Tutorial
In this tutorial, you will learn how to create particle effects in Panda3d. Particle effects are systems simulated by the movement of many small objects, or particles. They are commonly used to simulate phenomenon like explosions, sparks, fire, smoke, and steam to name a few. Particle effect systems are very compilcated. It's not likely that you would be able to create any good systems just by reading a list of available parameters. You need to be able to see and manipulate the systems to really get results. Fortunatly, there is a tool built into Panda for visualising particle effects. particlePanelLoader.py contians the code needed to run the Particle Panel. Run it, and you should see a black screen with a default particle effect, and a second window listing the parameters for that effect.
There are too many parameters in the Particle Panel to go over them all, however, the main sections are:
System: Details on how many particles are allowed and how often they are created.
Factory: Sets the properties of particles when they are created.
Emitter: Sets an area that particles can be created in and their initial velocities.
Renderer: How the particles will be drawn on screen (Hint: Most good particle effects are sprites with a small texture at very low alpha (around .1) heavily blending between each other.).
Forces: Sets forces that can be used to move existing particles.
Play around with the panel for a while, and create something you like. You can then save the settings to a file with the extension ptf. You can also load that ptf later and continue to modify it. Some sample ptfs are included for inspiration. The Panel does need some improvements because it is somewhat buggy. It can crash, especially when dragged around, and forgets some settings when they are saved out to a ptf. It forgets to include the extention of the texture for a SpriteRenderer, so you need to open the file by hand and correct the loader.loadTexture command or it will not load. It also forgets to record the axis masks on forces.
For more information on particles in Panda, please consult the Panda3D online manual