Graphics Reference
In-Depth Information
just like we did for semi-Lagrangian trajectory tracing. 2 Finally, we in
turn use the marker particles to mark which grid cells are fluid for the
pressure solve: any cell containing a marker particle is water, and the rest
of the non-solid cells are left empty by default.
This algorithm can be justified conceptually by imagining taking it
to the limit, where each individual molecule of water is identified with a
marker particle: then the set of grid cells containing marker particles is
exactly the set of grid cells containing water.
This raises the question of how densely to sample with marker particles
—clearly one per molecule isn't practical! Obviously there should be at
least one particle per water grid cell, and to avoid gaps in the fluid ran-
domly opening up during advection we probably want at least double that
resolution: four particles per cell in 2D and eight per cell in 3D. However,
going above double won't necessarily give much improvement: ultimately
these particles will be moved by velocities sampled at the grid resolution,
which places a limit on how much detail we can expect in the water geom-
etry. If higher-resolution geometry is required, the simulation grid must be
refined too.
The simplest sampling pattern for the marker particles is just to lay
them out in a regular grid lattice. However, this can result in peculiar
artifacts as the simulation progresses—if the fluid compresses along one axis
as it expands along another, the regular grid turns into anisotropic stripe-
like patterns, far from a good uniform sampling. Thus we recommend at
least jittering the initial grid, as one might do for sampling patterns in
rendering.
The first problem apparent with the marker particle approach is in
rendering: ultimately we want a smooth surface, describing the boundary
between water and air, but right now we only have a mass of points filling
the water volume. Clearly we don't want to simply render the water-filled
voxels as blocks.
The standard solution is to construct a smooth implicit surface wrapped
around the particles. For example, Blinn [Blinn 82] introduced blobbies :
given the positions of the particles
x i }
{
define
k
,
F ( x )=
i
x
x i
h
2 Just to remind you, for RK2 and many other integrators, we'll need to look up fluid
velocity at locations that might not be inside the current water region, necessitating
extrapolation. We'll get to that soon.
Search WWH ::




Custom Search