realistic and interactive realistic and interactive
play

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 &


  1. Realistic and Interactive Realistic and Interactive Simulation of Rivers Simulation of Rivers Peter Kipfer Rüdiger Westermann Peter Kipfer Rüdiger Westermann Havok Computer Graphics & Visualization Havok Computer Graphics & Visualization Technische Universität München Technische Universität München peter.kipfer@havok.com westermann@in.tum.de peter.kipfer@havok.com westermann@in.tum.de Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

  2. 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 Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

  3. 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 Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

  4. Neighborhood by linear search Neighborhood by linear search 1. Quantize domain to bins Quantize domain to bins 1. 2. Build particle id from bin Build particle id from bin 2. numbers: 0|i z |i y |i x numbers: 0|i z |i y |i x 3. Sort according to id Sort according to id 3. 4. Collide with all left Collide with all left 4. neighbors until neighbors until id ≤ ≤ (id (id self – 2) id self – 2) - 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) Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

  5. 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 Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

  6. Performance Performance - Staggered grid is Staggered grid is faster by an faster by an order of simulation steps per second order of simulation steps per second magnitude for magnitude for sparse systems sparse systems staggered staggered grid grid we target we target - Octree has huge Octree has huge constant factor constant factor [Vemuri1998] [Vemuri1998] octree octree number of particles number of particles Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

  7. 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 n n height height bisection bisection Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

  8. 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 Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

  9. Appearance Appearance raytraced surface carpet surface raytraced surface carpet surface Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

  10. 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 Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

  11. CPU carpet construction CPU carpet construction 1. Store all particles in quadtree Store all particles in quadtree 1. leaves leaves 2. Pull particle height up the tree Pull particle height up the tree 2. using max operation using max operation 3. Top-down traversal to leaf Top-down traversal to leaf 3. a)render quad render quad a) b)accelerate position downwards accelerate position downwards b) - Constant memory footprint Constant memory footprint - Linear complexity Linear complexity - Multi-threaded Multi-threaded - Step 1 folded into advection Step 1 folded into advection Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

  12. GPU carpet construction GPU carpet construction 1. Create z-image and apply Create z-image and apply 1. gravity to carpet vertices gravity to carpet vertices 2. Splat particles to depth Splat particles to depth 2. image with z-test on image with z-test on 3. Render vertex array as Render vertex array as 3. 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) Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

  13. 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 Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

  14. Carpet optimization Carpet optimization - High resolution carpet or very High resolution carpet or very large terrain large terrain - Truncate quadtree Truncate quadtree project down project down - 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 Graphics Interface 2006, Quebec Graphics Interface 2006, Quebec P. Kipfer – Havok P. Kipfer – Havok

Recommend


More recommend