3D Wave Motion and Fluids - PowerPoint PPT Presentation

1 / 70
About This Presentation
Title:

3D Wave Motion and Fluids

Description:

When simulating waves there is a general tradeoff between being visually ... Snell's Law: Set n =1 for air and n = 4/3 for water. Light Transport: Within the Water ... – PowerPoint PPT presentation

Number of Views:116
Avg rating:3.0/5.0
Slides: 71
Provided by: Jess269
Category:
Tags: fluids | motion | snell | wave

less

Transcript and Presenter's Notes

Title: 3D Wave Motion and Fluids


1
(No Transcript)
2
2D Wave Motion and Fluids
  • Raylene Deck, Jamie Drummond, Jessica Ho Tyler
    Johnston

3
Overview
  • Basic wave formation
  • Fun stuff with fluids
  • Implementation
  • Demo
  • Questions

4
Motivation
  • Why do you want to create realistic waves?
  • Accurate wave simulation is vital in many
    applications
  • Tsunami impacts
  • Oil rig platforms
  • Engineering of ships
  • Nuclear coolant

5
Basic Wave Formation
  • Basic Concepts
  • Goals of Liquid Motion Animation
  • Navier-Stokes Equations
  • CFL Stability Condition
  • 3D Realistic Animation of Liquids
  • Mesh (Grid) Layout

6
Basic Concepts
  • When simulating waves there is a general tradeoff
    between being visually realistic versus
    physically accurate.
  • Provide enough physical realism to obtain goals,
    but in reasonable computational time
  • 2D implementation most common with Navier-Stokes
    implementation.

7
Goals of Liquid Motion Animation
  • Model and animate quickly on computer
  • Model how it interacts with traditional computer
    graphics environment
  • Allow model manipulation to break boundaries of
    real world physics
  • Create great looking pictures

8
Navier-Stokes Equations
  • Describes the motion of fluids
  • Take into account
  • Viscosity
  • Convection
  • Gravity
  • Pressure

9
Navier-Stokes Equations (contd)
  • Assumes that the fluid is continuous
  • Solution solves for the velocity of the fluid at
    a given point in space and time
  • Direct implementation of Navier-Stokes is not
    possible since Navier-Stokes is computationally
    intensive.
  • Discretize implementation of Navier-Stokes models
    are frequently used

10
Courant-Friedrichs-Levy (CFL) Stability Condition
  • Constraint of implementation where the time step
    must be within a certain factor in order for the
    algorithm to be stable
  • Allows the algorithm to converge to a solution
  • Large time steps will lead to more erroneous
    results.

11
3D Realistic Animation of Liquids
  • Goal Realistically animate liquid phenomena
  • Foundation Navier-Stokes with momentum and mass
    conservation to describe fluid motion
  • 3D modeling also takes into account
  • Buoyancy, convection, mass transport, submerged
    obstacles

12
3D Realistic Animation of Liquids (contd)
  • u, v, w are velocities
  • p is local pressure
  • g is gravity
  • v is viscosity of the fluid

13
3D Realistic Animation of Liquids (contd)
  • Discretizing Navier-Stokes in 3D
  • Solve for NS across the entire environment
  • Cells can either be
  • solid obstacle
  • full of fluid
  • surface cell
  • empty
  • Computationally expensive!!!

14
Grids and Meshes
  • Fluid surfaces and areas can be modeled on
    several bases
  • Quadtrees
  • Octrees
  • Polygon meshes

15
Quadtree
  • A point is directly effected by the four points
    around it, one in each direction
  • Primarily used for 2D animation
  • http//www.cs.wustl.edu/suri/cs506/projects/quad.
    html

16
Octree
  • A point is directly effected by the 8 points
    around it, one in each direction
  • Can be 2D or 3D based

17
Comparison
  • Quadtree is requires less computability and
    storage space, but is less visually accurate than
    octree which requires more computation and
    storage
  • In 2D, both grids only allow the points to move
    up and down, not side-to-side
  • 4 vs. 8 grid demo

18
Polygon Meshes
  • Useful for simulating changed in the density of
    gases, more dense, more polygons
  • The polygons change shape, location and size with
    each time step
  • Generalized Semi-Lagrangian step
  • Trace back from the position where velocity is
    stored in new mesh, xi, interpolate velocity
    using old mesh and velocity field, and update
    velocity in new mesh

19
(No Transcript)
20
Paddle Through Smoke Demo
21
Rendering Natural Waters
  • Simon Premoze, Michael Ashikhmin
  • Department of Computer Science
  • University of Utah

22
What to Consider?
  • One of the most daunting tasks in graphics
  • 3 Components to create realistic water
  • Atmospheric conditions
  • Wave generation
  • Light transport
  • We will only address the last 2 points

23
More To Consider
  • Reflectivity!
  • Water's reflectivity will vary between 5 and
    100
  • Reflected light from the bottom of the water
  • Scattered light from water volume itself
  • Scattering must be approximated well enough to
    recreate colours

24
Wave Generation
  • Assume that the surface waves are assembled from
    many linear waves generated by wind
  • The height of the water surface at the location x
    on the grid and time t is

25
Whitecaps and Foam
  • Whitecaps the foamy part of actively breaking
    waves
  • Total foam area depends on the temperature
    difference between the air and the water and on
    water chemistry

26
Whitecaps and Foam
  • Proper treatment of whitecaps and foam is really
    difficult! But we can approximate...
  • Let f be the fractional area of the wind-blown
    water surface that is covered by foam. Then..

27
Light Transport
  • Must consider the interaction of light with the
    water body
  • Split this into 2 major parts
  • Events on the surface
  • Light transport inside the water volume

28
Light Transport Across the Surface
  • If a ray hits a surface, it is split into
    reflected and refracted rays
  • Snell's Law
  • Set n 1 for air and n 4/3 for water

29
Light Transport Within the Water
  • Once photons from the sky and sun pass through
    the air-water surface,they initiate a complex
    chain of scattering and absorption events within
    the water body
  • The behavior of radiance within natural water
    bodies is governed by the radiance transfer
    equation
  • Finding radiance in water body extremely
    difficult. Even brute force requires enormous
    amounts of computation.
  • Need a different approach!

30
Light Field
  • Light field function that describes the amount
    of light traveling in every direction through
    every point in space
  • Assume existence of 2 light fields
  • Diffuse Field Radiance due to combined effect
    of light scattering through the media
  • Directional Radiance what we are interested in
    rendering

31
Radiance without so much Math
  • Equation gives apparent radiance just below the
    air/water surface L(0) of the target at depth z
    having its own radiance L(z)
  • Is the total path
    length
  • Is the diffuse radiance just below
    the sea surface

32
Turbidity
  • Turbidity cloudy or muddy appearance due to
    particles of matter suspended in water
  • Affects penetration of sunlight into a body of
    water
  • Ranges from 0 to 1
  • Can obtain chromaticity values for the
    transmittance per meter of water

33
(No Transcript)
34
(No Transcript)
35
(No Transcript)
36
Practical Animation of Liquids
  • Nick Foster
  • PDI/DreamWorks
  • Ronald Fedkiw
  • Stanford University

37
Goal
  • Present a general method of animating liquids as
    they move through a 3D environment and interact
    with graphics such as moving polygons and
    parametric curves

38
Algorithm
  • 1) Model the static environment as a voxel grid
  • 2) Model the liquid volume using a combination of
    particles and implicit surface
  • For each simulation time step
  • 3) Update the velocity field
  • 4) Apply velocity constraints due to moving
    objects
  • 5) Enforce incompressibility by solving a linear
    system
  • 6) Update the position of the liquid volume

39
Static Environment
  • Represent the environment that we want the liquid
    to move in as a rectangular grid of voxels with
    side length
  • Each cell has a pressure variable at its center
    and shares a velocity variable with each of its
    adjacent neighbours

40
Liquid Representation
  • Derived from a combination of inertialess
    particles (provides detail where the surface
    starts to splash) and dynamic isocontour
    (provides a smooth surface to regions of liquid)
  • Particles placed into the grid according to some
    liquid distribution
  • Their positions then evolve over time by a simple
    convection

41
Hybrid Surface Model
  • If a particle is more than a few grid cells away
    from, and inside the surface, then the particle
    is deleted
  • Increased efficiency since particles are only
    needed locally near the surface of a liquid as
    opposed to the whole volume
  • If cells are sparsely populated, extra particles
    are introduced
  • Improves surface resolution

42
Hybrid Surface Model
  • Next, determine if the surface is smooth
  • Smooth regions have low curvature and the
    particles are ignored
  • High curvature regions indicate splashing so we
    use particles

43
Hybrid Surface Model
  • Some particles will escape the inside of the
    liquid layer since the grid is too coarse to
    represent them
  • These particles can be rendered as small liquid
    drops
  • Some stray particles can be used as fine spray or
    mist

44
Non-Liquid Cells
  • Cells that do not contain particles are either
    empty (open air) or part of an object
  • If it is empty, its pressure is set to
    atmospheric pressure and velocity on each of its
    faces shared with another empty cell is set to 0
  • An object cell can have velocities and pressures
    set to many different combinations to approximate
    liquid flowing into an out of an environment or
    to approximate different object material
    properties

45
Liquid Surface
  • We need to make sure that the air does not mix or
    inhibit the motion of a liquid, while allowing it
    to flow freely into empty cells
  • Done by explicitly enforcing incompressibility
    within each cell that contains part of the liquid
    surface
  • Velocities adjacent to a liquid filled cell are
    left alone, whereas the others are set directly

46
Conservation of Mass
  • Conservation of mass is only satisfied in
    surface cells where we have explicitly enforced
    it
  • To do this, we solve the linear system of
    equations given by using the Laplacian operator
    to couple local pressure changes to the
    divergence of each cell

47
Moving Objects
  • Conditions that must be respected
  • 1)Liquid should not flow into the object
  • 2)Liquid should flow freely without interference
  • 3) The particles should never pass through any
    part of the surface of the object

48
Moving Objects
  • 3) is easily solved since we know where the
    polygons are that make the object surface and
    what direction they are moving
  • So we simply move the particles so they are
    always outside the surface of the object
  • To take care of 1), we directly set the component
    of liquid velocity normal to the object
  • 2) is taken care of by implementing an algorithm
    which the liquid is both pushed along by an
    object while being allowed to flow freely around
    it

49
(No Transcript)
50
(No Transcript)
51
(No Transcript)
52
BUBBLES
53
Simulation
  • Simulation is based off of Navier-Stokes
    equations for incompressible viscous fluids
  • u is velocity, p is pressure, v is viscosity, ?
    is density
  • f is an external force such as gravity, buoyancy,
    or surface tension

54
Traditional Level Set Method
  • Typical fluid simulators use a signed distance
    function ø to represent the interface
  • Magnitude of ø equals the distance from given
    point to an interface
  • ø gt 0 if in the gas region
  • ø lt 0 if in the liquid region
  • ø 0 if on the interface
  • Used in formulas for v and ?

55
Problem
  • The coloured portion is the
    actual film region, and the
    dashed line is the level
    set
    representation
  • The thinnest film is lost
  • Can only represent features
    whose smallest length
    scale is larger than size
    of grid cell

56
Regional Level Set Method
  • Region 1,2,... instead of liquid and gas
  • Regional scalar function
  • øR(X) ltR(X), S(X)gt
  • R(X) returns region code
  • S(X) returns distance to interface
  • Replace all ø(X) with øR(X)

57
(No Transcript)
58
Bubble Life Cycles
  • For bubbles transited from other materials, such
    as beer bubbles or boiling water, directly insert
    the bubble with a new region code

59
Bubble Life Cycles
  • Bubbles will persist until the liquid film
    ruptures
  • Change the region code of points contained in the
    two regions separated by the rupturing liquid
    film into the same region

60
Bubble Life Cycles
  • Liquid film ruptures when its thickness is too
    thin to resist the surface tension force
  • Drainage of liquid can occur down the film due to
    gravity
  • Stretching and shrinking of the film occur over
    time
  • Film thickness is based on region thickness of
    each bubble

61
ImplementationAlgorithm
  • 1. Define a grid for water height computation
  • 2. Apply initial deflections to some grid points
  • 3. Compute new water height values using wave
    profiles at two previous time moments
  • 4. Render the water surface
  • 5. If necessary apply height excitations at grid
    points (rain drops...)
  • 6. Go to step 3.

62
Implementation Details Wave Model
  • 128x128 Grid for Water Surface calculations -
    (from fast water animation corrected formula
    errors)
  • Physically accurate model with damping (waves
    decrease over time similar to concept of spring
    constant which resists the motion in the spring)
  • Lowering the constant increases the waters
    ability to move freely

63
Implementation Details Wave Model (contd)
  • For instance by lowering the damping constant by
    25 you could achieve the effect of going from
    water to a molasses type material in terms of
    viscosity and density (resists motion more,
    appears thicker)
  • Each point on the grid is calculated by taking
    its 8 neighboring points into account (including
    corner points) and computing a pseudo average of
    the heights at each neighbor on the grid over the
    previous two time steps.

64
Implementation Details Wave Model (contd)
  • After each time step the newly computed height
    value is drawn.
  • However, only 0.5 Corner point value is
    considered (circle of influence)
  • Discrete version of the Navier Stokes equation,
    which also takes into the CFL condition that a
    wave cannot move more than 1 unit per time
    iteration (1 grid point per time step).

65
ImplementationRain Model
  • Rain Grid of size (Water Grid / 2) x (Water Grid
    / 2) for ease of calculation
  • Rain grid is shifted to even and odd Grid Points
    at each time step to reduce the number of
    calculations required for rain grid computation
    (could probably reduce the grid by Water Grid / 4
    and still produce realistic simulation results).
  • Each rain drop is affected by gravity using the
    2D gravity model for distance calculations
    (calculated at each time step dt)

66
ImplementationRain Model (contd)
  • 2D Velocity and distance Vt (dTG V0), Dt
    (dtG V0)dt
  • If wanted/needed a wind vector could be used in
    the 3rd dimension and the resulting formulas
    would just result in a 3d vector computation.
  • Initial velocities V0 of the Rain model are
    uniformly distributed from 0 - 1 and then scaled
    for the appropriate model (Wave currently) being
    implemented

67
ImplementationRain Model (contd)
  • This initial velocity probability allows for
    "normal" rain motion, otherwise a normalized
    (probability) Cartesian plane of water would fall
    and not be distributed properly over time (looks
    cool but not very natural)
  • Probabilities of a rain "falling" from the cloud
    is uniformly calculated, pair this with
    randomized initial velocities and you can
    simulate realistic cloud shapes by altering the
    probabilities.

68
ImplementationRain Model (contd)
  • Higher velocities come from cloud points higher
    from the Wave model when a certain reference
    point is used
  • Not a realistic model for physical accuracy
    (except under heavy rain conditions with no
    wind), but since it is currently being used to
    just test the wave model (reactions of) this is
    not really a problem.

69
Demo Time!!!
  • (The Original Standford Bunny)

70
References
  • Discretizing the Wave Equation.
    lthttp//www.mtnmath.com/whatrh/node66.htmlgt
  • Efficient Simulation of Large Bodies of Water by
    Coupling Two and Three Dimensional Techniques.
    Irving, Guendelman, et al. ACM Transactions on
    Graphics (TOG) , ACM SIGGRAPH 2006 Papers
    SIGGRAPH '06. Vol. 25, Issue 3, July 2006.
  • Fast Water Animation Using the Wave Equation
    with Damping. Y. Nishidate and G. P. Nikishkov.
    lthttp//www.u-aizu.ac.jp/niki/papers/200520Fast
    20water20animation.pdf. gt
  • Fluid Animation with Dynamic Meshes. Klingner,
    Bryan. 2006.
  • Fluids in Deforming Meshes. Feldman, OBrien,
    et al. Proceedings of the 2005 ACM SIGGRAPH. 2005
    pp. 255-259.
  • Modeling Water for Computer Animation. Foster,
    Nick and Metaxas, Dimitri. Communications of the
    ACM. Vol. 43, Issue 7, July 2000.
  • Navier-Stokes Equations. lthttp//en.wikipedia.org/
    wiki/Navier-Stokes_equationsgt
  • Practical Animation of Liquids. N. Foster, R.
    Fedkiw, et al. ACM Siggraph 2001.
  • Realistic Animation of Liquids. Foster, Nick
    and Metaxas, Dimitri. GRAPHICAL MODELS AND IMAGE
    PROCESSING Vol. 58, No. 5, September, pp.
    471483, 1996 ARTICLE NO. 0039
  • Rendering Natural Waters. S. Premoze and M.
    Ashikhmin. Eighth Pacific Conference on Computer
    Graphics and Applications. 2000 p. 23
  • Simulation and Rendering for Bubbles in
    Liquid.Matsumura, Tomoya.
  • Simulation of Bubbles. Zheng, Wen. 2006.
  • Water Drops on Surfaces. Wang, Huamin.
Write a Comment
User Comments (0)
About PowerShow.com