Simulating Fluids in Computer Graphics - PowerPoint PPT Presentation

1 / 29
About This Presentation
Title:

Simulating Fluids in Computer Graphics

Description:

Library in The Day After Tomorrow. Sewer in Ratatouille (YouTube) ... Attenuate momentum: Advect velocity: Pressure project. Advect smoke: Gather smoke: Videos ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 30
Provided by: brianbunch
Category:

less

Transcript and Presenter's Notes

Title: Simulating Fluids in Computer Graphics


1
Simulating Fluids in Computer Graphics
  • Fluid Control

2
Last Time
  • More accurate curved boundaries
  • How to handle boundaries not aligned with the
    grid
  • Strong coupling of solids and fluids

3
This Lecture
  • Fluid Control
  • Motivation
  • Divergence control
  • Explosions
  • Driving simulations towards target shapes
  • Characters and objects made of smoke

4
Motivation
  • Library in The Day After Tomorrow
  • Sewer in Ratatouille (YouTube)
  • Horse-river in Lord of the Rings
  • Gandalfs smoke ring in Lord of the Rings
    (YouTube)
  • Harry Potter 6 (Video)
  • Explosions

5
Divergence Control I
  • More accurate buoyancy modeling
  • Variable densities

6
Divergence ControI II
  • If the volume stays the same, but the density
    changes, what happens to the mass?
  • We violate conservation of mass!
  • We do want the fluid to change volume

7
Divergence Control III
  • Using Gauss theorem and Euler integration the
    change in volume is
  • Combining the previous two expressions

8
Divergence Control IV
  • The divergence only changes the right-hand side
    of the equation system

9
Divergence Control V
  • Create a control field d(i,j,k) at grid cell
    centers, which defines a desired rate of
    fractional volume change
  • Enforcing the corresponding divergence is
    achieved simply by adding d to the right-hand
    side

10
Driving Simulations Towards Target Shapes
11
Idea
12
Modified Incompressible Euler Equations
  • The fluid will flow to locations with lower
    potential.
  • The control and design of the fluid simulation
    boils down to designing the potential field U.
  • How should it look?

13
Determining U I
  • We will specify an initial shape pstart and a
    target shape ptarget

14
Determining U II
  • Solving Laplaces equation gives us a harmonic
    potential function
  • Boundary conditions

15
Determining U III
16
Summing Up
  • Preprocessing for NSSolver
  • Preprocessing for GeometricPotential
  • getControlInput pstart, ptarget and pcheck
  • makePotentialField U
  • determineGradientField U
  • While(Simulating)
  • add -s U while adding other body forces to u
  • otherwise simulate as usual to update u and s
  • U can be changed underway to allow for keyframe
    animation

17
Results I
18
Results II
19
Limitations
  • No direct control over how fast the smoke
    approximates the target. Only able to specify the
    potential field U.

20
Another Method
  • Different modification
  • becomes

21
Driving Force F
  • F should drive s towards s
  • Once the target is reached, F should enable the
    fluid to reach a rest state v vt 0
  • What about the rest state?

Check!
22
Example
23
Smoke Gathering G I
  • What happens if s contains higher values and
    gradients than s?
  • Numerical dissipation makes it impossible
  • Due to incompressibility, advection can never
    generate new values of s
  • Assume that the total mass of the simulated smoke
    s equals the total mass of the target s
  • The error is
  • Smooth e until it is constant

24
Smoke Gathering G II
  • Formally

25
Example
26
Summing Up
  • While(Simulating)
  • Apply driving forces
  • Attenuate momentum
  • Advect velocity
  • Pressure project
  • Advect smoke
  • Gather smoke

27
Videos
28
Limitations
  • No direct control over how well a target is
    approximated at a given time. Only indirect using
    the parameters.
  • The smoke gathering term and driving forces must
    be used carefully in order to preserve a
    natural-looking fluid motion.

29
Next Time
  • More fluid control
Write a Comment
User Comments (0)
About PowerShow.com