Simulation Level of Detail Or Doing As Little Work As Possible Jonathan Robbins Physically Based...

Preview:

Citation preview

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

Examples

Simulation ProxiesTilt-A-WhirlBumper Cars

Reducing LODPrairie Grass

Grouping ParticlesFountainGalaxy

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

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

Tilt-A-Whirl

- Angular position of platform on the track

- Angular position of the car on the platform

Parameters

Start State

Platforms accelerate

impactuser ),,,(

0

constant

0

constant

0

0

0

0

0

f

tI

tstart

whirlatilt

Run StateMotion in a steady state

impactuser ),,,(

0

rpm5.6

0

0

0

f

dt

dt

t

t

t

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

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

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

Stationary StateEverything is stationary

0

0

constant

0

0

constant

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

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

Simulation Cost

Bumper Cars

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

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

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

Future Work

Automated technique for modeling dynamic systems

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

LODs

Near Geometric 3D model

MediumVolumetric texture mapped onto vertical

polygon strips (“2.5D”)

FarStatic 2D Texture

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

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)

Wind PrimitivesTypesGentle BreezeGustWhirlwindBlast

Posture

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

Variation in Posture Index

A constant wind starts blowing

Samples

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

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

Future Work

Change sizes of patches at different LODs

Add different types of grass to scene

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

“Cluster” SystemP P P P P … P

F F F F F

P … P P … P

F F F F F

C C

SLOD vs No-SLOD

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

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

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

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

SLOD-Tree Implemtation

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

Overlapping ROIsEach ROI has its own uniform grid

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

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

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

Error Analysis

ab

bdir

aab

ba

mm

m

vmm

mv

)1(

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

Frame Rate for Fountain Simulation

Speed-up

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

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

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

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.

Recommended