Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

36
Animation CS 551 / 651 Chenney/Forsyth Paper Chenney/Forsyth Paper Chenney & Forsyth, 2000

Transcript of Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Page 1: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

AnimationCS 551 / 651

Chenney/Forsyth PaperChenney/Forsyth PaperChenney/Forsyth PaperChenney/Forsyth Paper

Chenney & Forsyth, 2000

Page 2: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Results

ApplicationsApplications

• Atoms: 200 spheres and 100 water molecules in Atoms: 200 spheres and 100 water molecules in divided boxdivided box

• Cars: 4 multibody vehicles and 400 pendulaCars: 4 multibody vehicles and 400 pendula

• Robots: 20 eight-link manipulators throwing blocksRobots: 20 eight-link manipulators throwing blocks

• Avalanche: 300 rocks tumbling down mountainsideAvalanche: 300 rocks tumbling down mountainside

ApplicationsApplications

• Atoms: 200 spheres and 100 water molecules in Atoms: 200 spheres and 100 water molecules in divided boxdivided box

• Cars: 4 multibody vehicles and 400 pendulaCars: 4 multibody vehicles and 400 pendula

• Robots: 20 eight-link manipulators throwing blocksRobots: 20 eight-link manipulators throwing blocks

• Avalanche: 300 rocks tumbling down mountainsideAvalanche: 300 rocks tumbling down mountainside

Page 3: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Results

• Note average integration step vs. time between Note average integration step vs. time between discontinuitiesdiscontinuities

• Note average integration step vs. time between Note average integration step vs. time between discontinuitiesdiscontinuities

Page 4: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Results

Atoms for 2 secondsAtoms for 2 seconds

• Average integration stepAverage integration step

– Conservative Conservative advancement advancement slows downslows down

Atoms for 2 secondsAtoms for 2 seconds

• Average integration stepAverage integration step

– Conservative Conservative advancement advancement slows downslows down

Page 5: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Results

Atoms for 2 secondsAtoms for 2 seconds

• Total “work done” per Total “work done” per simulated objectsimulated object

– Retroactive detection Retroactive detection repeats a lot of workrepeats a lot of work

Atoms for 2 secondsAtoms for 2 seconds

• Total “work done” per Total “work done” per simulated objectsimulated object

– Retroactive detection Retroactive detection repeats a lot of workrepeats a lot of work

Page 6: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Results

Total timeTotal time

• 100 atoms100 atoms

– RD-1/30 = 0.142, TW = 0.147, CA = 1.15RD-1/30 = 0.142, TW = 0.147, CA = 1.15

• 200 atoms200 atoms

– RD -1/30 = 2.61, TW = .388, CA = 4.74RD -1/30 = 2.61, TW = .388, CA = 4.74

Total timeTotal time

• 100 atoms100 atoms

– RD-1/30 = 0.142, TW = 0.147, CA = 1.15RD-1/30 = 0.142, TW = 0.147, CA = 1.15

• 200 atoms200 atoms

– RD -1/30 = 2.61, TW = .388, CA = 4.74RD -1/30 = 2.61, TW = .388, CA = 4.74

Page 7: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Inspect the title

SamplingSampling

Plausible Solutions toPlausible Solutions to

Multi-body Constraint ProblemsMulti-body Constraint Problems

What’s the emphasis of this paper?What’s the emphasis of this paper?

SamplingSampling

Plausible Solutions toPlausible Solutions to

Multi-body Constraint ProblemsMulti-body Constraint Problems

What’s the emphasis of this paper?What’s the emphasis of this paper?

Page 8: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Randomness

Many details are ignored by simulationsMany details are ignored by simulations

• Randomness will replace these details with Randomness will replace these details with something that is good enough (plausible)something that is good enough (plausible)

Do you agree?Do you agree?

• A driving simulator with a random approximation to a A driving simulator with a random approximation to a bumpy road will better prepare its users for driving on bumpy road will better prepare its users for driving on a real roada real road

Many details are ignored by simulationsMany details are ignored by simulations

• Randomness will replace these details with Randomness will replace these details with something that is good enough (plausible)something that is good enough (plausible)

Do you agree?Do you agree?

• A driving simulator with a random approximation to a A driving simulator with a random approximation to a bumpy road will better prepare its users for driving on bumpy road will better prepare its users for driving on a real roada real road

Page 9: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Randomness

Multiple paths is a good thingMultiple paths is a good thing

• examplesexamples

Multiple paths is a good thingMultiple paths is a good thing

• examplesexamples

Multiple paths is a bad thingMultiple paths is a bad thing

• examplesexamples

Multiple paths is a bad thingMultiple paths is a bad thing

• examplesexamples

Page 10: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Finding a place for uncertainty

Feed-forward simulationsFeed-forward simulations

• Where?Where?

Optimal (goal-oriented) simulationsOptimal (goal-oriented) simulations

• What trouble do they cause?What trouble do they cause?

Feed-forward simulationsFeed-forward simulations

• Where?Where?

Optimal (goal-oriented) simulationsOptimal (goal-oriented) simulations

• What trouble do they cause?What trouble do they cause?

Page 11: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Incorporating Uncertainty

ppww (A) (A) = probability animation A would occur= probability animation A would occur

in the world in the world

• non-negativenon-negative

• finite integral over domainfinite integral over domain

• unnormalizedunnormalized

Example:Example:

• A ball bounces on flat table A ball bounces on flat table ii times with times with

– normal vector mean at 0 degreesnormal vector mean at 0 degrees

– standard deviation 10 degreesstandard deviation 10 degrees

ppww (A) (A) = probability animation A would occur= probability animation A would occur

in the world in the world

• non-negativenon-negative

• finite integral over domainfinite integral over domain

• unnormalizedunnormalized

Example:Example:

• A ball bounces on flat table A ball bounces on flat table ii times with times with

– normal vector mean at 0 degreesnormal vector mean at 0 degrees

– standard deviation 10 degreesstandard deviation 10 degrees

Page 12: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Introducing constraints

The randomness must not interfere with The randomness must not interfere with constraintsconstraints• ExamplesExamples

• We now want We now want ppww(A | C)(A | C)

The randomness must not interfere with The randomness must not interfere with constraintsconstraints• ExamplesExamples

• We now want We now want ppww(A | C)(A | C)

• The ball must start here and land thereThe ball must start here and land there

• The ball must go through this pointThe ball must go through this point

• The initial acceleration must be fooThe initial acceleration must be foo

• The ball must start here and land thereThe ball must start here and land there

• The ball must go through this pointThe ball must go through this point

• The initial acceleration must be fooThe initial acceleration must be foo

Page 13: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Ball example

Evaluating pEvaluating pww(A | C)(A | C)

Evaluating pEvaluating pww(A | C)(A | C)

• )( ii

bounceprob

Constraints

Page 14: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Ball example

Evaluating pEvaluating pww(A | C)(A | C)

Evaluating pEvaluating pww(A | C)(A | C)

• )( ii

bounceprob

Page 15: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Ball example

Trial and error is bound to failTrial and error is bound to fail

• Easy to start with constraint satisfaction and insert Easy to start with constraint satisfaction and insert intermediate bounces (but are they plausible)intermediate bounces (but are they plausible)

• Easy to model plausible bounces (but will they satisfy Easy to model plausible bounces (but will they satisfy constraints)constraints)

Sampling from pSampling from pww (A|C) is too difficult (A|C) is too difficult

Trial and error is bound to failTrial and error is bound to fail

• Easy to start with constraint satisfaction and insert Easy to start with constraint satisfaction and insert intermediate bounces (but are they plausible)intermediate bounces (but are they plausible)

• Easy to model plausible bounces (but will they satisfy Easy to model plausible bounces (but will they satisfy constraints)constraints)

Sampling from pSampling from pww (A|C) is too difficult (A|C) is too difficult

Page 16: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Loosening requirements

ppww(A): probability A occurs in real world(A): probability A occurs in real world

p(A): probability A occurs in world with p(A): probability A occurs in world with relaxed constraints (maybe not realistic) relaxed constraints (maybe not realistic)

• ppcc(A) = prob A satisfies constraints(A) = prob A satisfies constraints

• Removed conditional probabilityRemoved conditional probability

ppww(A): probability A occurs in real world(A): probability A occurs in real world

p(A): probability A occurs in world with p(A): probability A occurs in world with relaxed constraints (maybe not realistic) relaxed constraints (maybe not realistic)

• ppcc(A) = prob A satisfies constraints(A) = prob A satisfies constraints

• Removed conditional probabilityRemoved conditional probability

Page 17: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Ball example

ppww(A)(A)

ppcc(A)(A)

ppww(A)(A)

ppcc(A)(A)

Gaussian function definedon final position of ball, d

Page 18: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Ball example

SamplingSampling

• Select animation, A, with high probabilitySelect animation, A, with high probability

• Select animation, A, from set with high probabilitiesSelect animation, A, from set with high probabilities

SamplingSampling

• Select animation, A, with high probabilitySelect animation, A, with high probability

• Select animation, A, from set with high probabilitiesSelect animation, A, from set with high probabilities

Page 19: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Markov Chain Monte Carlo

Markov chainMarkov chain

• Given a sequence of events, the present state is only Given a sequence of events, the present state is only dependent on the preceding state and independent of the dependent on the preceding state and independent of the previous statesprevious states

– Only the present influences the futureOnly the present influences the future

– The past doesn’t influence the futureThe past doesn’t influence the future

– A random walk (why?)A random walk (why?)

Monte CarloMonte Carlo

• Using random numbers to solve a problemUsing random numbers to solve a problem

Markov chainMarkov chain

• Given a sequence of events, the present state is only Given a sequence of events, the present state is only dependent on the preceding state and independent of the dependent on the preceding state and independent of the previous statesprevious states

– Only the present influences the futureOnly the present influences the future

– The past doesn’t influence the futureThe past doesn’t influence the future

– A random walk (why?)A random walk (why?)

Monte CarloMonte Carlo

• Using random numbers to solve a problemUsing random numbers to solve a problem

Page 20: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

MCMC for animations

Identify degrees of freedomIdentify degrees of freedom

• What variables are you looking to solve for?What variables are you looking to solve for?

– Normal vectors on table, friction over surface, …Normal vectors on table, friction over surface, …

– The random variablesThe random variables

• Iteratively search for good values of these variablesIteratively search for good values of these variables

Identify degrees of freedomIdentify degrees of freedom

• What variables are you looking to solve for?What variables are you looking to solve for?

– Normal vectors on table, friction over surface, …Normal vectors on table, friction over surface, …

– The random variablesThe random variables

• Iteratively search for good values of these variablesIteratively search for good values of these variables

Page 21: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

MCMC Algorithm

Compute p(A0)

Use markov model to perturbdegree-of-freedom values from Ai

Compute p(Ac)

Page 22: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

MCMC Algorithm

How likely is change from parameters used to generateAc to parameters used for Ai

Page 23: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Ball example

Transition probability, qTransition probability, q

• First term = prob of choosing particular set of degrees First term = prob of choosing particular set of degrees of freedom to change of freedom to change

• Second term = prob of choosing any particular value Second term = prob of choosing any particular value for a degree of freedom for a degree of freedom

Transition probability, qTransition probability, q

• First term = prob of choosing particular set of degrees First term = prob of choosing particular set of degrees of freedom to change of freedom to change

• Second term = prob of choosing any particular value Second term = prob of choosing any particular value for a degree of freedom for a degree of freedom

n ball bounces

10 values for normal (+/- 5)

Page 24: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

MCMC Algorithm

Key componentKey component

• propose ( )propose ( )

– ““designed through intuitive reasoning and designed through intuitive reasoning and experimentation”experimentation”

– ““use past experience as a guide”use past experience as a guide”

Key componentKey component

• propose ( )propose ( )

– ““designed through intuitive reasoning and designed through intuitive reasoning and experimentation”experimentation”

– ““use past experience as a guide”use past experience as a guide”

Page 25: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

MCMC Algorithm

Provable feature of algorithmProvable feature of algorithm

• As iAs i inf, samples are true reflection of probability inf, samples are true reflection of probability distribution of modeldistribution of model

• Sampling animation from the set of samples produces Sampling animation from the set of samples produces well-understood plausibilitywell-understood plausibility

Provable feature of algorithmProvable feature of algorithm

• As iAs i inf, samples are true reflection of probability inf, samples are true reflection of probability distribution of modeldistribution of model

• Sampling animation from the set of samples produces Sampling animation from the set of samples produces well-understood plausibilitywell-understood plausibility

Page 26: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

2D Ball

Probability Probability functionfunction

Take the logTake the log

Probability Probability functionfunction

Take the logTake the log

Page 27: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

2D Ball

Lesson learned about standard devLesson learned about standard dev too small too small most animations are improbable most animations are improbable

because they don’t land in correct placebecause they don’t land in correct place

too large too large most animations are probable because most animations are probable because they land within landing region but they miss the they land within landing region but they miss the exact spotexact spot

Tuning probability function, p(A) is trickyTuning probability function, p(A) is tricky

Lesson learned about standard devLesson learned about standard dev too small too small most animations are improbable most animations are improbable

because they don’t land in correct placebecause they don’t land in correct place

too large too large most animations are probable because most animations are probable because they land within landing region but they miss the they land within landing region but they miss the exact spotexact spot

Tuning probability function, p(A) is trickyTuning probability function, p(A) is tricky

Page 28: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Bowling

Degrees of freedomDegrees of freedom

• Ball (diameter, initial position, initial velocity, initial angular Ball (diameter, initial position, initial velocity, initial angular velocity)velocity)

• Pin (initial position)Pin (initial position)

ConstraintsConstraints

• Initial pins up, final pins downInitial pins up, final pins down

Lesson learnedLesson learned

• If constraints are too strict, iterative perturbations will not If constraints are too strict, iterative perturbations will not frequently “jump” from one legal animation to another frequently “jump” from one legal animation to another

Degrees of freedomDegrees of freedom

• Ball (diameter, initial position, initial velocity, initial angular Ball (diameter, initial position, initial velocity, initial angular velocity)velocity)

• Pin (initial position)Pin (initial position)

ConstraintsConstraints

• Initial pins up, final pins downInitial pins up, final pins down

Lesson learnedLesson learned

• If constraints are too strict, iterative perturbations will not If constraints are too strict, iterative perturbations will not frequently “jump” from one legal animation to another frequently “jump” from one legal animation to another

Page 29: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Rolling Dice

Normal function (for tabletop)Normal function (for tabletop)

• Example from bouncing ball won’t workExample from bouncing ball won’t work

– Nearby points should have similar normals (not Nearby points should have similar normals (not independent)independent)

– Object bouncing in same place should use same normal Object bouncing in same place should use same normal each timeeach time

• Create “surface” using b-splinesCreate “surface” using b-splines

– Degrees of freedom are control point heights, initial posDegrees of freedom are control point heights, initial pos

– Also use restitution and friction values at control pointsAlso use restitution and friction values at control points

Normal function (for tabletop)Normal function (for tabletop)

• Example from bouncing ball won’t workExample from bouncing ball won’t work

– Nearby points should have similar normals (not Nearby points should have similar normals (not independent)independent)

– Object bouncing in same place should use same normal Object bouncing in same place should use same normal each timeeach time

• Create “surface” using b-splinesCreate “surface” using b-splines

– Degrees of freedom are control point heights, initial posDegrees of freedom are control point heights, initial pos

– Also use restitution and friction values at control pointsAlso use restitution and friction values at control points

Page 30: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Rolling Dice

Lessons learnedLessons learned

• Creating a good proposal algorithm is difficultCreating a good proposal algorithm is difficult

• Algorithm finds first constraint satisfying animation (in Algorithm finds first constraint satisfying animation (in one hour) and has hard time jumping to another one hour) and has hard time jumping to another satisfying animation (“many” hours)satisfying animation (“many” hours)

Lessons learnedLessons learned

• Creating a good proposal algorithm is difficultCreating a good proposal algorithm is difficult

• Algorithm finds first constraint satisfying animation (in Algorithm finds first constraint satisfying animation (in one hour) and has hard time jumping to another one hour) and has hard time jumping to another satisfying animation (“many” hours)satisfying animation (“many” hours)

Page 31: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Rolling Dice

ConstraintsConstraints

• Any position/orientation at any timeAny position/orientation at any time

ConstraintsConstraints

• Any position/orientation at any timeAny position/orientation at any time

Page 32: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Review

What’s easy about this?What’s easy about this?

• Getting a simulationGetting a simulation

• Selecting some degrees of freedomSelecting some degrees of freedom

• Building the MCMC algorithmBuilding the MCMC algorithm

What’s easy about this?What’s easy about this?

• Getting a simulationGetting a simulation

• Selecting some degrees of freedomSelecting some degrees of freedom

• Building the MCMC algorithmBuilding the MCMC algorithm

Page 33: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Review

What’s difficult?What’s difficult?

• Building p(A|C) functionBuilding p(A|C) function

– Tuning bouncing ball standard deviationTuning bouncing ball standard deviation

– Authors used Gibbs distribution function to assistAuthors used Gibbs distribution function to assist

• Building proposal functionBuilding proposal function

– Dice example had simple proposal algorithmDice example had simple proposal algorithm

What’s difficult?What’s difficult?

• Building p(A|C) functionBuilding p(A|C) function

– Tuning bouncing ball standard deviationTuning bouncing ball standard deviation

– Authors used Gibbs distribution function to assistAuthors used Gibbs distribution function to assist

• Building proposal functionBuilding proposal function

– Dice example had simple proposal algorithmDice example had simple proposal algorithm

Page 34: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Review

What’s difficultWhat’s difficult

• This is a search problemThis is a search problem

– Global vs. local searchGlobal vs. local search

– Requires infinite samples to be perfectRequires infinite samples to be perfect

² Simulation time and search space size are Simulation time and search space size are realistic constraints on feasibilityrealistic constraints on feasibility

What’s difficultWhat’s difficult

• This is a search problemThis is a search problem

– Global vs. local searchGlobal vs. local search

– Requires infinite samples to be perfectRequires infinite samples to be perfect

² Simulation time and search space size are Simulation time and search space size are realistic constraints on feasibilityrealistic constraints on feasibility

Page 35: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Big Picture

How to synthesize animations that How to synthesize animations that accomplish specific goalsaccomplish specific goals

• KeyframingKeyframing

• SimulationSimulation

• Motion captureMotion capture

Data-driven simulation is a compromiseData-driven simulation is a compromise

How to synthesize animations that How to synthesize animations that accomplish specific goalsaccomplish specific goals

• KeyframingKeyframing

• SimulationSimulation

• Motion captureMotion capture

Data-driven simulation is a compromiseData-driven simulation is a compromise

Page 36: Animation CS 551 / 651 Chenney/Forsyth Paper Chenney & Forsyth, 2000.

Next Class

Hodgins, O’Brien, Tumblin. Perception of Hodgins, O’Brien, Tumblin. Perception of Human Motion with Different Geometric Human Motion with Different Geometric Models.Models.

Hodgins, O’Brien, Tumblin. Perception of Hodgins, O’Brien, Tumblin. Perception of Human Motion with Different Geometric Human Motion with Different Geometric Models.Models.