4.9. P ARTICLE E FFECTS Use of particle effects within games.

13
4.9. PARTICLE EFFECTS Use of particle effects within games

Transcript of 4.9. P ARTICLE E FFECTS Use of particle effects within games.

4.9. PARTICLE EFFECTSUse of particle effects within games

PARTICLE EFFECTSUse of particle effects within games

Video not available in on-line slides

Particle Systems

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.

Particle Systems

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).

Particle Systems

View the DirectX SDK Soft Particles example

Particle Systems

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 (Fur and Hair)

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.

Particle Systems (Fur and Hair)

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.

Particle Physics

View the DirectX SDK Advanced Particles example

DIRECTED READINGDirected reading concerning particle systems

Directed

reading

Directed reading: General LODDirected

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

Summary

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