Presentation on theme: "4.9. P ARTICLE E FFECTS Use of particle effects within games."— Presentation transcript:
4.9. P ARTICLE E FFECTS Use of particle effects within games
Video not available in on-line slides
Particle system can be used to simulate a range of phenomena which are otherwise very hard to reproduce with conventional rendering techniques. Examples include fire, explosions, smoke, sparks, falling leaves, clouds, snow, dust, hair, fur, or abstract visual effects like glowing trails, magic spells, etc.
Particles are often controlled by an emitter. The emitter births and kills particles, as well as determining position, size, etc. The emitter encapsulates one, or more, sets of particle behaviour parameters. Parameters can include spawning rate, initial velocity, particle lifetime, particle colour, etc. Particle parameter values are normally randomised (using some defined distribution).
View the DirectX SDK Soft Particles example
Simulation stage New particles are created based on the defined spawning rate. Each of the particle parameters are suitably initialised based on the emitter’s parameters. Any particle that has exceeded its lifetime is removed from the simulation. For each particle managed by the emitter. The particle’s parameters are updated Rendering stage Particles are typically rendered using a textured billboarded quad. Aside: Collision detection between particles and key 3d geometry (e.g. terrain, players, etc.) may be used to make particles realistically interact with obstacles in the environment.
Particle systems can be either animated or static. If animated the lifespan of particles are rendered over a number of different frames. If static the entire life cycle of each particle is rendered simultaneously. This results in strands that show the particle’s overall trajectory. These strands can be used to simulate hair, fur, grass, and similar materials.
The strands are controlled using the same parameters as for animated particles. Different combinations of parameters can provide a strand with varying degrees of stiffness, limpness, bristliness, etc. The strands may also use texture mapping to vary the strands' colour, length, or other properties across the emitter surface.
View the DirectX SDK Advanced Particles example
Directed reading concerning particle systems Directed reading
Directed reading Read The Ocean Spray in Your Face – for a very early construction of a particle system Read Building an Advanced Particle System – for more information on particle systems Read UberFlow: A GPU-Based Particle Engine – for details on a GPU based particle engine
To do: Read the directed reading Think if you would like to build a particle system for your project Today we explored: The wide use of particle systems within games