1 Modeling Highly- Deformable Liquid Chih-Wei Chiu Computer Graphics and Geometry Modeling...
Transcript of 1 Modeling Highly- Deformable Liquid Chih-Wei Chiu Computer Graphics and Geometry Modeling...
1
Modeling Highly-Modeling Highly-Deformable LiquidDeformable Liquid
Chih-Wei ChiuChih-Wei ChiuComputer Graphics and Geometry Modeling LaboratoryComputer Graphics and Geometry Modeling Laboratory
National Chiao Tung UniversityNational Chiao Tung University
June 25, 2002June 25, 2002
Advisors: Cheng-Chung Lin and Jung-Hong Chuang
2
AgendaAgenda
IntroductionIntroduction Previous WorkPrevious Work MethodMethod ResultResult ConclusionConclusion
3
Modeling FluidsModeling Fluids
ParticlesParticles A particle represent a A particle represent a
fixed-mass fluid elementfixed-mass fluid element There may be There may be interaction interaction
forcesforces between particles between particles
VolumeVolume Partition the scene into many Partition the scene into many
cellscells Every cell carries a Every cell carries a density density
functionfunction representing the representing the proportionproportion of air and liquid of air and liquid
Surface can be Surface can be inferredinferred from from density functionsdensity functions
4
Computational AspectComputational Aspect ParticlesParticles
Number grows with Number grows with cubecube of resolution of resolution Computationally Computationally expensiveexpensive
VolumeVolume Only Only oneone equation for each cell to evolve equation for each cell to evolve
the density function (the density function (more on this latermore on this later)) Computationally Computationally economicaleconomical
5
Geometry AspectGeometry Aspect
ParticlesParticles No straightforward way to No straightforward way to
extract a extract a smoothsmooth surface surface Resolve details Resolve details
independentindependent of grid of grid resolutionresolution
VolumeVolume Iso-surfaceIso-surface can be extracted can be extracted
from the volume datafrom the volume data Potentially under-resolve Potentially under-resolve
details if the details if the grid is toogrid is too coarsecoarse
smooth
not smooth
6
Proposed MethodProposed Method
Since Since volume methodvolume method and and particlesparticles have have nearly “complemented” strength and nearly “complemented” strength and weakness…weakness…
CombinationCombination of particles and volume of particles and volume methodmethod Track initial fluid by Track initial fluid by volumevolume Resolve highly-deformed regions by Resolve highly-deformed regions by
particlesparticles
7
Previous WorkPrevious Work
Wave SimulationWave Simulation Surface is a parametric function can be animation Surface is a parametric function can be animation
over timeover time Fourier synthesis Fourier synthesis [Mastin ’87][Mastin ’87]
Wave-tracing Wave-tracing [Ts’o ‘87][Ts’o ‘87]
Particle SystemsParticle Systems Very heuristic, Very heuristic, CheapCheap computation computation Ship wakes Ship wakes [Goss ‘90][Goss ‘90]
Thin-film water splash Thin-film water splash [Ashraf ’99][Ashraf ’99]
Splash “subsystem”Splash “subsystem” – particles are generated when – particles are generated when the water surface is under impact the water surface is under impact [O’Brien ’95] [Mould ’97][O’Brien ’95] [Mould ’97]
8
MMolecular Dynamicsolecular Dynamics Simulate Simulate elasticelastic and and inelasticinelastic objects and viscous objects and viscous
fluidsfluids Computational expensive for Computational expensive for large volumelarge volume of fluid of fluid LackLack of coupling between velocity and pressure of coupling between velocity and pressure
SPH (Smoothed Particle Hydrodynamics)SPH (Smoothed Particle Hydrodynamics) Deformable object Deformable object [Desbrun’96][Desbrun’96]
Lava Lava [Stora ‘99][Stora ‘99]
AdvantagesAdvantages More More economicaleconomical than molecular dynamics than molecular dynamics CoupleCouple pressure and velocity pressure and velocity
Previous WorkPrevious Work
That’s why we choose it!
9
3-D Navier-Stokes Equations3-D Navier-Stokes Equations Produce the most realistic motion but are very Produce the most realistic motion but are very
computationally computationally expensiveexpensive InitiatedInitiated by Foster ’96 by Foster ’96
Used Used MACMAC formulation dated by 1965 formulation dated by 1965 Semi-Lagrangian integrationSemi-Lagrangian integration allows allows largelarge time step time step
without harming the accuracy without harming the accuracy [Stan’99][Stan’99]
Implicit SurfaceImplicit Surface Represent fluid volume by Represent fluid volume by a density functiona density function
[Kunimatsu ’01][Kunimatsu ’01] Hybrid model Hybrid model [Foster ’01][Foster ’01]
Dynamic Dynamic implicit surfaceimplicit surface Allow Allow particlesparticles to locally correct surface value to locally correct surface value
Previous WorkPrevious Work
10
OutlineOutline
Fluid dynamics solver
pn & vn
Partition the scene by a grid (only in the first
time-step)
grid
Evolve density functions
vn+1
Generate particles in the drastic motion region
Fn+1
Move particles by SPH
existing particles
new particles
Performed per time-step
Subdivision
Performed during rendering
Interpolation
high resolution grid
high resolution Fn+1
Convert particle
volumes to Fparticles positions
high resolution Fn+1 with particle volumes
Extract iso-surface
Rendered using a ray-tracer
polygon mesh
Our Methods !!!
Fn
11
Modeling SplashModeling Splash
ProblemProblem Grid may be too Grid may be too coarsecoarse to resolve the detail to resolve the detail
features in a surface cellfeatures in a surface cell Put particles in Put particles in allall surface cell is too surface cell is too
computational expensivecomputational expensive SolutionSolution
Introduce particles in the cell with Introduce particles in the cell with drastic drastic motionmotion
12
Drastic Motion CriterionDrastic Motion Criterion Seed particles in the Seed particles in the surface cellsurface cell with with drasticdrastic motion motion
xtu
Limit the maximum number of particles in a cellLimit the maximum number of particles in a cell Existing particles provides more accurate approximationExisting particles provides more accurate approximation
Fluid particle should not travel more than one cell
size in a time step; 0<γ<1
Fluid traveling
distance in a time step Lower Lower γ tends to produce more particles tends to produce more particles
13
Volume FractionsVolume Fractions
14
Particle SeedingParticle Seeding
Particles are Particles are randomlyrandomly positioned inside positioned inside the interface (fluid side)the interface (fluid side)
Particles velocities are Particles velocities are linearly linearly interpolatedinterpolated in the cell in the cell
u
v
Reconstructed interface
15
Interface ReconstructionInterface Reconstruction Approximate the interface by a plane Approximate the interface by a plane
ax+by+cz+d=0ax+by+cz+d=0(a,b,c)
Vf
NormalNormal is easy to compute, e.g. by is easy to compute, e.g. by spatial gradientsspatial gradients
Find Find dd so that the so that the “cut volume”“cut volume” given by given by the interface is the interface is VVf f [Scardovelii ‘00][Scardovelii ‘00]
Cut volume
16
Partition the scene by a grid (only in the first
time-step)
grid
Evolve density functions
Fn+1
Move particles by SPH
Subdivision
Performed during rendering
Interpolation
high resolution grid
high resolution Fn+1
Convert particle
volumes to Fparticles positions
high resolution Fn+1 with particle volumes
Extract iso-surface
Rendered using a ray-tracer
polygon mesh
Next Slide…Next Slide…
My own method !!!
17
Subdivision Volume Subdivision Volume FractionsFractions
Coarse grid Fine grid
Smooth surface
Subdivision &
interpolation
iso-surface extraction
Convert particles
volumes to F
Non-smooth surface
Non-smooth surface
Without subdivision & interpolation
Without converting particles to F
iso-surface extraction
iso-surface extraction
Small particles are directly rendered as
blobs
18
Why Blobs Doesn’t Work?Why Blobs Doesn’t Work?
Non-smooth surface
19
3x3x3 subdivision
Convert particles to
volume fractions
20
ResultResult Computational grid - 28x24x28Computational grid - 28x24x28 Simulation time per frame – Simulation time per frame – 8 ~ 60 sec8 ~ 60 sec Cycles per frame - Cycles per frame - 55 Average number of particles - Average number of particles - 500500 Rendering time per frame – Rendering time per frame – 1.5 ~ 4 min1.5 ~ 4 min Subdivision –Subdivision – 3x3x3 3x3x3
AMD Athlon 1000 MHZAMD Athlon 1000 MHZ 512 MB DRAM512 MB DRAM
21
Control the Number of Control the Number of ParticlesParticles
γ=0.2 γ=0.1
22
Comparison 1Comparison 1O'Brien,J.F.; Hodgins,J.K., "Dynamic Simulation of Splashing Fluids", in Proceedings of Computer
Animation '95, pp.198-205, 1995.
Mould,D.; Yang,Y.H., "Modeling Water for Computer Graphics", Computers & Graphics, vol.21, no.6, pp.801-814, 1997.
Generate particles when the vertical velocities of a column exceed a predefined threshold
Extend O’Brien et al.
Allow droplets to split.
23
Comparison 2Comparison 2
Enright,D.; Marschner,S.; Fedkiw,R., "Animation and Rendering of Complex Water Surfaces", in Procceeding os SIGGRAPH 2002, 2002 (to
appear).
Foster,N.; Fedkiw,R., "Practical Animation of Liquids", Computer Graphics, pp.23-30, 2001.
Hybrid model:
•Dynamic level set implicit surface.
•Marker particles locally correct surface.
Extend Foster ’01:
Put particles on both sides of the surface.
24
Comparison 3Comparison 3•Heuristic Approach
•Marker Particles
Identify drastic motion region and generate particles.
Place particles near the surface to capture drastic motion.
Autonomous particles moves independently of the fluid.
Passive particles velocities are interpolated from the grid node velocities.
25
ConclusionConclusion
A hybrid approach integrating A hybrid approach integrating particles particles (Lagrangian method)(Lagrangian method) and and volume volume fractions (Eulerian method)fractions (Eulerian method)
A scheme to identify A scheme to identify drastic motion drastic motion area and area and seed particlesseed particles
Smooth surface by Smooth surface by convertingconverting particles particles to volume fractionsto volume fractions