Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
Unified Spray, Foam and Bubbles for Particle-Based Fluids
Markus Ihmsen et al.CGI 2012
Copyright of figures and other materials in the paper belongs original authors.
Presented by MyungJin Choi
2013.06. 06
Computer Graphics @ Korea University
MyungJin Choi | 2013. 06. 07 | # 2Computer Graphics @ Korea University
β’ Basic Knowledge
β’ Previous Works
β’ Contribution
Introduction
MyungJin Choi | 2013. 06. 07 | # 3Computer Graphics @ Korea University
Introduction: Basic Knowledge
Three Types of Approaches for Fluid
β’ Eulerian
Focus on Space(Grid)
β’ Lagrangian
Focus on Particle
β’ Hybrid approach
Eulerian + Lagrangian
MyungJin Choi | 2013. 06. 07 | # 4Computer Graphics @ Korea University
Introduction: Three Types of Approaches for Fluid
Eulerian Approach
β’ Eulerian approach
Focus on change of each spaces(grid)
β’ Grid-Based
Simulating Water and Smoke with an Octree Data StructureLosasso, F et al. / SIGGRAPH 2004
Fluid Animation with Dynamic MeshesKlingner, B et al. / SIGGRAPH 2006
Efficient Simulation of Large Bodies of Water by Coupling Two and Three Dimensional Techniques
Irving, G et al. / SIGGRAPH 2006
Real-Time Eulerian Water Simulation Using a Restricted Tall Cell GridChentanez, N et al. / SIGGRAPH 2011
MyungJin Choi | 2013. 06. 07 | # 5Computer Graphics @ Korea University
Introduction: Three Types of Approaches for Fluid
Lagrangian Approach
β’ Lagrangian approach
Focus on change of each particles
β’ Particle-Based
Two-Scale Particle SimulationSolenthaler, B et al. / SIGGRAPH 2011
MyungJin Choi | 2013. 06. 07 | # 6Computer Graphics @ Korea University
Introduction: Three Types of Approaches for Fluid
Hybrid Approach
β’ Hybrid approach
Eulerian(Grid) + Lagrangian(Particle)
β’ Pressure value can be modified by Eulerian methods
Hybrid Smoothed Particle HydrodynamicsRaveendran, K et al./ SIGGRAPH 2011
MyungJin Choi | 2013. 06. 07 | # 7Computer Graphics @ Korea University
Introduction: Previous Works
Grid-Based
β’ Using two types of gridβ’ Not real-time simulation
Animation of Open Water Phenomena with Coupled ShallowWater and Free Surface SimulationsThurey, N. et al. / SIGGRAPH 2006
Two-way Coupled SPH and Particle Level Set Fluid SimulationLosasso, F. et al. / TVCG 2008
β’ Using SPH and Particles Level-Set method
β’ Unwanted noise with FLIP
Real-Time Eulerian Water Simulation Using a Restricted Tall Cell GridChentanez, N et al. / SIGGRAPH 2011
β’ Real-time simulationβ’ Not focus on detail feature
MyungJin Choi | 2013. 06. 07 | # 8Computer Graphics @ Korea University
Introduction: Previous Works
Grid-Based
Realistic Animation of Fluid with Splash and FoamTakahashi, T. et al. / EUROGRAPHICS 2003
β’ Numerical problemsβ’ Restriction of time stepβ’ Hypothetical model
MyungJin Choi | 2013. 06. 07 | # 9Computer Graphics @ Korea University
Introduction: Previous Works
Particle-Based
β’ Numerical problemsβ’ Restriction of time stepβ’ Hypothetical model
A Layered Particle-Based Fluid Model for Real-Time Rendering of WaterBagar, F. et al. / EGSR 2010
MyungJin Choi | 2013. 06. 07 | # 10Computer Graphics @ Korea University
β’ Grid-Based
Be restricted to their grid-based method
Can be lost more detail feature
Not considered other feature
β’ Particle-Based
Does not distinguish between foam and fluid particles
Does not generate additional particles
Introduction: Previous Works
Weak Points of Previous Works
MyungJin Choi | 2013. 06. 07 | # 11Computer Graphics @ Korea University
Introduction:
Contribution
β’ Author propose a technique for adding diffuse material to Particle-Based fluid simulations
Not grid-based
β’ Difference from other works
β’ Can be used all particle methods
E.g. : WC SPH, PIC SPH, etc
Just relies on same type of material
β’ Only water particle
MyungJin Choi | 2013. 06. 07 | # 12Computer Graphics @ Korea University
β’ Diffuse Material Overview
Formation of Diffuse Material
β’ Advection and Dissolution Overview
Advection
Dissolution
Algorithm
MyungJin Choi | 2013. 06. 07 | # 13Computer Graphics @ Korea University
β’ How to classify diffuse material
Potential
β’ How to determine the amount of diffuse material
Energy
β’ How to determine property of diffuse particles
Sampling
Algorithm: Diffuse Material
Overview
MyungJin Choi | 2013. 06. 07 | # 14Computer Graphics @ Korea University
β’ Diffuse material means Foam, spray and bubble
It develops when the surface tension of water molecules is reduced and water mixes with air
Algorithm: Diffuse Material
How to classify diffuse materials
MyungJin Choi | 2013. 06. 07 | # 15Computer Graphics @ Korea University
β’ Remember below clamping function
It returns the value between 0 and 1
Algorithm: Diffuse Material
How to classify diffuse materials
I : input dataππππ₯ : user defined value ππππ : user defined value
π· πΌ, ππππ, ππππ₯ =min πΌ, ππππ₯ βmin πΌ, ππππ
ππππ₯ β ππππ
MyungJin Choi | 2013. 06. 07 | # 16Computer Graphics @ Korea University
β’ Trapped Air Air is trapped by impacts
β’ E.g. : when the lip of a wave hits shallow water In this case air is dragged under water
In this regions have high turbulencesβ’ To classify this regions the curl operator might
be good choice Because of turbulence
β’ But, author proposes to use relative velocities Because of unintended result of curl operator
Algorithm: Diffuse Material
How to classify Trapped Air
MyungJin Choi | 2013. 06. 07 | # 17Computer Graphics @ Korea University
β’ The amount of trapped air is larger when fluid particles move towards each other It can be measured by below function
β’ It has the value between 0 and 2
Algorithm: Diffuse Material
How to classify Trapped Air
1 β π£ππ β π₯ππ
( π£ππ =π£π βπ£π
π£π βπ£π, π₯ππ =
π₯π βπ₯π
π₯π βπ₯π)
MyungJin Choi | 2013. 06. 07 | # 18Computer Graphics @ Korea University
Algorithm: Diffuse Material
How to classify Trapped Air
i j
π₯ππ
π£π π£π
π£ππ
Move away from each other
i j
π₯ππ
π£π π£π
π£ππ
Move towards from each other
π£ππ π₯ππ
π£ππ β π₯ππ = -1
π = 2π
1 β π£ππ β π₯ππ = 2
π£ππ
π₯ππ
π£ππ β π₯ππ = 1
π = 0
1 β π£ππ β π₯ππ = 0
MyungJin Choi | 2013. 06. 07 | # 19Computer Graphics @ Korea University
β’ The scaled velocity difference
β’ The Potential of Trapped Air πΌπ‘π
Algorithm: Diffuse Material
How to classify Trapped Air
π£πππππ
=
π
π£ππ 1 β π£ππ β π₯ππ π(π₯ππ , β) ,
π π₯ππ , β = 1 βπ₯ππ
β, π₯ππ β€ β
0 , ππ‘βπππ€ππ π
πΌπ‘π = π· π£πππππ
, ππππ, ππππ₯ β π(π₯ππ , β)
MyungJin Choi | 2013. 06. 07 | # 20Computer Graphics @ Korea University
β’ Wave Crest At the crest of a wave, whitewater is created
β’ By strong wind or when the wave gets unstable
In this regions have high curvatureβ’ Curvature is used to classify this regions
The surface is locally convex
Algorithm: Diffuse Material
How to classify Wave Crest
MyungJin Choi | 2013. 06. 07 | # 21Computer Graphics @ Korea University
β’ The surface curvature It can be approximated with below function
β’ It has the value between 0 and 2
But it canβt distinguish convex from concave regions
β’ The angles between ππ and π₯ππ(relative position)
Algorithm: Diffuse Material
How to classify Wave Crest
ππ =
π
πππ =
π
(1 β ππ β ππ) β π(π₯ππ , β)
π: normalized surface normal
MyungJin Choi | 2013. 06. 07 | # 22Computer Graphics @ Korea University
β’ Wave Crest identifier ππ
Algorithm: Diffuse Material
How to classify Wave Crest
πππ = 0, π₯ππ β ππ β₯ 0
πππ π₯ππ β ππ < 0
ππ =
π
πππ
MyungJin Choi | 2013. 06. 07 | # 23Computer Graphics @ Korea University
β’ But, all convex regions doesnβt generate diffuse materials Only the fluid particle moves in normal
β’ Check this Using Additional function
Algorithm: Diffuse Material
How to classify Wave Crest
πΏππ£π =
0, π£π β ππ < 0.61, π£π β ππ β₯ 0.6
MyungJin Choi | 2013. 06. 07 | # 24Computer Graphics @ Korea University
β’ We finally gets the Potential of Wave Crest πΌπ€π
Algorithm: Diffuse Material
How to classify Wave Crest
πΌπ€π = π· ππ β πΏππ£π, ππππ, ππππ₯
ππ βΆ value for checking convexπΏππ£π: value for checking move direction
MyungJin Choi | 2013. 06. 07 | # 25Computer Graphics @ Korea University
β’ When the surface tension is decrease, diffuse material is generated Using Weber number
β’ But its exact computation requires to correctly model the change in surface tension
Because of this reason, kinetic energy is used
β’ The kinetic energy πΌπ
Algorithm: Diffuse Material
How to determine the amount of diffuse material
πΌπ = π· πΈπ,π , ππππ, ππππ₯ ,
πΈπ,π = 0.5πππ£π2
MyungJin Choi | 2013. 06. 07 | # 26Computer Graphics @ Korea University
β’ The number of diffuse particles ππ is
Algorithm: Diffuse Material
How to determine the amount of diffuse material
ππ = πΌπ(ππ‘ππΌπ‘π + ππ€ππΌπ€π)βπ‘
πΌπ: kinetic energyππ‘π: maximum number of diffuse particles of trapped airπΌπ‘π: potential of trapped airππ€π: maximum number of diffuse particles of wave crestπΌπ‘π: potential of wave crestβπ‘: time step
MyungJin Choi | 2013. 06. 07 | # 27Computer Graphics @ Korea University
β’ Property has velocity and position
Generated diffuse particles have cylinder shape
Algorithm: Diffuse Material
How to determine property of diffuse particles
MyungJin Choi | 2013. 06. 07 | # 28Computer Graphics @ Korea University
β’ Position of diffuse particle π₯π is
β’ Velocity of diffuse particle π£π is
Algorithm: Diffuse Material
How to determine property of diffuse particles
π₯π = π₯ + ππππ ππ1β² + ππ ππππ2
β² + β π£π
π = ππ ππ , π = ππ2π, β = πβ β βπ‘π£π
ππ, ππ , πβ β 0. . 1 πππ π‘βππ¦ πππ ππππππ π£ππππππππ
π£π = ππππ ππ1β² + ππ ππππ2
β² + π£π
MyungJin Choi | 2013. 06. 07 | # 29Computer Graphics @ Korea University
β’ Advection
Advection is about how to determine move of diffuse material
β’ Dissolution
It is about when diffuse particles are destroyed
Algorithm: Advection and Dissolution
Overview
MyungJin Choi | 2013. 06. 07 | # 30Computer Graphics @ Korea University
β’ Diffuse material is influenced from water by their environment
In air, small influenced
On surface, medium influenced
In water, highly influenced
β’ Three types of diffuse materials
Spray, foam and bubble
β’ It is classified by their position
Algorithm: Advection
Classify type of diffuse materials
MyungJin Choi | 2013. 06. 07 | # 31Computer Graphics @ Korea University
β’ The type of diffuse materials can be determined by two method
The gradient of the density field
The number of neighbors
β’ In authorβs all experiments
Less than 6 neighbors are considered as spray
More than 20 neighbors are considered as bubbles
All other cases are considered as foam
Algorithm: Advection
Classify type of diffuse materials
MyungJin Choi | 2013. 06. 07 | # 32Computer Graphics @ Korea University
β’ Spray Assume that the motion of spray is influenced by
external force πΉππ₯π‘ and gravity π
Using Euler-Cromer method, the velocity of a spray particle is updated as
The position is updated as
Algorithm: Advection
The motion of diffuse materials
π£π ππππ¦ π‘ + βπ‘ = π£π ππππ¦ π‘ + βπ‘(πΉππ₯π‘ π‘
π+ π)
π₯π ππππ¦ π‘ + βπ‘ = π₯π ππππ¦ π‘ + βπ‘π£π ππππ¦ π‘ + βπ‘
MyungJin Choi | 2013. 06. 07 | # 33Computer Graphics @ Korea University
β’ Foam Foam is purely advected according to the averaged
local fluid velocity
The position is updated as
Algorithm: Advection
The motion of diffuse materials
ππ ππ , π‘ + βπ‘ = πππ π‘ + βπ‘ πΎ(ππ π‘ β ππ π‘ , β)
ππΎ ππ π‘ β ππ π‘ , β,
π₯ππππ π‘ + βπ‘ = π₯ππππ π‘ + βπ‘ ππ ππ, π‘ + βπ‘
ππ π‘ + βπ‘ =ππ π‘ + βπ‘ β ππ π‘
βπ‘
f: fluid particlesd: diffuse particle
MyungJin Choi | 2013. 06. 07 | # 34Computer Graphics @ Korea University
β’ Bubble Bubble is advected according to the averaged local
fluid velocity
Bubble is governed by buoyancy
β’ Due to high density contrast of water and air
β’ Buoyancy counteracts gravity
The position is updated as
Algorithm: Advection
The motion of diffuse materials
π£ππ’π π‘ + βπ‘ = π£ππ’π π‘ + βπ‘(βπππ + ππ ππ π₯π, π‘ + βπ‘ β π£ππ’π π‘
βπ‘)
π₯ππ’π π‘ + βπ‘ = π₯ππ’π π‘ + βπ‘π£ππ’π π‘ + βπ‘
ππ: user defined valueππ: user defined value
MyungJin Choi | 2013. 06. 07 | # 35Computer Graphics @ Korea University
β’ Bubbles and spray doesnβt have life time
But if they becomes foam, have life time
β’ Life time is predetermined value
β’ Subtract time step form life time
β’ Large clusters of foam are more stable
Set the life time in relation to the generation potentials
Algorithm: Dissolution
When diffuse particles are destroyed?
MyungJin Choi | 2013. 06. 07 | # 36Computer Graphics @ Korea University
β’ The color of diffuse particles is determined by two algorithm
Ray Casting
Alpha Blending
Rendering
MyungJin Choi | 2013. 06. 07 | # 37Computer Graphics @ Korea University
β’ Ray Casting
Eye ray is cast through the diffuse volume with direction π
β’ Bounded by an axis aligned bounding box
With start point π₯π and end point π₯π With equally spaced intervals βπ₯
When ray reached to diffuse particle at point π₯, local volume density π π₯ is computed
β’ Finally, compute the radiance L
Rendering:
Ray Casting
MyungJin Choi | 2013. 06. 07 | # 38Computer Graphics @ Korea University
β’ The radiance L
It is in the range between zero and one
Rendering:
Ray Casting
πΏ π₯, π =
π=0
π
πβπ(ππ +πβπ)πβπ,
π =π₯ β π₯π βπ₯
, π ππ π’π ππ πππππππ π ππππ ππππ‘ππ
MyungJin Choi | 2013. 06. 07 | # 39Computer Graphics @ Korea University
β’ Final color πΆπ is
Rendering:
Alpha Blending
πΆπ= (1-πΏ π₯π , π )πΆπ + πΏ π₯π , π πΆπ
πΆπ: color of diffuse materialπΆπ: color of background
MyungJin Choi | 2013. 06. 07 | # 40Computer Graphics @ Korea University
β’ Author simulates 4 scenarios
Wave, Tower, Ship, Lighthouse
In all scenarios, use follow user defined values
β’ ππ€ππππ = 2, ππ€π
πππ₯ = 8
β’ ππ‘ππππ = 5, ππ‘π
πππ₯ = 20
β’ πππππ = 5, ππ
πππ₯ = 50
Results
MyungJin Choi | 2013. 06. 07 | # 41Computer Graphics @ Korea University
β’ Wave
Results
MyungJin Choi | 2013. 06. 07 | # 42Computer Graphics @ Korea University
β’ Tower
Results
MyungJin Choi | 2013. 06. 07 | # 43Computer Graphics @ Korea University
β’ Ship
Results
MyungJin Choi | 2013. 06. 07 | # 44Computer Graphics @ Korea University
β’ Light house
Results
MyungJin Choi | 2013. 06. 07 | # 45Computer Graphics @ Korea University
β’ Timings and particle counts for the presented show cases
Wave: 5s per frame
Tower: 92s per frame
Ship: 31s per frame
Light house: 27s per frame
Results
MyungJin Choi | 2013. 06. 07 | # 46Computer Graphics @ Korea University
β’ Resulting in visually plausible, highly detailed flow patterns
β’ The realism of fluid simulations is significantly improved especially for low resolution fluids
β’ But this dose not conserve mass
Conclusion