animating real-time fluids in computer graphics
TRANSCRIPT
![Page 1: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/1.jpg)
ANIMATING REAL-TIMEFLUIDS IN COMPUTER GRAPHICSDR. PRASHANT GOSWAMIASSISTANT PROFESSORBLEKINGE INSTITUTE OFTECHNOLOGY, SWEDEN
https://[email protected]
KEYNOTE – Infoware/Visual 2021
![Page 2: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/2.jpg)
BRIEF BIO
• Assistant Professor, BTH Sweden (Nov 2014 – now)
• Postdoc, INRIA Grenoble (Aug 2013 – Oct 2014)
• Research Fellow, NTU Singapore (Mar 2012 – May 2013)
• PhD, University of Zurich (July 2007 – Dec 2011)Specialization Computer graphics (CG)
Animating fluids – water, clouds, snow Processing and rendering large data sets Geometric modeling
Artificial Intelligence in use of CG Data science
![Page 3: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/3.jpg)
INTRODUCTION
• Fluids ubiquitous in daily life
• Computer games
• Movies
• Virtual simulationsAmnesia: Dark descent Arkham KnightUncharted 4
The Day After Tomorrow 2012 Deep Impact
Movies - Fluids
Games - Fluids
![Page 4: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/4.jpg)
INTRODUCTION
• Focus differs
• Movies – Realism
• Games – Efficiency
Games - Snow
Realism Efficiency
Read Dead Redemption II The Last of us II
Games - Clouds
Sky Watch Dog
![Page 5: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/5.jpg)
MOTIVATION
• Efficiency is very important• Smart methods, eg. Level-of-
detail (LOD)
• GPUs have been around for long
• Massively parallel
• Artificial intelligence (AI)• Learns from data
• Many simulations can be real-timenow!
http://litchips.com/intel-patents-chip-to-chip-optoelectronic-bridge/
![Page 6: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/6.jpg)
PHYSICS ANIMATIONMY INTERESTS
• Fluids
• Clouds
• Snow
![Page 7: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/7.jpg)
FLUID SIMULATION
• Particle-based (Lagrangian)
• Smoothed Particle Hydrodynamics (SPH)
• More particles Better simulation
• More particles Slower simulation
• Need to accelerate SPH
![Page 8: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/8.jpg)
FLUID SIMULATIONLEVEL-OF-DETAIL
• Variable particle sizes disrupt physics
• LOD with uniform particles
• Simulation domains have inactive regions
• Assign different computational effort to different regions
Time Adaptive Approximate SPH, Goswami, VRIPHYS (2011)
![Page 9: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/9.jpg)
FLUID SIMULATIONLEVEL-OF-DETAIL
• Determine various regions in the fluid simulation (every iteration)
• Active – DO ALL PHYSICS COMPUTATIONS
• Passive – SKIP ALL PHYSICS COMPUTATIONS
• Transition region
• Semi-active – SOME COMPUTATIONS
• We save computation on all passive particles withlow activity
PASSIVE REGION
ACTIVE REGION
SEMI-ACTIVE REGION
![Page 10: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/10.jpg)
MOVIELEVEL-OF-DETAIL
Particles: 1 millionSpeed-up: 7x
![Page 11: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/11.jpg)
MOVIELEVEL-OF-DETAIL
![Page 12: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/12.jpg)
FLUID SIMULATIONREGIONAL TIME STEPPING
• Alternate to Freezing Particles
• Different time steps to different particles
• Based on activity
• Fast moving particles updated more frequently
• Slow moving particles updated less frequently
• No particle is ever frozen
Regional Time Stepping for SPH, Goswami & Batty,Eurographics short (2014)
![Page 13: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/13.jpg)
FLUID SIMULATIONREGIONAL TIME STEPPING
• Block-based architecture for time step assignment
• CFL condition used
Time steps by color: Δt, 2Δt, 3Δt
![Page 14: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/14.jpg)
FLUID SIMULATIONREGIONAL TIME STEPPING
• Move each particle at every iteration
• Compute force when required (Δt, 2Δt, 3Δt)
• Apply correction3Δt
2ΔtΔt
Force computation
![Page 15: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/15.jpg)
MOVIEREGIONAL TIME STEPPING
![Page 16: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/16.jpg)
FLUID SIMULATIONIISPH ON GPU
• Implicit Incompressible SPH
• Ported on GPU
• Nearly 6x faster thanOpenMP Implicit Incompressible SPH on the GPU, VRIPHYS (2015)
![Page 17: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/17.jpg)
PHYSICS ANIMATIONMY INTERESTS
• Fluids
• Clouds
• Snow
![Page 18: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/18.jpg)
CLOUDS
• Clouds are important in various domains
• Atmospheric science
• Computer graphics
• Various steps involved
• Modeling
• Rendering
• AnimationA survey of modeling, rendering and animation of clouds in computer graphics, Goswami, Visual Computer, 2020
![Page 19: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/19.jpg)
CLOUDS
• Cloud animation challenging
• Detailed data storage
• Cloud, surrounding air
• Detailed computations
• Real-time performance was out of question!
• Landscape-scale About 500K-1M particles simulated on GPUBarbosa et al. 2015
![Page 20: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/20.jpg)
CLOUDSPHYSICS + PROCEDURALISM
• We proposed a hybrid model
• Expensive Physics Macro level
• Rendering Micro level
• Rendering is controlled using physics
• Particle-based approach
• Operates at interactive frame rates
Real-time landscape-size convective clouds simulation and rendering, Goswami & Neyret, VRIPHYS, 2017
![Page 21: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/21.jpg)
CLOUDSPHYSICS + PROCEDURALISM
• Macro physics units parcels
• Implicit environment• Temperature with height• Humidity with height
• Forces on parcel• Gravity, bouyancy, air drag, atmospheric, SPH
• Mixing with environment• Entrainment, detrainment
• Physics inexpensive -- computed on CPU
![Page 22: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/22.jpg)
CLOUDSPHYSICS + PROCEDURALISM
• Output from physics
• Condensed fraction of water in each parcel (η)
• Visualization
• Hypertexture dependent on η
![Page 23: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/23.jpg)
CLOUDSPHYSICS + PROCEDURALISM
![Page 24: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/24.jpg)
CLOUDSMOVIE
Less than 100 parcels
![Page 25: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/25.jpg)
CLOUDSCLOUD MAP
• Improvement to previous method
• With increasing number of parcels• Parcel physics grows expensive• Hypertexture generation becomes exponentially
expensive
• Limited cloud shapes
• New method reduces parcel count significantly
• We still keep our hybrid approach of physicscontrolled proceduralism
Interactive animation of single-layer cumulus clouds usingcloud map, Goswami, STAG, 2019
![Page 26: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/26.jpg)
CLOUDSCLOUD MAP
• Obtain physics profile from a few parcels
• Project them onto a plane
• Use this planar texture to generatehypertexture
![Page 27: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/27.jpg)
CLOUDSCLOUD MAP
• 16 parcels employed
• Superimposing Physics profile on Noiseprofile
• Highly saves on
• Sphere-ray intersection tests whilegenerating hypertexture
• Physics when using many parcels
• Allows better cloud shapes
Noise profile Noise + Physics profile
![Page 28: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/28.jpg)
CLOUDSCLOUD MAP
![Page 29: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/29.jpg)
PHYSICS ANIMATIONMY INTERESTS
• Fluids
• Clouds
• Snow
![Page 30: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/30.jpg)
SNOW
• My recent research interest
• Snow animation highly challenging
• Complex physics
• Various states (solid, powder, …)
• Bonds
• Effect of temperature
• No prior real-time solution existed
![Page 31: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/31.jpg)
SNOW
• Purely particle-based approach
• GPU-based
• Supports both animation and rendering in real times
• Relatively large particle counts Real-time particle-based snow simulation on the GPU, Goswami et al., EGPGV, 2019
![Page 32: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/32.jpg)
SNOW
• Discretize snow into particles
• Snow ( rs ), Ice ( ri )
• Assign state to each particle based on radius
• η snow ratio, ( 1- η ) ice ratio
• Interpolate properties
• E = Es * η + Ei * (1 – η)
Density :ρs 100 – 800 kg/m3
ρi 800 – 900 kg/m3
rs ri
![Page 33: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/33.jpg)
SNOWFORCES
δ (+ve) δ (-ve)Cohesive
HagenMuller et al. 2015
![Page 34: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/34.jpg)
SNOWFORCES
Tangentialδ (+ve) δ (-ve)
Cohesive
HagenMuller et al. 2015
![Page 35: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/35.jpg)
SNOWBONDS
• Bonds crucial to capture correct snow behavior
• Particles with broken bond do not enter cohesion
• Memory intensive – expensive
• We introduce an approximation
• Set a threshold on
No bondsbroken
Bonds broken
![Page 36: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/36.jpg)
SNOWCOMPRESSION
• Compression caused due to opposing forces
• Durability (d)
• To account for trapped air
• Boundary particles mirror force
![Page 37: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/37.jpg)
SNOWRESULTS
• CUDA, C++
• Some parameters modified
Frame rates
![Page 38: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/38.jpg)
SNOWMOVIE
![Page 39: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/39.jpg)
PHYSICS ANIMATIONMY INTERESTS
• Fluids
• Clouds
• Snow
![Page 40: ANIMATING REAL-TIME FLUIDS IN COMPUTER GRAPHICS](https://reader030.vdocuments.net/reader030/viewer/2022013015/61d0620240c5282b8a5a5b2a/html5/thumbnails/40.jpg)