simulation level of detail or doing as little work as possible jonathan robbins physically based...

49
Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Upload: godwin-murphy

Post on 03-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Simulation Level of Detail

Or

Doing As Little Work As Possible

Jonathan Robbins

Physically Based Modeling, Simulation, and Animation

February 10, 2003

Page 2: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Definitions

Dynamics Simplification - Using a simplified motion model

Simulation Level of Detail - Reducing the level of detail in a simulation using dynamics simplification

Page 3: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Examples

Simulation ProxiesTilt-A-WhirlBumper Cars

Reducing LODPrairie Grass

Grouping ParticlesFountainGalaxy

Page 4: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Simulation Proxies

Stephen Chenney and David Forsyth. “View-Dependent Culling of Dynamic Systems in Virtual Environments”

Reduce simulation fidelity in regions outside the viewing area

Allow for strong, medium, and weak influence of the initial conditions

Examples: Tilt-A-Whirl and Bumper Cars

Page 5: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Influence of Initial Conditions

Strong – Viewer can predict state based on initial conditions accurately, so must simulateMedium – Viewer can make some qualitative predictionsWeak – Viewer can make no predictions, but can have expectations of state, based on physical principles

Page 6: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Tilt-A-Whirl

Page 7: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

- Angular position of platform on the track

- Angular position of the car on the platform

Parameters

Page 8: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Start State

Platforms accelerate

impactuser ),,,(

0

constant

0

constant

0

0

0

0

0

f

tI

tstart

whirlatilt

Page 9: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Run StateMotion in a steady state

impactuser ),,,(

0

rpm5.6

0

0

0

f

dt

dt

t

t

t

Page 10: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Chaotic Behavior in Run State

For 2 cars whose initial conditions vary by 10° and 10°/s

•Very hard to predict state and, after 9 seconds of virtual time, state can be sampled from a probability density

Page 11: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Stop State

Platforms slow down and stop

t

dt

dt

stop

f

t

t

0

0

0

impactuser ),,,(

0

0

f

dt

dt

t

t

Page 12: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Decay StateCars are still in motion, and energy is decaying as a damped

harmonic oscillator

1

0

0

0

0

constant

k

dt

dt

t

t

2k

Once the car’s angular velocity has dropped far enough, we can use a linear model

Page 13: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Stationary StateEverything is stationary

0

0

constant

0

0

constant

Page 14: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Re-entering ViewDetermine which phase the tilt-a-whirl is in and find a state which matches the last observationIn general, can integrate forward to get stateFor run state, can get state from probability distributionFor decay state, can determine energy remaining in system, and choose state accordinglyFor stationary state, only one option

Page 15: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Building the DistributionPhysically simulate the run state over a long time

Create discrete cells corresponding to ranges of states

At each step, increment a counter corresponding to the state the system is in

The probability of being in a state i is

jj

ii count

countP

Page 16: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Simulation Cost

Page 17: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Bumper Cars

Page 18: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Parameters

Position of each car on an elliptical track

Orientation and angular velocity of each car

Velocity of each car

State for each car is given by

,,,,, vur

Page 19: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Simulation

Use perturbed motion of 12 cars following an elliptical path

Sample the position of each car independently

If a collision occurs, move the cars so that they are farther apart, but their mutual center is maintained

Page 20: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Influence of Initial State

The uncertainty of the state of each car grows with time, making it harder for a viewer to predict where the cars ought to be

After sufficient time, the states of the car may be chosen from a distribution

Page 21: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Future Work

Automated technique for modeling dynamic systems

Page 22: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Prairie GrassFrank Perbert and Marie-Paule Cani. “Animating Prairies in Real-Time”Animate prairie grass in real-time3 LODs: Near, Medium, and FarPre-compute physically-based wind effects, and implement with procedural wind effects

Page 23: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

LODs

Near Geometric 3D model

MediumVolumetric texture mapped onto vertical

polygon strips (“2.5D”)

FarStatic 2D Texture

Page 24: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Transition: Near to Medium

Volumetric texture for a patch of grass generated from the 3D model

Linearly interpolate each blade of grass to its corresponding position on the texture map

Page 25: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Transition: Medium to Far

Without hills, simple cross dissolve is sufficient, since the 2D texture is far away

To improve appearance with hills, make 2.5 D texture polygons grow (vanish) from (into) the ground, while making the 2D texture vanish (appear)

Page 26: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Wind PrimitivesTypesGentle BreezeGustWhirlwindBlast

Page 27: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Posture

Range of motion for a blade of grass is computed using a physically-based model

Page 28: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Variation in Posture Index

A constant wind starts blowing

Page 29: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Samples

http://www-imagis.imag.fr/Membres/Frank.Perbet/prairie_dea/

Page 30: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

SpeedQuality Low Medium High

Nb. of blades per patch 160 320 500

2.5D distance range 3m - 8m 2m –12m 3m – 20m

Nb. Seg. Per blade of grass

3 4 8

Approx. nb. Blades per image

100,000 500,000 1,000,000

Frame rate on SGI O2 5 Hz 4 Hz 2 Hz

Frame rate on ONYX 25 Hz 12.5 Hz 8 Hz

Page 31: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Future Work

Change sizes of patches at different LODs

Add different types of grass to scene

Page 32: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Particle Systems

David O’Brien, Susan Fisher, and Ming Lin. “Automatic Simplification of Particle System Dynamics”

General approach: Group particles into clusters, calculate change in state for the entire cluster, and apply it to each particle

Page 33: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

“Cluster” SystemP P P P P … P

F F F F F

P … P P … P

F F F F F

C C

Page 34: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

SLOD vs No-SLOD

http://www.cs.unc.edu/~geom/SLOD

Page 35: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Regions of Interest

The desired resolution for different areas is specified

Higher resolution for places where accuracy is more importantCenter of viewNear point of collisions

Page 36: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

SLOD-Trees

Physically-based subdivision hierarchy Particles are grouped by location, assuming

particles close to each other will behave similarly Other parameters can be used to limit merging

Relative speed Angle between velocity vectors

Size determined by desired resolution and frame rate

Page 37: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

SLOD-Tree Implementation

Combination of k-D tree and uniform gridK-D tree allows adaptively partitioning particles based on the physical parameters of the particles (e.g. position, mass, velocity)Uniform grid provides a fast way to insert particles

Page 38: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

SLOD-Tree Implemtation

Cells of the uniform grid may serve as the root of a k-D tree

Page 39: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Overlapping ROIsEach ROI has its own uniform grid

ROIs ordered so that higher resolutions are “before” lower resolution

Page 40: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Updating Subdivisions

When a particle is inserted or a cluster crosses a subdivision boundary, the SLOD-tree is queried to determine where in the tree it should be

Cluster crosses implemented as bottom-up search, with occasional top-down searches to compensate for overlapping ROIs

Page 41: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Simulating Particle MotionUse the center of mass of the cluster

Update xcom and vcom using standard particle dynamics

Apply x and v to each particle in the cluster

pp

ppp

COM

pp

ppp

COM

m

vm

v

m

xm

x

Page 42: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Error Analysis

ab

bdir

aab

ba

mm

m

vmm

mv

)1(

Page 43: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Maintaining Frame Rate

When the frame rate deviates from the desired frame rate, the clustering parameters in each ROI are adjusted

This causes the simulation to speed up or slow down gradually as particles are repartitioned

Page 44: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Frame Rate for Fountain Simulation

Page 45: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Speed-up

Page 46: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Future Work

Maintain some internal motion of particles within clustersRelative motion with respect to center of

massStatistically based variations in v and x

Group particles to minimize differences in acceleration

Page 47: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Conclusion

Simulation ProxiesUseful when objects disappear from view

for a long time, but could returnRelies on the difficulty of the user to predict

stateGood for chaotic systems

Page 48: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

Conclusion

LODObjects are distantBehavior of the objects has little if any

influence on closer objects

Grouping ParticlesNeed to simulate many particlesMany particles have similar behavior

Page 49: Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based Modeling, Simulation, and Animation February 10, 2003

References

S. Chenney, J. Ichnowski and D.A.Forsyth. Dynamics Modeling and Culling. IEEE Computer Graphics and Applications, March/April 1999, pages 79-87.

S. Chenney and D. Forsyth. View-dependent culling of dynamic systems in virtual environments. In Proceedings 1997 Symposium on Interactive 3D Graphics, pages 55-58, 1997. Providence, RI.

F. Perbet and M. Cani. Animating Prairies in Real-Time. In Proceeding 2001 Symposium on Interactive 3D Graphics, pages 103-110, 2001.

D. O’Brien, S. Fisher, and M. Lin. Automatic Simplification of Particle System Dynamics. In Proceedings 2001 Computer Animation. 2001.