Practical Animation of Liquids - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Practical Animation of Liquids

Description:

Enforce incompressibility by solving a linear system built from the Navier ... Ensure that the incompressibility condition is satisfied for every grid cell ... – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 19
Provided by: Hyp2
Category:

less

Transcript and Presenter's Notes

Title: Practical Animation of Liquids


1
Practical Animation of Liquids
2
What it does
  • Modelling and animating liquids
  • Mainly designed for computer animation
  • 3D environment
  • Handle water and viscous liquids
  • Interaction with graphics primitives
  • Parametric curves
  • Stationary or moving polygons

3
What it does
  • Allows control over the motion
  • Conserves realistic behaviour
  • Stays visually coherent
  • Looks realistic
  • ? Achieved by trading off engineering
    correctness for computational efficiency

4
Example
5
How does it work?
  • The algorithm is divided into 6 steps
  • Model the static environment as a voxel grid
  • Model the liquid volume using a combination of
    particles and an implicit surface
  • Then, for each simulation time step
  • Update the velocity field by solving
    Navier-Stokes equations (pressure and velocity)
    using finite differences combined with a
    semi-Lagrangian method
  • Apply velocity constraints due to moving objects
  • Enforce incompressibility by solving a linear
    system built from the Navier-Stokes equation
    (pressure)
  • Update the position of the liquid volume
    (particles and implicit surface) using the new
    velocity field

6
Static environment
  • Grid of voxels which usually has a rectangular
    shape
  • Each cell has a pressure variable at its centre
    and shares a velocity variable with each of its
    adjacent neighbours
  • Each cell is either tagged as empty or filled

7
Static environment Example
8
Liquid representation
  • Two visuals are used
  • Particles
  • Provide details where the surface starts to
    splash
  • Their position evolve smoothly over time by
    simple convection (cf. cells)
  • Their velocity is computed directly from the
    velocity grid using tri-linear interpolation and
    each particle is moved according to an
    inertialess equation
  • Particles have a low computational overhead
  • But no straightforward way to extract a smooth
    polygonal (or parametric) description of the
    actual liquid surface

9
Liquid representation
  • Isocontour
  • Provides a smooth surface to regions of liquid
    that are well resolved compared to the grid
  • The surface is represented using an implicit
    function
  • To look good, a high density of particles is
    required
  • Uses Dynamic Level Set to conform (visually) to
    the physics of liquids
  • However, suffer from severe volume loss
    especially on the relatively coarse grids
    commonly used in computer graphics
  • An hybrid surface model is used to solve this
    problem (particles)

10
Liquid representation Example
11
Velocity field
  • The process occurs in 3 stages
  • Compute the Courant-Friedrichs-Levy (CFL)
    Condition
  • First order Semi-Lagrangian method is used to
    update the convective component
  • Central differencing is then used on the viscous
    terms of Navier-Stokes equations (pressure and
    velocity)
  • ? The result of the previous calculations are
    added together to update the velocity filed
  • The Semi-Lagrangian method allows to use large
    time steps
  • However, large time steps increase the
    dissipation and thus, ruin the visual effect in
    liquid animation

12
Velocity field
  • To avoid the dissipation and save computational
    power
  • Alternate between a large time step for updating
    the Navier-Stokes equations and a series of small
    time steps (that add up to the large time step)
    for the particles and the level set

13
Moving objects
  • Previous methods have difficulties to deal with
    moving objects
  • Require highly resolved computational grids
  • Or a grid mechanism that can adapt itself to the
    moving object surface
  • ? Not well suited to animation because of the
    additional time complexity involved

14
Moving objects
  • Method used
  • Based on three basic rules
  • Liquid should not flow into the object. At any
    point of contact, the relative velocity between
    the liquid and object along the objects surface
    normal should be greater than or equal to zero
  • We directly set the component of liquid velocity
    normal to the object
  • ? We know the object surface normal and can
    calculate the liquid velocity relative to that
    surface in a given cell
  • Tangential to the surface, the liquid should flow
    freely without interference.
  • Neither the particles nor the level set surface
    should pass through any part of the surface of
    the object
  • We know where the polygons that comprise the
    object surface are and in what direction they are
    moving
  • ? We simply move the particles so that they are
    always outside the surface of the object

15
Moving objects
  • Solution
  • As a boundary condition, any cell within a solid
    object has its velocities set to that of the
    moving object
  • The velocity field is updated using Navier-Stokes
    equations (pressure and velocity). No special
    consideration is given to cells containing an
    object (they are all allowed to change freely as
    if they contain liquid)
  • Each cell that intersects an object surface gets
    the component of the object velocity along its
    normal set explicitly as outlined above
  • Cells internal to the object have their
    velocities set back to the object velocity
  • During the mass conservation step, the velocity
    for any grid cell that intersects the object is
    held fixed
  • However, the grid resolution is the limiting
    factor

16
Mass conservation
  • The calculations used in the steps III and IV
    lead to mass dissipation
  • Ensure that the incompressibility condition is
    satisfied for every grid cell
  • Use the Laplacian operator to couple local
    pressure changes to the divergence in each cell
  • Static object and empty cells dont disrupt this
    structure
  • It can be solved quickly and efficiently using a
    Preconditioned Conjugate Gradient (PCG) method
  • Further efficiency gains can be made by using an
    Incomplete Choleski preconditioner to accelerate
    convergence
  • The resulting velocity field conserves mass (is
    divergence free) and satisfies the Navier-Stokes
    equations

17
Conclusion
  • Method
  • Good looking liquid
  • Correct physics of liquids
  • Interaction with polygonal objects within the
    liquid
  • Control of the animation

18
Examples
Write a Comment
User Comments (0)
About PowerShow.com