530 likes | 559 Views
Explore the dynamics of simulation in achieving desired outcomes amidst uncertainty and efficiency trade-offs. Discover how plausible simulation balances realism and computation costs. Learn about path planning proxies and simulation culling for faster, reliable results.
E N D
Uncertainty, Efficiency, and Desired Outcomes Stephen Chenney University of Wisconsin
Thought 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?
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:
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”
Physics 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
Viewers 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
Implications • Realistic physics includes imperfections • A given scenario might have many good outcomes • We choose specific simulations
Choosing Favorites • Efficiency: Choose a simulation that is cheap to compute • Direction: Choose an answer that meets the director’s goals
Simulation Culling • Large dynamic environments are costly • Reduce cost by ignoring out-of-view motion • Aim to retain plausibility
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
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
Strategy • 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
Direct 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
Measuring 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
Proxy 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 Dynamics Proxy dynamics
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
Fast 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
The 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 dt? dt? Time?
Event 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
Runtime 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 delays 1 delay
Performance • 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
Other 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
Culling 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
Choosing Favorites • Efficiency: Choose a simulation that is cheap to compute • Direction: Choose an answer that meets the director’s goals
Directing 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
Incorporating 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
Animation Distributions • Model the uncertainty in the world. • E.g. table with independent Gaussian normals. θ0 θ1
Directing • 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
Constrained Sampling • Restrict ourselves to choices for normals that meet constraints • Problem: Which normals meet the constraints? θ0 θ1
Sampling 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
New Ball Distribution θ0 θ1 d
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)
Properties 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
Proposal Strategies • Current Candidate animation • Aims: • Rapid exploration of state space • High probability of acceptance • E.g. Change some normals • Exploit domain specific knowledge
Dice • 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
Spelling Balls • Multi-body interactions • Randomly perturbed boxes • Balls from random positions
Bowling • Random initial ball location and speed • Different styles arise in samples • Perturbed pin locations • Won’t do “impossible” things
Rigid 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
Constrained 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
Measuring Plausibility • Extract random components implied by the motion • Look at the probability of seeing such random vectors = Observed Align + Cohere + Collision + Separate Random
Flocking 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
Other 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
Summary • 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
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)
Acknowledgements • 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
References • 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