particle systems and fuzzy shapes presented by dan cogswell

21
Particle Particle Systems and Systems and Fuzzy Shapes Fuzzy Shapes Presented by Dan Cogswell Presented by Dan Cogswell

Post on 19-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Particle Systems Particle Systems and Fuzzy and Fuzzy

ShapesShapes

Presented by Dan CogswellPresented by Dan Cogswell

Page 2: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

►““Particle Systems – A Technique for Particle Systems – A Technique for Modeling a Class of Fuzzy Objects”Modeling a Class of Fuzzy Objects”

By William T. ReevesBy William T. Reeves

19831983

Page 3: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Fuzzy objectsFuzzy objects

►Do not have Do not have smooth, well-smooth, well-defined, and shiny defined, and shiny surfacessurfaces

► Irregular, complex, Irregular, complex, and ill-definedand ill-defined

► Soft, deformable Soft, deformable objectsobjects

Page 4: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Some fuzzy objectsSome fuzzy objects

►Grass, Smoke, fire, Grass, Smoke, fire, clouds, waterclouds, water

► Fireworks, Fireworks, explosionsexplosions

► Fluid flowFluid flow► Physical simulationsPhysical simulations► Flocking - Bird Flocking - Bird

migration, schools migration, schools of fish, riotsof fish, riots

Page 5: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

What’s a Particle System?What’s a Particle System?

► A collection of many A collection of many minute particles minute particles that together that together represent a fuzzy represent a fuzzy objectobject

► Use points to define Use points to define shapes rather than shapes rather than polygonspolygons

Page 6: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

AdvantagesAdvantages

► Simple – points Simple – points rather than polysrather than polys

► ProceduralProcedural► RandomRandom►Models that are Models that are

“alive”“alive”

Page 7: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Born -> Live -> Die, the life of a particleBorn -> Live -> Die, the life of a particle

►Particles enter the systemParticles enter the system►They are given individual attributesThey are given individual attributes►Particles in the system that have Particles in the system that have

exceeded their lifetime are extinguishedexceeded their lifetime are extinguished►Live particles are moved and Live particles are moved and

transformed according to their attributestransformed according to their attributes►Particles are renderedParticles are rendered

Page 8: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

BirthBirth

►Set rate at which particles enter the Set rate at which particles enter the systemsystem Control mean number of particles enteringControl mean number of particles entering

oror Control mean number of particles entering Control mean number of particles entering

per unit area of screenper unit area of screen

►Adjust size of object by changing the Adjust size of object by changing the rate at which particles enter the rate at which particles enter the systemsystem

Page 9: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Particle AttributesParticle Attributes

► PositionPosition► Velocity vectorVelocity vector► Size, color, transparencySize, color, transparency► ShapeShape► lifetimelifetime

Page 10: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Assign Random PropertiesAssign Random Properties

► Value = mean + Rand()*varianceValue = mean + Rand()*variance►Need a good random number seedNeed a good random number seed

Page 11: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Generation ShapeGeneration Shape

►What initial shape What initial shape do we want the do we want the particle system to particle system to have?have?

Page 12: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

LifeLife

►At each frame, add velocity vector to At each frame, add velocity vector to position vectorposition vector

►Add additional accelerations such as Add additional accelerations such as gravitygravity Causes particles to move in parabolic arcsCauses particles to move in parabolic arcs

Page 13: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

DeathDeath

►Lifetime of a particle defined at birth Lifetime of a particle defined at birth to be a certain number of framesto be a certain number of frames

►Or, kill particlesOr, kill particles That are not visibleThat are not visible When they are a certain distance from the When they are a certain distance from the

originorigin After a certain time intervalAfter a certain time interval Below a threshold intensityBelow a threshold intensity

Page 14: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Particle RenderingParticle Rendering

► Rendering DifficultiesRendering Difficulties Particles obscure other Particles obscure other

particlesparticles Particles can cast shadows Particles can cast shadows

and be transparentand be transparent Polygon primitives interact Polygon primitives interact

with particleswith particles

► Assume particles do not Assume particles do not intersect with each other intersect with each other or surface primativesor surface primatives

► Assume particles are point Assume particles are point light sourceslight sources

Star Trek II: The Wrath of Khan

Page 15: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

► A particle behind A particle behind another particle is another particle is not obscured by not obscured by rather adds more rather adds more light to the pixels light to the pixels coveredcovered

Page 16: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Particle HierarchiesParticle Hierarchies

► Instead of drawing a system of Instead of drawing a system of particles, make a system of a system particles, make a system of a system of particles!of particles!

►Construct a hierarchy treeConstruct a hierarchy tree►Adds turbulence and billowing effectsAdds turbulence and billowing effects

Page 17: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Dumb ParticlesDumb Particles

► Particles that do not Particles that do not interact with each interact with each otherother

► i.e. vortices, smoke, i.e. vortices, smoke, rain, firerain, fire

Demo

Page 18: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Smart ParticlesSmart Particles

►Particles interact with each otherParticles interact with each other►Useful for simulatingUseful for simulating

Flocks, herds, schools of fish (Boids 1986)Flocks, herds, schools of fish (Boids 1986) FluidsFluids Collisions + turbulenceCollisions + turbulence

Page 19: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Modeling Flocking PatternsModeling Flocking Patterns► Avoid hitting one Avoid hitting one

anotheranother► Point in same Point in same

direction as direction as nieghborsnieghbors

► Steer toward Steer toward average position of average position of neighborsneighbors

► Avoid dangerAvoid danger► http://www.codepuppies.com/~steve/aqua.htmlhttp://www.codepuppies.com/~steve/aqua.html

Page 20: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Fluid flow modelingFluid flow modeling

►Density, pressure, viscosity per particleDensity, pressure, viscosity per particle►Particles have massParticles have mass►Particles are rigid bodies that take up Particles are rigid bodies that take up

spacespace Momentum is conserved during collisionsMomentum is conserved during collisions Controlled by gravitational forcesControlled by gravitational forces

►Heat transferHeat transfer►Surface tensionSurface tension

Page 21: Particle Systems and Fuzzy Shapes Presented by Dan Cogswell

Physical Simulations with Physical Simulations with particlesparticles

►Turbulence Turbulence Pouring Pouring waterwater 160K particles160K particles 300k particles300k particles

►Fluid-solid collision Fluid-solid collision MagmaMagma ViscousViscous Metal Metal

► multiple fluid interactions multiple fluid interactions PaintPaint MixingMixing demo demo

►Heat transferHeat transfer►Fracture/Explosions Fracture/Explosions Exploding Exploding blockblock

►Render up to 1 million particles on a Render up to 1 million particles on a PCPC Can change fluid resolutionCan change fluid resolution