Particle Systems

27
CSC505 Particle Systems

description

Particle Systems. Object Representations. So far we have represented (rendered) objects with Lines Polygons (triangles) Curves These techniques won’t work for irregular objects. Clouds. Clouds. Fire. Smoke. Water. Water. Explosions. Explosions. Irregular Objects. - PowerPoint PPT Presentation

Transcript of Particle Systems

Page 1: Particle Systems

CSC505

Particle Systems

Page 2: Particle Systems

CSC505

Object Representations

• So far we have represented (rendered) objects with– Lines– Polygons (triangles)– Curves

• These techniques won’t work for irregular objects

Page 3: Particle Systems

CSC505

Clouds

Page 4: Particle Systems

CSC505

Clouds

Page 5: Particle Systems

CSC505

Fire

Page 6: Particle Systems

CSC505

Smoke

Page 7: Particle Systems

CSC505

Water

Page 9: Particle Systems

CSC505

Explosions

Page 10: Particle Systems

CSC505

Explosions

Page 11: Particle Systems

CSC505

Irregular Objects

• These objects are “fuzzy”– They do not have well defined boundaries– They are not smooth– Their surface texture is irregular– Their shape changes over time– Their motion is cannot be described by simple

transformations

• To represent such objects we use particle systems

Page 12: Particle Systems

CSC505

Particle Systems

• Objects are represented by clouds (groups) of individual objects (particles)– The particles themselves may be polygons

• The particles are not static– Their motion is unique with respect to other particles– New particles are born– Old particles die

• The system is not deterministic– Stochastic processes are used to create and change the

particles

Page 13: Particle Systems

CSC505

Stochastic Process

• A statistical process involving a number of random variables depending on a variable parameter (which is usually time)

Page 14: Particle Systems

CSC505

Particle Systems

• Advantages over polygonal descriptions– Much simpler primitive (single point in space)– Easy to motion blur – Doesn’t require a lot of human design time since

they are based on procedures and random numbers– Can dynamically adjust the level of detail– Easy to change form over time

Page 15: Particle Systems

CSC505

Particle Systems

• A collection of many small objects that, when taken together, represent a larger object

Polygon Representation Particle Representation

Page 16: Particle Systems

CSC505

Particle Systems

• The particles act as a system

• But, each particle has its own attributes and behaviors

• It’s the individuality of each particle that makes the system versatile

Page 17: Particle Systems

CSC505

Particle Systems

• Since we’re dealing with animated sequences, time is the primary axis

• Over time…– New particles are generated

– Each new particle has it’s own attributes

– Old particles die

– Surviving particles move according to dynamic attributes

– Each time quanta is rendered creating an animated sequence

Page 18: Particle Systems

CSC505

Particle Generation

• The number of particles generated at any given time frame can be controlled by a density function

• This provides a level-of-detail control– Smaller objects may require less particles

– Larger objects may require more particles

– This feature can be used to reduce processing time

• Particle density can also be a function of time– Increase/decrease the mean number of particles per object

as a function of frame number

Page 19: Particle Systems

CSC505

Particle Generation

• Specify– Initial number of particles per object– Function for specifying the number of particles per

object over time

Page 20: Particle Systems

CSC505

Particle Attributes

• Each particle has its own set of attributes– Position point– Velocity vector– Acceleration vector– Size– Color – Transparency (alpha)– Shape (pixels, triangles, polygons)– Life time

Page 21: Particle Systems

CSC505

Particle Attributes

• All of the attributes can also be specified as an initial value and a function over time– Velocity affects position (derivative of position)– Acceleration affects velocity (derivative of

velocity)– Shape can change– Color can change– Lifetime causes a particle to fade out over time

Page 22: Particle Systems

CSC505

Particle Extinction

• Each particle has a life expectancy measured in units of frames (time)– Particles can die gracefully according to schedule– Particles can die suddenly based on external

factors

Page 23: Particle Systems

CSC505

Particle Dynamics

• Each particle can move independently– Simple vector arithmetic is used to move a particle

• Position = Position + velocity : (speed)

• Velocity = Velocity + acceleration : (gravity)

• Acceleration = Acceleration + external forces (wind, friction, etc.)

• Each particle can change its color independently– Based on initial color, final color, and alpha

blending function

Page 24: Particle Systems

CSC505

Particle Dynamics

• Each color can change its size independently– Grow or shrink over time– Can also use an “alpha-blend” type of function

• Each color can change its alpha independently– Can start out opaque and turn transparent

• Particles can collide with one another causing path changes

Page 25: Particle Systems

CSC505

Particle Rendering

• Each particle can have its own rendering algorithm– Can move without leaving a trace of where it has been– Persistence: can move leaving a trail of where it has been

• Leads to an affect called motion blurring

– Use of alpha to blend overlapping particles

• Can be rendered as– Pixels– Circles – Triangles– Polygons– All can be shaded using techniques previously discussed

Page 26: Particle Systems

CSC505

Demonstration Programs

Page 27: Particle Systems

CSC505

Homework

• Create a particle system demonstration– Incorporate any effects you like

• Particle physics

• Color fading

• Curve generation

• etc.