Transcript Particles

Particle Systems
Simple objects - e.g., rendered as point light sources
Lots of objects
Simple motion - e.g., local rules, simple physics
Ignore collisions between particles
Did I mention there are lots of objects?
Rick Parent - CIS682
For each frame
1. Terminate any expired particles
2. Update attributes according to controlling procedures
3. Create new particles and assign attributes
4. Render particles.
Rick Parent - CIS682
For each frame
Reaction to environment
Aging: Time-varying attributes
birth
Source
death
Rick Parent - CIS682
Particle Generation
Controlled random process
Distribute over space and over time
Synch generation with particle
termination to keep bounded number
of particles alive at any time.
Rick Parent - CIS682
Particle Attributes
position
velocity
Shape (if any)
Display attributes (e.g. color, transparency)
Life expectancy (pseudo random).
Rick Parent - CIS682
Particle System Representation
position
Array of
velocity
accumulated force
mass
Rick Parent - CIS682
Updating Particle System
1. Clear forces
2. Accumulate new forces
3. Compute acceleration, velocity
4. Update position.
Rick Parent - CIS682
Particle Physics
Unary: gravity, viscosity
Environmental: repulsion forces, reaction to collisions
Rick Parent - CIS682
Simple Physics
F = ma
a = m/F
Gravity: F = m1*m2*G/distance2 : a = 32 ft/s2 = 9.8 m/s2
Springs: F = (d-drest)*kspring
Viscosity / Damping: F = v*kviscosity
Force fields, e.g., wind.
Rick Parent - CIS682
Simple Physics
Accumulate forces
Calculate acceleration
Assume constant acceleration over delta time
Average velocity = (vold+vold+a*dt)/2 = v old + a*dt/2
positionnew = positionold + v*dt+a*dt2/2.
Rick Parent - CIS682
Particle Systems - Recap
Lots and lots of members
Simple physics
No knowledge of other members
Minimal geometry of members
Emergent Behavior - global behavior from local rules.
Rick Parent - CIS682