Download presentation
Presentation is loading. Please wait.
Published byFlora Green Modified over 9 years ago
1
Chenney/Forsyth Paper Chenney & Forsyth, 2000 AI CS 416
2
Basic goal To generate animations that both natural and satisfy other goals
3
Animations Physical simulations A vector describes “state” of the worldA vector describes “state” of the world Transition from one state vector to another according to laws of physicsTransition from one state vector to another according to laws of physics –p t+1 = p t + v t * dt –v t+1 = v t + a t * dt –a t = f t / m –f t = func (p t, v t ) Physical simulations A vector describes “state” of the worldA vector describes “state” of the world Transition from one state vector to another according to laws of physicsTransition from one state vector to another according to laws of physics –p t+1 = p t + v t * dt –v t+1 = v t + a t * dt –a t = f t / m –f t = func (p t, v t ) Given (f 0, v 0, p 0 ) this is an initial value problem and is easily simulated/animated
4
Animations Forward simulations Guarantee realismGuarantee realism –Explicitly follow rules of world Forward simulations Guarantee realismGuarantee realism –Explicitly follow rules of world
5
Animations Inverse simulation much harder Given (p t, v t ) what is f t-1Given (p t, v t ) what is f t-1 I see the ball here, but how did it get here?I see the ball here, but how did it get here? Inverse simulation much harder Given (p t, v t ) what is f t-1Given (p t, v t ) what is f t-1 I see the ball here, but how did it get here?I see the ball here, but how did it get here?
6
Likelihood of an animation p w (A) = probability ball bounce animation A is observed in world, w A ball bounces on flat table i times withA ball bounces on flat table i times with –normal vector controlling bounce –Gaussian (mean at 0º, std. dev. 10 degº) p w (A) = probability ball bounce animation A is observed in world, w A ball bounces on flat table i times withA ball bounces on flat table i times with –normal vector controlling bounce –Gaussian (mean at 0º, std. dev. 10 degº) Omitting normalization constant,
7
Constraints We want p w (A | C) ExamplesExamples We want p w (A | C) ExamplesExamples 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
8
Constraints Force the constraints to be true
9
Bayes’ Rule A = an animation is natural C = an animation satisfies constraints Chenney ignores denominator because it is the same for all animations and washes outChenney ignores denominator because it is the same for all animations and washes out P(C|A) becomes a new function P c (A)P(C|A) becomes a new function P c (A) P(A|C) becomes P(A)… prob of satisfying A and CP(A|C) becomes P(A)… prob of satisfying A and C A = an animation is natural C = an animation satisfies constraints Chenney ignores denominator because it is the same for all animations and washes outChenney ignores denominator because it is the same for all animations and washes out P(C|A) becomes a new function P c (A)P(C|A) becomes a new function P c (A) P(A|C) becomes P(A)… prob of satisfying A and CP(A|C) becomes P(A)… prob of satisfying A and C
10
How do we compute P(A|C) Could generate lots of examples… Select those that satisfy CSelect those that satisfy C In all those that satisfy C, how likely is AIn all those that satisfy C, how likely is A Generates many useless examples of bouncing ball that do not satisfy C Could generate lots of examples… Select those that satisfy CSelect those that satisfy C In all those that satisfy C, how likely is AIn all those that satisfy C, how likely is A Generates many useless examples of bouncing ball that do not satisfy C Rejection Sampling
11
How do we compute Generate any example animation, A Evaluate how likely is it in the real worldEvaluate how likely is it in the real world Evaluate how well it satisfies the (soft) constraintsEvaluate how well it satisfies the (soft) constraints Generate any example animation, A Evaluate how likely is it in the real worldEvaluate how likely is it in the real world Evaluate how well it satisfies the (soft) constraintsEvaluate how well it satisfies the (soft) constraints
12
Ball example p w (A) p c (A) p w (A) p c (A) Gaussian function defined on final position of ball, d
13
We’re onto something here Our goal is to find animations that are likely and satisfy constraints Animations with high P(A|C)Animations with high P(A|C) Because it’s hard to find animations that satisfy constraints exactly, we’ll be satisfied with animations that are likely and come close to satisfying constraints Animations with high P(A)P c (A)Animations with high P(A)P c (A) Animations with high P(A)P c (A) are likely to also have high P(A|C) so let’s search… Our goal is to find animations that are likely and satisfy constraints Animations with high P(A|C)Animations with high P(A|C) Because it’s hard to find animations that satisfy constraints exactly, we’ll be satisfied with animations that are likely and come close to satisfying constraints Animations with high P(A)P c (A)Animations with high P(A)P c (A) Animations with high P(A)P c (A) are likely to also have high P(A|C) so let’s search…
14
Searching for likely candidates Sampling Given an animation, A, how “good” is itGiven an animation, A, how “good” is it Could a simple change to A make it better?Could a simple change to A make it better?Sampling Given an animation, A, how “good” is itGiven an animation, A, how “good” is it Could a simple change to A make it better?Could a simple change to A make it better?
15
Markov Chain Monte Carlo Markov chain Given a sequence of events, the present state is only dependent on the preceding state and independent of the previous statesGiven a sequence of events, the present state is only dependent on the preceding state and independent of the previous states –Only the present influences the future –The past doesn’t influence the future Monte Carlo Using random numbers to solve a problemUsing random numbers to solve a problem Markov chain Given a sequence of events, the present state is only dependent on the preceding state and independent of the previous statesGiven a sequence of events, the present state is only dependent on the preceding state and independent of the previous states –Only the present influences the future –The past doesn’t influence the future Monte Carlo Using random numbers to solve a problemUsing random numbers to solve a problem
16
MCMC Algorithm Compute p(A 0 ) Use markov model to perturb degree-of-freedom values from A i Compute p(A c )
17
MCMC Algorithm How likely is proposal of A i given A c How likely is proposal of A c given A i
18
Ball example Transition probability, q First term = prob of choosing particular set of degrees of freedom to changeFirst term = prob of choosing particular set of degrees of freedom to change Second term = prob of choosing any particular value for a degree of freedomSecond term = prob of choosing any particular value for a degree of freedom Transition probability, q First term = prob of choosing particular set of degrees of freedom to changeFirst term = prob of choosing particular set of degrees of freedom to change Second term = prob of choosing any particular value for a degree of freedomSecond term = prob of choosing any particular value for a degree of freedom n ball bounces, k were changed 10 values for normal (+/- 5)
19
MCMC Algorithm Key component propose (A c, A i )propose (A c, A i ) –“designed through intuitive reasoning and experimentation” –“use past experience as a guide” Key component propose (A c, A i )propose (A c, A i ) –“designed through intuitive reasoning and experimentation” –“use past experience as a guide”
20
MCMC Algorithm Provable feature of algorithm As i inf, samples are true reflection of probability distribution of modelAs i inf, samples are true reflection of probability distribution of model Sampling animation from the set of samples produces well-understood plausibilitySampling animation from the set of samples produces well-understood plausibility Provable feature of algorithm As i inf, samples are true reflection of probability distribution of modelAs i inf, samples are true reflection of probability distribution of model Sampling animation from the set of samples produces well-understood plausibilitySampling animation from the set of samples produces well-understood plausibility
21
2D Ball Solving for ball Keep p(A) small, take the log Solving for ball Keep p(A) small, take the log
22
2D Ball Lesson learned about standard dev too small most animations are improbable because they don’t land in correct place too large most animations are probable because they land within landing region but they miss the exact spot Tuning probability function, p(A) is tricky Lesson learned about standard dev too small most animations are improbable because they don’t land in correct place too large most animations are probable because they land within landing region but they miss the exact spot Tuning probability function, p(A) is tricky
23
Bowling Degrees of freedom Ball (diameter, initial position, initial velocity, initial angular velocity)Ball (diameter, initial position, initial velocity, initial angular velocity) Pin (initial position)Pin (initial position)Constraints Initial pins up, final pins downInitial pins up, final pins down Gibb’s DistributionGibb’s Distribution Lesson learned If constraints are too strict, iterative perturbations will not frequently “jump” from one legal animation to anotherIf constraints are too strict, iterative perturbations will not frequently “jump” from one legal animation to another Degrees of freedom Ball (diameter, initial position, initial velocity, initial angular velocity)Ball (diameter, initial position, initial velocity, initial angular velocity) Pin (initial position)Pin (initial position)Constraints Initial pins up, final pins downInitial pins up, final pins down Gibb’s DistributionGibb’s Distribution Lesson learned If constraints are too strict, iterative perturbations will not frequently “jump” from one legal animation to anotherIf constraints are too strict, iterative perturbations will not frequently “jump” from one legal animation to another Correctly up/down Haven’t moved much
24
Rolling Dice Normal function (for tabletop) Example from bouncing ball won’t workExample from bouncing ball won’t work –Nearby points should have similar normals (not independent) –Object bouncing in same place should use same normal each time Create “surface” using b-splinesCreate “surface” using b-splines –Degrees of freedom are control point heights, initial pos –Also use restitution and friction values at control points Normal function (for tabletop) Example from bouncing ball won’t workExample from bouncing ball won’t work –Nearby points should have similar normals (not independent) –Object bouncing in same place should use same normal each time Create “surface” using b-splinesCreate “surface” using b-splines –Degrees of freedom are control point heights, initial pos –Also use restitution and friction values at control points
25
Rolling Dice Lessons learned Creating a good proposal algorithm is difficultCreating a good proposal algorithm is difficult Algorithm finds first constraint satisfying animation (in one hour) and has hard time jumping to another satisfying animation (“many” hours)Algorithm finds first constraint satisfying animation (in one hour) and has hard time jumping to another satisfying animation (“many” hours) Lessons learned Creating a good proposal algorithm is difficultCreating a good proposal algorithm is difficult Algorithm finds first constraint satisfying animation (in one hour) and has hard time jumping to another satisfying animation (“many” hours)Algorithm finds first constraint satisfying animation (in one hour) and has hard time jumping to another satisfying animation (“many” hours)
26
Rolling Dice Constraints Any position/orientation at any timeAny position/orientation at any timeConstraints
27
Review 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? Getting a simulationGetting a simulation Selecting some degrees of freedomSelecting some degrees of freedom Building the MCMC algorithmBuilding the MCMC algorithm
28
Review What’s difficult? Building p(A|C) functionBuilding p(A|C) function –Tuning bouncing ball standard deviation –Authors used Gibbs distribution function to assist Building proposal functionBuilding proposal function –Dice example had simple proposal algorithm What’s difficult? Building p(A|C) functionBuilding p(A|C) function –Tuning bouncing ball standard deviation –Authors used Gibbs distribution function to assist Building proposal functionBuilding proposal function –Dice example had simple proposal algorithm
29
Review What’s difficult This is a search problemThis is a search problem –Global vs. local search –Requires infinite samples to be perfect ²Simulation time and search space size are realistic constraints on feasibility What’s difficult This is a search problemThis is a search problem –Global vs. local search –Requires infinite samples to be perfect ²Simulation time and search space size are realistic constraints on feasibility
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.