Realistic and Interactive Realistic and Interactive Simulation of - - PowerPoint PPT Presentation

realistic and interactive realistic and interactive
SMART_READER_LITE
LIVE PREVIEW

Realistic and Interactive Realistic and Interactive Simulation of - - PowerPoint PPT Presentation

Realistic and Interactive Realistic and Interactive Simulation of Rivers Simulation of Rivers Peter Kipfer Rdiger Westermann Peter Kipfer Rdiger Westermann Havok Computer Graphics & Visualization Havok Computer Graphics &


slide-1
SLIDE 1

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Realistic and Interactive Realistic and Interactive Simulation of Rivers Simulation of Rivers

Rüdiger Westermann Rüdiger Westermann

Computer Graphics & Visualization Computer Graphics & Visualization Technische Universität München Technische Universität München westermann@in.tum.de westermann@in.tum.de

Peter Kipfer Peter Kipfer

Havok Havok peter.kipfer@havok.com peter.kipfer@havok.com

slide-2
SLIDE 2

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Motivation Motivation

  • Interactive physically-based simulation of water

Interactive physically-based simulation of water flowing on a terrain flowing on a terrain

  • Quick flow analysis

Quick flow analysis

  • Simulator environments

Simulator environments

  • Games

Games

  • Challenges

Challenges

  • Simulation

Simulation

  • Full particle interaction

Full particle interaction

  • Surface extraction

Surface extraction

  • Fast processing

Fast processing

  • Static memory footprint

Static memory footprint

  • Explicit representation

Explicit representation

slide-3
SLIDE 3

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Smoothed particle hydrodynamics Smoothed particle hydrodynamics

  • Lagrangian approach for fluid dynamics

Lagrangian approach for fluid dynamics [Müller2003]

[Müller2003]

  • Interpolate quantity A using smoothing kernel W

Interpolate quantity A using smoothing kernel W

  • Particle neighborhood queries

Particle neighborhood queries

  • Hierarchical search methods

Hierarchical search methods

  • Octree-based approach

Octree-based approach [Vemuri1998]

[Vemuri1998]

  • Linear complexity if bin size = 2*(max. particle diameter)

Linear complexity if bin size = 2*(max. particle diameter)

  • Dynamic memory allocation necessary

Dynamic memory allocation necessary

  • Sensitive to particle count and density

Sensitive to particle count and density

slide-4
SLIDE 4

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Neighborhood by linear search Neighborhood by linear search

  • Cache efficient

Cache efficient

  • Linear time complexity for traversal

Linear time complexity for traversal

  • Sort complexity O(n log n)

Sort complexity O(n log n) 1.

  • 1. Quantize domain to bins

Quantize domain to bins 2.

  • 2. Build particle id from bin

Build particle id from bin numbers: 0|i numbers: 0|iz

z|i

|iy

y|i

|ix

x

3.

  • 3. Sort according to id

Sort according to id 4.

  • 4. Collide with all left

Collide with all left neighbors until neighbors until id id ≤ ≤ (id (idself

self – 2)

– 2)

slide-5
SLIDE 5

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Staggered grid Staggered grid

  • For arbitrary dimensions

For arbitrary dimensions

  • Add one staggered grid

Add one staggered grid for every missing dimension for every missing dimension

  • Use leading bit per

Use leading bit per dimension processed to dimension processed to avoid redundant collisions avoid redundant collisions

  • Finds all neighbors

Finds all neighbors

  • Linear traversal

Linear traversal (fixed bin and fixed max. particle size) (fixed bin and fixed max. particle size)

  • Static memory footprint

Static memory footprint

  • Insensitive to particle count and density

Insensitive to particle count and density

slide-6
SLIDE 6

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Performance Performance

  • Staggered grid is

Staggered grid is faster by an faster by an

  • rder of
  • rder of

magnitude for magnitude for sparse systems sparse systems we target we target

  • Octree has huge

Octree has huge constant factor constant factor

[Vemuri1998] [Vemuri1998]

simulation steps per second simulation steps per second number of particles number of particles

  • ctree
  • ctree

staggered staggered grid grid

slide-7
SLIDE 7

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Optimized collision resolution Optimized collision resolution

  • Introduce „frozen“ particles

Introduce „frozen“ particles

  • Exclude from terrain collision

Exclude from terrain collision

  • Precision terrain collision avoids motion artifacts

Precision terrain collision avoids motion artifacts

  • Iterative backtracking of motion path (bisection)

Iterative backtracking of motion path (bisection)

  • Inelastic bounce using surface parameters

Inelastic bounce using surface parameters

  • Recompute path length accounting

Recompute path length accounting for velocity damping of collision for velocity damping of collision

height height n n bisection bisection

slide-8
SLIDE 8

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Surface extraction Surface extraction

  • Marching cubes or raycasting

Marching cubes or raycasting

  • Construct fluid free surface as level set of particle radii

Construct fluid free surface as level set of particle radii

  • Very high tessellation / small integration step size needed

Very high tessellation / small integration step size needed for detail for detail

  • High memory requirements / sampling artifacts

High memory requirements / sampling artifacts

  • Incremental update very difficult: no GPU storage

Incremental update very difficult: no GPU storage

  • Point splatting

Point splatting

  • Fast

Fast

  • Dense particle set needed

Dense particle set needed

  • No explicit surface representation

No explicit surface representation

  • High quality splats (surfels) need additional data per

High quality splats (surfels) need additional data per particle particle

slide-9
SLIDE 9

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Appearance Appearance

raytraced surface raytraced surface carpet surface carpet surface

slide-10
SLIDE 10

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

The carpet The carpet

  • Interactive display

Interactive display

  • Visualize every simulation step

Visualize every simulation step

  • Sparse particle set

Sparse particle set

  • Closed surface

Closed surface

  • Large terrains

Large terrains

  • Generate only where particles are

Generate only where particles are

  • Explicit surface representation

Explicit surface representation

  • Advanced rendering shaders

Advanced rendering shaders

  • Split / join handled

Split / join handled automatically automatically

slide-11
SLIDE 11

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

CPU carpet construction CPU carpet construction

1.

  • 1. Store all particles in quadtree

Store all particles in quadtree leaves leaves 2.

  • 2. Pull particle height up the tree

Pull particle height up the tree using max operation using max operation 3.

  • 3. Top-down traversal to leaf

Top-down traversal to leaf

a) a)render quad render quad b) b)accelerate position downwards accelerate position downwards

  • Constant memory footprint

Constant memory footprint

  • Linear complexity

Linear complexity

  • Multi-threaded

Multi-threaded

  • Step 1 folded into advection

Step 1 folded into advection

slide-12
SLIDE 12

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

GPU carpet construction GPU carpet construction

1.

  • 1. Create z-image and apply

Create z-image and apply gravity to carpet vertices gravity to carpet vertices 2.

  • 2. Splat particles to depth

Splat particles to depth image with z-test on image with z-test on 3.

  • 3. Render vertex array as

Render vertex array as triangle strip triangle strip

  • Minimal data upload

Minimal data upload

  • Incremental update

Incremental update

  • Provide shape for particle

Provide shape for particle using oriented depth sprites using oriented depth sprites

  • Efficient rendering possible (early z-test)

Efficient rendering possible (early z-test)

slide-13
SLIDE 13

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Carpet rendering Carpet rendering

  • Augmented rendering by using

Augmented rendering by using provided per vertex information provided per vertex information

  • Flow direction

Flow direction

  • Local speed

Local speed

  • Water depth

Water depth

  • Surface waves / wind

Surface waves / wind

  • Procedural gravity update

Procedural gravity update

  • Influence simulation

Influence simulation

  • Terrain surface adhesion

Terrain surface adhesion

  • Friction modulation („Wet map“)

Friction modulation („Wet map“)

  • Erosion

Erosion

slide-14
SLIDE 14

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Carpet optimization Carpet optimization

project down project down

  • High resolution carpet or very

High resolution carpet or very large terrain large terrain

  • Truncate quadtree

Truncate quadtree

  • Leaves contain a set of carpet bins

Leaves contain a set of carpet bins

  • Projection is very simple (mask on

Projection is very simple (mask on particle id) particle id)

  • Store resulting surface of pre-

Store resulting surface of pre- computed particle configurations computed particle configurations

  • High quality surface tension

High quality surface tension

  • Different rendering primitives for

Different rendering primitives for isolated parts isolated parts

  • LOD

LOD

slide-15
SLIDE 15

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Configuration examples Configuration examples

projected projected configuration configuration dual carpet dual carpet quadtree mesh quadtree mesh rendered carpet rendered carpet (side view) (side view)

slide-16
SLIDE 16

Carpet visualization Carpet visualization for real-time applications for real-time applications in extreme cases in extreme cases 68 fps 68 fps 3.000 3.000 particles particles

slide-17
SLIDE 17

Grand Canyon Grand Canyon

height field 4097x2049 height field 4097x2049

Large Geometric Models Archive Large Geometric Models Archive Georgia Institute of Technology Georgia Institute of Technology

26 fps 26 fps 8.000 8.000 particles particles Carpet visualization Carpet visualization

  • n complex terrain
  • n complex terrain
slide-18
SLIDE 18

Hersbruck Hersbruck

GIS data: 25m horizontal GIS data: 25m horizontal 1m vertical 1m vertical

Bayerisches Landesvermessungsamt Bayerisches Landesvermessungsamt München München

12.7 fps 12.7 fps 20.000 particles 20.000 particles Carpet visualization for environmental simulation Carpet visualization for environmental simulation

slide-19
SLIDE 19

Hersbruck Hersbruck

GIS data: 25m horizontal GIS data: 25m horizontal 1m vertical 1m vertical

Bayerisches Landesvermessungsamt Bayerisches Landesvermessungsamt München München

Carpet visualization for environmental simulation Carpet visualization for environmental simulation 12.7 fps 12.7 fps 20.000 particles 20.000 particles

slide-20
SLIDE 20

Instant visualization Instant visualization and simulation on and simulation on ultra-high resolution ultra-high resolution scan data scan data HRSC camera data HRSC camera data from single-pass from single-pass

  • verflight
  • verflight

Resolution: Resolution: 15 cm horizontal 15 cm horizontal 10 cm vertical 10 cm vertical

German Aerospace German Aerospace Center (DLR) Center (DLR) Institute of Robotics Institute of Robotics and Mechatronics and Mechatronics

slide-21
SLIDE 21

Highly interactive Highly interactive simulation of river simulation of river behavior behavior Carpet provides Carpet provides closed surface despite closed surface despite sparse particle set sparse particle set without hiding flow without hiding flow features or obscuring features or obscuring terrain detail terrain detail

German Aerospace German Aerospace Center (DLR) Center (DLR) Institute of Robotics Institute of Robotics and Mechatronics and Mechatronics

slide-22
SLIDE 22

Add textures using Add textures using the chromatic the chromatic HRSC channels HRSC channels

German Aerospace German Aerospace Center (DLR) Center (DLR) Institute of Robotics Institute of Robotics and Mechatronics and Mechatronics

slide-23
SLIDE 23

Füssen Füssen

HRSC scan HRSC scan 15 cm horizontal 15 cm horizontal 10 cm vertical 10 cm vertical

21 fps 21 fps 9.500 particles 9.500 particles

German Aerospace German Aerospace Center (DLR) Center (DLR) Institute of Robotics Institute of Robotics and Mechatronics and Mechatronics

slide-24
SLIDE 24

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Video Video

slide-25
SLIDE 25

Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec

  • P. Kipfer – Havok
  • P. Kipfer – Havok

Thanks for listening ! Thanks for listening ! Questions ? Questions ? Demo + Infos Demo + Infos http://wwwcg.in.tum.de/Research/Publications/ http://wwwcg.in.tum.de/Research/Publications/ RiverSim RiverSim