DOC PREVIEW
MIT 6 837 - Computer Animation Particle systems & mass-spring

This preview shows page 1-2-3 out of 9 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 9 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1MIT EECS 6.837Computer Animation Particle systems & mass-spring• Some slides courtesy of Jovan Popovic, RonenBarzelMIT EECS 6.837Last time?• Animation– Keyframe, procedural, physically-based, motion capture• Particle systems– Generate tons of points– Force field• ODE integration– Take small step in the direction of derivatives– Euler O(h), midpoint and trapezoid O(h2)MIT EECS 6.837Assignment 10• Proposal due tomorrow• Assignment due Dec 3• You have only 10 days• Be specific in your goals• Avoid risky exploratory subjectsMIT EECS 6.837What is a particle system?• Collection of many small simple particles• Particle motion influenced by force fields• Particles created by generators• Particles often have lifetimes• Used for, e.g:– sand, dust, smoke, sparks, flame, water, …MIT EECS 6.837For a collection of 3D particles…MIT EECS 6.837Euler• Timestep h, move in the direction of f(X, t) h f(X,t)2MIT EECS 6.837fm2ndorder methods• Midpoint:– ½ Euler step– evaluate fm– full step using fm• Trapezoid:– Euler step (a)– evaluate f1– full step using f1(b) – average (a) and (b)• Both O(h2)f1abMIT EECS 6.837Overview• Generate tons of particles• Describe the external forces with a force field• Integrate the laws of mechanics– Lots of differential equations ;-(• Each particle is described by its state– Position, velocity, color, mass, lifetime, shape, etc.• More advanced versions exist: flocks, crowdsDone!MIT EECS 6.837Particle AnimationAnimateParticles(n, y0, t0, tf){y = y0t = t0DrawParticles(n, y)while(t != tf) {f = ComputeForces(y, t)dydt = AssembleDerivative(y, f)//there could be multiple force fields{y, t } = ODESolverStep(6n, y, dy/dt)DrawParticles(n, y)}}MIT EECS 6.837What is a force? • Forces can depend on location, time, velocityImplementation:• Force a class– Computes force function for each particle p– Adds computed force to total in p.f• There can be multiple force sourcesMIT EECS 6.837Forces: gravity on Earth• depends only on particle mass:• f(X,t) = constant• for smoke, flame: make gravity point up!v0miGMIT EECS 6.837Forces gravity for N-body problem• Depends on all other particles• Opposite for pairs of particles• Force in the direction of pipjwith magnitude inversely proportional to square distance•Fij=PiPjG mimj/ r23MIT EECS 6.837Forces:• force on particle i depends only on velocity of I• force opposes motion• removes energy, so system can settle• small amount of damping can stabilize solver• too much damping makes motion like in gluedampingMIT EECS 6.837Forces: spatial fields• force on particle i depends only on position of i• arbitrary functions:–wind– attractors– repulsers– vortexes• can depend on time• note: these add energy, may need dampingMIT EECS 6.837Forces: spatial interaction• e.g., approximate fluid: Lennard-Jones force:• Repulsive + attractive force•O(N2) to test all pairs– usually only local– Use buckets to optimize. Cf. 6.839distanceforceMIT EECS 6.837Questions?MIT EECS 6.837Collisions• Detection• Response• Overshooting problem (when we enter the solid)MIT EECS 6.837Detecting collisions• Easy with implicit equations of surfaces• H(x,y,z)=0 at surface• H(x,y,z)<0 inside surface• So just compute H and you know that you’re inside if it’s negative• More complex with other surface definitions4MIT EECS 6.837Collision response• tangential velocity vbunchanged• normal velocity vnreflects:• coefficient of restitution• change of velocity = -(1+є)v• change of momentum Impulse = -m(1+є)v• Remember mirror reflection? Can be seen as photon particlesNvMIT EECS 6.837Collisions - overshooting• Usually, we detect collision when it’s too late: we’re already inside• Solutions: back up• Compute intersection point• Ray-object intersection!• Compute response there• Advance for remaining fractional time step• Other solution:Quick and dirty fixup• Just project back to object closest pointfixingbacktrackingMIT EECS 6.837Questions?MIT EECS 6.837Where do particles come from?• Often created by generators (or “emitters”)– can be attached to objects in the model• Given rate of creation: particles/second– record tlastof last particle created– create n particles. update tlastif n > 0• Create with (random) distribution of initial x and v– if creating n > 1 particles at once, spread out on pathMIT EECS 6.837Particle lifetimes• Record time of “birth” for each particle• Specify lifetime• Use particle age to:– remove particles from system when too old– often, change color– often, change transparency (old particles fade)• Sometimes also remove particles that are offscreenMIT EECS 6.837Rendering and motion blur• Particles are usually not shaded (just emission)• Often, they don’t contribute to the z-buffer (rendered last with z-buffer disabled)• Draw a line for motion blur – (x, x+vdt)• Sometimes use texture maps (fire, clouds)5MIT EECS 6.837Questions?MIT EECS 6.837Particle Animation [Reeves et al. 1983]• Star Trek, The Wrath of Kahn [Reeves et al. 1983]Start Trek, The Wrath of KahnMIT EECS 6.837How they did it?• One big particle system at impact• Secondary systems for rings of fire. MIT EECS 6.837Particle Modeling [Reeves et al. 1983]• The grass is made of particlesMIT EECS 6.837Other uses of particles• Water – E.g. splashes in lord of the ring river scene• Explosions in games• Grass modeling• Snow, rain• Screen saversMIT EECS 6.837Questions?6MIT EECS 6.837More advanced version• Flocking birds, fish school– http://www.red3d.com/cwr/boids/•CrowdsMIT EECS 6.837Flocks• From Craig Reynolds• Each bird modeled as a complex particle (“boid”)• A set of forces control its behavior• Based on location of other birds and control forcesMIT EECS 6.837Flocks•From Craig Reynolds•“Boid" was an abbreviation of "birdoid", as his rules applied equally to simulated flocking birds, and schooling fish. MIT EECS 6.837Questions?MIT EECS 6.837How would you simulate a string?• Each particle is linked to two particles• Forces try to keep the distance between particles constant• What force?MIT EECS 6.837Spring forces• Force in the direction of the spring and proportional to difference with rest length• K is the stiffness of the spring– When K gets bigger, the spring really wants to keep its rest lengthPiPjL0F7MIT EECS 6.837How would you


View Full Document

MIT 6 837 - Computer Animation Particle systems & mass-spring

Documents in this Course
Shadows

Shadows

64 pages

Animation

Animation

37 pages

Radiosity

Radiosity

25 pages

Color

Color

86 pages

InterArch

InterArch

14 pages

Color

Color

15 pages

Animation

Animation

61 pages

Luxo Jr

Luxo Jr

14 pages

Animation

Animation

52 pages

Radiosity

Radiosity

37 pages

Load more
Download Computer Animation Particle systems & mass-spring
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Computer Animation Particle systems & mass-spring and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Computer Animation Particle systems & mass-spring 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?