stephen chenney, university of wisconsinplausible simulation uncertainty, efficiency, and desired...

53
Stephen Chenney, University of Wisconsin Plausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Upload: regina-perry

Post on 29-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Uncertainty, Efficiency, and Desired OutcomesUncertainty, Efficiency, and Desired Outcomes

Stephen ChenneyUniversity of Wisconsin

Page 2: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Thought ExperimentsThought Experiments

• When someone says “I’ll be there in 10 minutes”, what do you expect?

• How long do you wait for someone who is late? Why?

Page 3: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

What is Simulation?What is Simulation?

• Simulation for graphics supports an experience, a story, a feeling …– It does NOT answer “What if?” questions

• A round ball bouncing on a flat table:

Science says: Experience says:

Page 4: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Plausible Simulation(Barzel, Hughes, Wood 96)Plausible Simulation(Barzel, Hughes, Wood 96)

• Many renditions of a single event may appear “plausible”– Reality is a messy thing we can’t hope

to accurately model– People are poor observers and can be

easily fooled

• Go for the right experience– But NOT the right “physics”

Page 5: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Physics is MessyPhysics is Messy

• Simulation models typically ignore messy parts of reality– Rough, dirty surfaces– Atmospheric effects– Collision response

• Imperfections lead to important effects

• Plausible simulation captures global effects of local imperfections

Page 6: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Viewers are HopelessViewers are Hopeless

• Film-makers have always known• It is hard for a viewer to anticipate the

correct outcome– Sometimes they have insufficient information– Viewers are often dead wrong (sound travels

through a vacuum?)

• Plausible simulation produces reasonable, but not “correct” outcomes

Page 7: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

ImplicationsImplications

• Realistic physics includes imperfections

• A given scenario might have many good outcomes

• We choose specific simulations

Page 8: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Choosing FavoritesChoosing Favorites

• Efficiency: Choose a simulation that is cheap to compute

• Direction: Choose an answer that meets the director’s goals

Page 9: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Simulation CullingSimulation Culling

• Large dynamic environments are costly

• Reduce cost by ignoring out-of-view motion

• Aim to retain plausibility

Page 10: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Stop Sign World(CAF2001)Stop Sign World(CAF2001)

• Medieval city– Can’t see far

• Car behavior:– Drive along streets– Queue behind other cars– Stop at stop signs– One car through intersection at a time– Random choices for where to turn

Page 11: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Plausibility?Plausibility?

• What determines plausibility?– Visible traffic densities – Measurable travel times– In view behavior

• What determines these things?– Knowledge of car locations– Accurate in-view simulation

Page 12: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

StrategyStrategy

• Jump out-of-view cars from place to place

• Don’t simulate braking, turning, accelerating, wheels, …

• If we get the jumps right, we get the right results

Page 13: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Direct ComparisonsDirect Comparisons

• Our jump-cars model generates different simulations– The timing of some jumps is not exact

• Direct comparison will thus find major differences– But one simulation is really no better

than the other• However, the statistics will be the

same

Page 14: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Measuring PlausibilityMeasuring Plausibility

• We wish to reason about many outcomes from a single phenomenon

• Probability and statistics are the tool• Measure statistics from the reference

solution• Compare to the cheaper solution

Page 15: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

City PlausibilityCity Plausibility

Page 16: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Faster too!Faster too!

Page 17: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Proxy SimulationsProxy Simulations

• Replace an out of view simulation with one that produces a similar event stream, a proxy

• What are the events?– An author decides

• What does similar mean?– Statistically the same

• What is the proxy?– Discrete event models Proxy dynamics

Dynamics

Page 18: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Path Planning(ACF2001)Path Planning(ACF2001)

• Path planning is a large part of game AI

• Biggest cost is avoiding other moving objects– Typically requires

checking for local neighbors on every frame

Page 19: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Fast Path PlanningFast Path Planning

• Static obstacles can be pre-processed– Pre-process: Shortest path b/w every pair of

obstacle vertices; space broken into regions that see the same obstacle vertices

– At run time: Find shortest path between vertex viz from start and one viz from end

• Dynamic objects handled at run time– If blocked, delay and wait for one to move– If nobody moves, re-plan– If objects are temporarily static, plan around

them

wait

wait

wait

Page 20: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

The Path Planning ProxyThe Path Planning Proxy• The static component is

fast enough – roughly constant time per command

• Events are arrival at intermediate nodes

• Problem: Time between waypoints depends on everyone else

Time?

dt?

dt?

Page 21: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Event TimingEvent Timing

• Avoiding other moving objects can only delay your journey– Each “collision” adds something

to your travel time

• Same for re-planning around temporarily static objects

• Model this delay as a random variable– Explicitly ensure same statistics

Page 22: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Runtime ProxyRuntime Proxy

• Spatial subdivision on the world

• Test for overlaps in objects’ paths

• For each overlap, sample a delay and add it to the travel time to the next waypoint

2 delays1 delay

Page 23: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

PerformancePerformance

• Increase the possible number of real-time objects by 100x

• But, some changes in behavior:– Completely blocked paths

are not detected– Not all statistics are same

Page 24: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Other Work on CullingOther Work on Culling

• Techniques for culling objects that don’t move far:– CF97, CIF99

• Techniques for simulation Level-Of-Detail:– Hopping robots (CH97), some look at stats to

verify plausibility– Graceful degradation of collision response

(DO2000) with subsequent user studies– Particle systems (OFL2001), no look at

plausibility

Page 25: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Culling ConclusionsCulling Conclusions

• Verify plausibility by looking at statistics

• Or explicitly use statistics to do out-of-view

• Massive speedups if we replace accurate with plausible simulation

Page 26: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Choosing FavoritesChoosing Favorites

• Efficiency: Choose a simulation that is cheap to compute

• Direction: Choose an answer that meets the director’s goals

Page 27: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Directing AnimationsDirecting Animations

• Plausibility is great for control• Lots of options – choose the one that

gives the desired outcome• Two domains:

– Collision intensive rigid-body systems– Group behaviors

Page 28: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Incorporating PlausibilityIncorporating Plausibility

• Add sources of randomness to a simulation model– Intended to capture unknowns in the

environment– Or inserted specifically for control,

relying on poor perception

• The result is a probability distribution over simulations

Page 29: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Animation DistributionsAnimation Distributions• Model the uncertainty in the world.• E.g. table with independent Gaussian normals.

θ0 θ1

2

102

1

)(

i

ep inorm

)(,...),()( 10

ii

norm

world

ppAp

Page 30: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

DirectingDirecting

• Choosing values for each random variable gives us an animation– Plausible choices (high probability) give

plausible animations

• To also meet constraints, choose values that also give the desired outcome – Ideally, sample from pworld(A|constraints)– Many possible choices

Page 31: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Constrained SamplingConstrained Sampling

• Restrict ourselves to choices for normals that meet constraints

• Problem: Which normals meet the constraints?

θ0 θ1

Page 32: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Sampling With ConstraintsSampling With Constraints

• Cannot, in general, sample directly– No direct method to satisfy the constraints

• Construct a new distribution– Animation satisfies constraints high

probability– Probability encodes the quality of a world

and an outcome– In other words, only things that do what we

want are plausible

Page 33: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

New Ball DistributionNew Ball Distribution

θ0 θ1

d

)()( ii

normalworld pAp

2

1.02

1

)(

d

constraint eAp

)()()( ApApAp constraintworld

Page 34: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Markov chain Monte Carlo (MCMC)Markov chain Monte Carlo (MCMC)• Generates samples from complex

distributions, like p(A)– Originated in statistical physics– Metropolis rendering - Veach 97– Constrained terrain - Szeliski & Terzopoulos

89

• Chain of samples localizes high-probability regions (good animations)

Page 35: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

MCMC AlgorithmMCMC Algorithm

)accept(

),1min(yprobabilit with

)simulate(),propose

)simulate()(initialize

)|()(

)|()(

0

0

c

iAcAqiApcAiAqcAp

c

ic

A

AA(A

AA

repeat

Page 36: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Properties of MCMCProperties of MCMC

• Generates a sequence of animations distributed according to p(A) – Certain technical conditions

(ergodicity) must be met

• If p(A) encodes plausibility, we will see plausible animations

Page 37: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Proposal StrategiesProposal Strategies

• Current Candidate animation• Aims:

– Rapid exploration of state space– High probability of acceptance– E.g. Change some normals

• Exploit domain specific knowledge

Page 38: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

DiceDice

• Dice are so hard to control that we use them as random number generators

• Bspline table

• Slightly random initial conditions• Control final position and orientation

Page 39: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Spelling BallsSpelling Balls

• Multi-body interactions

• Randomly perturbed boxes

• Balls from random positions

Page 40: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

BowlingBowling

• Random initial ball location and speed– Different styles arise in

samples

• Perturbed pin locations• Won’t do “impossible”

things

Page 41: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Rigid Body ConclusionsRigid Body Conclusions

• Plausibility can be ensured through the choice of algorithm– MCMC guarantees that the results come from

the correct distribution– The distribution is constructed to encode

plausibility

• Best when there are likely to be lots of solutions isolated in state-space

• Possible to include domain specific knowledge, if available

Page 42: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Constrained FlocksConstrained Flocks

• Problem: Make a simulated flock meet hard constraints– Randomness in agents’ motion

• Strategy:– Initial guess ensures

constraints are satisfied– Iterative phase makes the

result plausible

t=0

t=5

Media Clip

Page 43: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Measuring PlausibilityMeasuring Plausibility

• Extract random components implied by the motion

• Look at the probability of seeing such random vectors

Align + Cohere + Collision + Separate

Observed

=

Random

Media Clip

Page 44: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Flocking ConclusionsFlocking Conclusions

• Sometimes easier to enforce constraints then fix plausibility

• But need ways to measure plausibility of complex behaviors– Statistics give us the tools

• Needed: Better ways to compare distributions; exploration of which statistics are important

Page 45: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Other WorkOther Work

• Popović: Alternate solution methods for constrained collisions– Interactive speeds, but more restricted

domain (lower energy, fewer bodies)

• O’Sullivan et.al.: Perceptual measurements of what’s plausible– Talk in SIGGRAPH 2003

Page 46: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

SummarySummary

• Plausibility offers efficiency and control

• 4 ways to measure/verify plausibility– Verify by measuring statistics– Ensure by building correct stats into

model– Retain by sampling according to

probably outcomes– Measure by comparing statistics

Page 47: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

It should be possible…It should be possible…

• Merging efficiency and control– Exploit culling for control – make the car

run the red light in front of the driver– Real-time adaptation of game difficulty

• User interfaces– Saying what you want is hard– Presenting and categorizing classes of

solutions is difficult (Marks et al 96)

Page 48: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

AcknowledgementsAcknowledgements

• Funded by ONR MURI N00014-96-11200 and NSF CCR-0204372

• Thanks to D.A. Forsyth, Okan Arikan, Matt Anderson, Eric McDaniel and Andrew Selle

Page 49: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

ReferencesReferences

• ACF2001: Okan Arikan and Stephen Chenney and D. A. Forsyth, "Efficient Multi-Agent Path Planning", Eurographics Workshop on Animation and Simulation, pp 151-162, 2001

• CAF2001: Stephen Chenney and Okan Arikan and D.A.Forsyth, "Proxy Simulations For Efficient Dynamics", Proceedings of Eurographics, Short Presentations, 2001

• CF97: Stephen Chenney and David Forsyth, "View-Dependent Culling of Dynamic Systems in Virtual Environments", Symposium on Interactive 3D Graphics, pp55-58, 1997

• CIF99: Stephen Chenney and Jeffrey Ichnowski and David Forsyth, "Dynamics Modeling and Culling", IEEE CGA, 19(2), pp 79-87, 1999

• CF2000: Stephen Chenney and D.A. Forsyth, "Sampling Plausible Solutions to Multi-body Constraint Problems", SIGGRAPH, pp219-228, 2000

• CO96: Deborah A. Carlson and Jessica K. Hodgins, ”Simulation Levels of Detail for Real-time Animation", Graphics Interface '97, pp 1-8, 1997

• DO2000: J. Dingliana and C. O’Sullivan, “Graceful Degradation of Collision Handling in Physically Based Animation”, Computer Graphics Forum. Vol 19(2000), Number 3, pp 239-247

• OFL2001: David A. O'Brien, Susan Fisher and Ming Lin, "Simulation Level of Detail for Automatic Simplification of Particle System Dynamics", Computer Animation, 2001

Page 50: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Traffic EfficiencyTraffic Efficiency

Page 51: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Event TimingEvent Timing

Page 52: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Planning Dynamics TimePlanning Dynamics Time

Page 53: Stephen Chenney, University of WisconsinPlausible Simulation Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin

Stephen Chenney, University of Wisconsin Plausible Simulation

Planning EfficiencyPlanning Efficiency

Efficiency: Ratio of in-view work to total work