131 views

Uploaded by Denny Thanoto

- S-TN-WAV-001.pdf
- PAPER 1 PHYSICS FORM4 SBP 2007 MID YEAR
- Tutorial Sheet
- JSU Physics 1, 2, 3 - Zone a 2008
- Morison Coefficients for a Circular Cylinder Oscillating With Dual
- Course Objectives
- Physics – Unit 2 - Definitions
- [a.C. Melissinos
- Problems%20Set%2004%20with%20Solutions
- f 0253035041
- Wave-Lecture19_NPTEL
- Translational
- RPT-FIZIK
- 4420_2H_que_20090608
- Breasting Dolphin.pdf
- Year 6 Scienec for CES Worksheet
- brain pop quiz
- EXAM Rev 1 Biomechanics
- mooring cables
- Physics Requirement

You are on page 1of 24

Matthias Mller-Fischer

Intro

1999 1999-2001 2002 2004-2008 2008 Ph. D. ETH Zrich: Polymer simulation Post doc MIT: Simulation in CG Co-founder NovodeX (physics middleware) Head of research Ageia (SDK features) Research lead PhysX SDK at Nvidia

New Ideas Lessons learned so far

Hello World!

Use two arrays float u[N,M], v[N,M] Initialize u[i,j] with interesting function Initialze v[i,j]=0

loop v[i,j] +=(u[i-1,j] + u[i+1,j] + u[i,j-1] + u[i,j+1])/4 u[i,j] v[i,j] *= 0.99 u[i,j] += v[i,j] visualize(u[]) endloop

demo

Motivation

Thats it: Thank you for your attention!

The magic (physics) behind it Object interaction Boundary conditions More complex domains Barking waves Implement it yourself (use CUDA!) Soon:

Use the PhysX SDK: scene->createHeightfieldWater(..) Drop HF water into your game

Outline

Introduction

Fluids are cool! From offline to real-time

f = ma Simulation

Simulation of columns Boundaries Object interaction Horizontal motion

State of the art is impressive! Google Robert Bridson, Ron Fedkiw, James OBrien,

Gas

Liquids

Example

Typical setup

Grid size 5123 cells Linear system with >100 million unknowns! Level sets on even finer grids Raytracing (reflection / refraction / caustics)

Photorealistic results 10 seconds 50 minutes per frame! Recently real-time on a GPU (Crane et al.)

Coarser grid, simplified physics and rendering

Game Requirements

CHEAP TO COMPUTE!

Small fraction of the 15 ms of a frame

Kinematic, fast moving objects / characters

Get as close as possible to off-line results Meet all these constraints!

Solutions

Resolution reduction

Blobby and coarse look Details disappear

Reduction dimension 3d 2d Physics low-res, appearance hi-res (shader effects) Simulate active and visible regions only (sleeping) Level of detail (LOD)

Approaches

Procedural Water

Unbounded surfaces, oceans

Particle Systems

Splashing, spray, puddles, smoke

Ponds, lakes, rivers

Procedural Animation

Simulate the effect, not the cause

[Fournier86], [Hinsinger02], [Bridson07], [Yuksel07]

Pros

High level of control No limits to creativity (e.g. superimpose sine waves)

Cons

Modeling fluid-scene interaction more difficult Less realistic

demo

Fluid is represented as a set of particles

[Monaghan92], [Premoze03], [Mller03]

Pros

Particle simulation is fast and quite simple Spray, splashing, small puddles, blood, runnels, debris

Cons

Surface tracking difficult

Screen space meshes [Mller07]

demo

Elastic solid:

a f

Membrane:

change of velocity per unit time

Simulation Loop (explicit Euler integration): compute force (based on actual positions and velocities) velocity += force/mass time step position += velocity time step

Example: Particle

Need to store position and velocity!

v1 v1 t m v1 fg v2

fg/mt v2 t v3 fg v3 t v2 fg/mt

Smoke, debris Liquid (e.g. SPH)

fcollision

finter-particle

finter-particle

u u

y x continuous i

discrete

2d function u(x,y) 2d array u[i,j]

Pro: Cons:

Position = column height Velocity = change of column height per time unit (h = column width)

v = ut u

Force

Force causes waves to travel at speed c in all directions

demo

Constant Slope

Wave Equation

Newtons Law (continuous):

utt = f /m = kuxx /m

utt = c2uxx

Solution: u(x,t) = f (x + ct) + g (x - ct) for any f,g Constant c is the speed at which waves travel

Curvature

uxx[i] ux[i-] ux[i+]

u[i-1]

u[i]

u[i+1]

ux[i-]=(u[i]-u[i-1])/h ux[i+]=(u[i+1]-u[i])/h

uxx[i]=(ux[i+]-ux[i-])/h =(u[i+1]-2u[i]+u[i-1])/h2

1d curvature:

(u[i+1]+u[i-1]-2u[i])/h2

2d curvature:

(u[i+1,j]+u[i-1,j]+u[i,j+1]+u[i,j-1]-4u[i,j])/h2

1d simulation

forall i f v[i] unew[i] endfor forall i: = c2*(u[i-1] + u[i+1] 2u[i])/h2 = v[i] + f*t = u[i] + v[i]*t u[i] = unew[i]

2d simulation

forall i,j f = c2*(u[i+1,j]+u[i-1,j]+u[i,j+1]+u[i,j-1] 4u[i,j])/h2 v[i,j] = v[i,j] + f*t unew[i,j] = u[i,j] + v[i]*t endfor forall i,j: u[i,j] = unew[i,j]

Some Remarks

Information can only propagate 1 cell per time step Upper limit for choice of wave speed c < h /t or upper limit for choice of time step t < h/c (CourantFriedrichsLewy (CFL) condition)

Boundary conditions needed

Clamp yields wave reflection Wrap yields periodic propagation

Numerical Explosions

Explicit Euler step x += vt Assumes velocity constant during a time step

Particle sample:

vt v

Damping force (physically correct)

f = -kv

v = sv // s < 1, smaller time step -> stronger effect

offset = (u[i+1,j]+u[i-1,j]+u[i,j+1]+u[i,j-1])/4 u[i,j] maxOffset = maxSlope * h // independence of resolution h: if (offset > maxOffset) u[i,j] += offset maxOffset if (offset < -maxOffset) u[i,j] += offset + maxOffset

Object Interaction

Object water

Object pushes columns beneath it down Add the removed water in the vicinity!

Water object

Archimedes' principle Each column below the object applies force f = -uh2g to body at its location u is the height replaced by the body, water density, g gravity

Body below water surface Hole appears above the body Non-physical

Solution

New state variable r[i,j]:

Each column stores the part r[i,j] of u[i,j] currently replaced by solids

u[i,j]

r[i,j] = rt[i,j]-rt-1[i,j] is distributed as water u to the neighboring columns In case of a negative difference water is removed

Water Rendering

Reflection e n r

cube map

n Refraction e

Unbounded domain

Simulations in tank not practical for games Solution: Hybrid Simulation

3d-2d Simulation

N. Thuerey et al., Animation of Open Water Phenomena with coupled Shallow Water and Free Surface Simulations, SCA 06

Open Boundaries

Let waves with speed c pass freely Use ghost column on border with height memory g

u h

(gnew g)/t = -c(gnew- u)/h

Update rule:

gnew = (ctu + gh) / (h + ct)

Demos

Irregular Domain

Sparse tiling (top view)

reflecting end of level

open

Horizontal Motion

We only work with vertical velocities Horizontal velocity for dragging floating objects

v[i]

v[i-1]

Du/Dt = -uv Dv/Dt = -g(u+b) + aext Oversimplified:

Compressible Eulerian fluid simulation on a 2d staggered horizontal grid Density interpreted as height

Demo

Water Loss

Big problem in Euler / level set simulations Less problematic in height field fluids Simple, bullet proof solution:

V = i,j u[i,j] Vnew = i,j unew[i,j] Distribute V-Vnew evenly Within connected regions!

Height fields cannot capture breaking waves Identify steep wave fronts Construct and track line along front Emit patch of connected particles Generate mesh with given thickness for rendering (plus particles for foam)

Breaking Waves

References

[Bridson07] [Fournier86] [Hinsinger02] [Jeffrey02] [Monaghan92] [Mller07] [Mller03] [OBrien95] [Premoze03] [Teschner03] [Thuerey07] [Thuerey06] [Yuksel07] R. Bridson et al., Curl noise for procedural fluid flow, Siggraph 07 A. Fournier and W. T. Reeves. A simple model of ocean waves, SIGGRAPH 86, pages 7584 D. Hinsinger et al., Interactive Animation of Ocean Waves, In Proceedings of SCA 02 A. Jeffrey, Applied Partial Differential Equations, Academic Press, ISBN 0-12382252-1 J. J. Monaghan, Smoothed particle hydrodynamics. Annual Review of Astronomy and Astrophysics, 30:543574, 1992. M. Mller et al., Screen Space Meshes, SCA 07. M. Mller et al., Particle-Based Fluid Simulation for Interactive Applications, SCA 03, pages 154-159. J. OBrien and J. Hodgins, Dynamic simulation of splashing fluids, In Computer Animation 95, pages 198205 S. Premoze et al., Particle based simulation of fluids, Eurographics 03, pages 401-410 M. Teschner et al., Optimized Spatial Hashing for Collision Detection of Deformable Objects, VMV 03 N. Thuerey et al., Real-time Breaking Waves for Shallow Water Simulations Pacfific Graphics 07 N. Thuerey et al., Animation of Open Water Phenomena with coupled Shallow Water and Free Surface Simulations, SCA 06. Cem Yuksel et al., Wave Particles, Siggraph 07

Questions?

- S-TN-WAV-001.pdfUploaded byAhmet Rasim Bozkurt
- PAPER 1 PHYSICS FORM4 SBP 2007 MID YEARUploaded byruslawati
- Tutorial SheetUploaded byjai
- JSU Physics 1, 2, 3 - Zone a 2008Uploaded byPeter Chai
- Morison Coefficients for a Circular Cylinder Oscillating With DualUploaded bygertruna3
- Course ObjectivesUploaded byjaswid9607
- Physics – Unit 2 - DefinitionsUploaded byks01
- [a.C. MelissinosUploaded byLautaroAmadei
- Problems%20Set%2004%20with%20SolutionsUploaded byjutt4all
- f 0253035041Uploaded bytheijes
- Wave-Lecture19_NPTELUploaded byrak999
- TranslationalUploaded byMatt Taguinod
- RPT-FIZIKUploaded byMohamad Taufiq
- 4420_2H_que_20090608Uploaded bynakspatel94
- Breasting Dolphin.pdfUploaded byAye Hlaing Min
- Year 6 Scienec for CES WorksheetUploaded byRhieza Perez Umandal
- brain pop quizUploaded byapi-290509627
- EXAM Rev 1 BiomechanicsUploaded byuhbfouin
- mooring cablesUploaded byphandv
- Physics RequirementUploaded byVinky Santos
- MSP Tutorial StillLife Complete v1.4Uploaded byFaz Diapason
- ap physics b - newton s first and second lawUploaded byapi-268715686
- Alzofon - Anti-Gravity wth Present Technology - Implementation and Theoretical Foundation - 1981.pdfUploaded byAnonymous b2k9ABe7e
- engineeringmechanics-140217225140-phpapp01.pdfUploaded byesu
- 273472Uploaded byManoel Freire
- Physics Project(Arvin)Uploaded byArvin Tolentino
- Mechanics Revision PaperUploaded byMOHAMMED ASIF
- WorkUploaded byJeoff Libo-on
- 249160001 9th Class Physics Paper Pattern 2013Uploaded byAnita Kumari
- The Neglected Facts of Science by Dewey B LarsonUploaded byJason Verbelli

- Pasar Oli Diperkirakan Cuma Naik 5 Persen - TribunnewsUploaded byDenny Thanoto
- Licensing Procedure - Gas TransportUploaded byDenny Thanoto
- xyz suratUploaded byDenny Thanoto
- Peraturan BKPMUploaded byDenny Thanoto
- map-jogjaUploaded byDenny Thanoto
- Perka 12 Tahun 2013 Ttg Perubahan Perka No. 5 Tahun 2013Uploaded bytravelerontherun
- Contoh Surat Perjanjian PinjamanUploaded byHikari Firuz Hafidz
- Indonesia_ Harnessing Its Potential _ KKRUploaded byDenny Thanoto
- UU No 25 Tahun 2007.Penanaman ModalUploaded byDenny Thanoto
- Dairy Industry Indonesia 2011Uploaded byanantowardono
- Apa UbudUploaded byDenny Thanoto
- Automotive Sales by Brand Jul2009-2010Uploaded byDenny Thanoto
- Perda DKI 8-2007.Ketertiban UmumUploaded byDenny Thanoto
- map-jogjaUploaded byDenny Thanoto
- PP No 2 Tahun 2005 Ttg Konsultan HAKIUploaded byDedy007

- Analysis of Prelude in C minorUploaded byTom Daher
- Excel VBA ReferenceUploaded byilp70
- c Objective Questions and Answers PDFUploaded byragamalekhya
- HX-Z1_schemUploaded byEnrique
- RISK RPUploaded byayush
- VTU Network Lab Experiment Manual - NetSimUploaded byshulini
- Kimia Chapter 9Uploaded byMohammad Amir
- Physics 2nd Year Test (1)Uploaded byRashid Jalal
- FA130CP User ManualUploaded byukwanker2334
- matematika kuadratUploaded bymeunkk
- Atlas of Rock-Forming MineralsUploaded byBal Capone
- Selenium CommandsUploaded bykishore_cap19545
- SRD_PSI_V03.X5.10Uploaded byMartin Schweighart Moya
- Setting of CementUploaded byShivang Raghuvanshi
- 1.3 Mass and Weight Igcse - Cie - PhysicsUploaded bySrinivas Venkataraman
- Ultrasound PDMUploaded byMahesh Kumar
- LBCS color codesUploaded byAbhey Kaushal
- 01B 参考文献 Sanchez 2016Uploaded by方琳 徐
- Super-resolution MicroscopyUploaded byamitkkamble
- 2017_Silane-Treated Basalt Fiber–RF PBS Biocomposites Interfacial Crystallization and Tensile PropertiesUploaded bySubramani Pichandi
- bscLV-10Uploaded byEngr Nayyer Nayyab Malik
- SCP Service Control Point 032010 EnUploaded byGökhan Tuna
- AEHQ6132Uploaded byjcasafranca
- Elastic Analysis & Application Tables of Rectangular Plates [Artigo-papanikolaou]Uploaded byMelekeen
- GalileoUploaded byMildred Carreon Dela Paz
- Polyols-DigestionUploaded byTeo Soh Hoon
- AlgebraUploaded byIjzal J
- Parental Child-rearing Attitudes Are AssociatedUploaded byMariela Alcantara Yurivilca
- L08-1 d SettlementUploaded byChakshu Gautam
- Heat Pump (Lab report)-2 complete.docUploaded byNova April