Game Development Reference
In-Depth Information
-6-
Optimized SPH
Kees van Kooten
6.1
Introduction
Smoothed particle hydrodynamics (SPH) [Monaghan 88] is a method for simu-
lating nonrigid substances in real time as clouds of particles, with applications
ranging from water to soft bodies and gaseous phenomena. Contrary to fluid
simulations based on a fixed Eulerian grid, as treated in [Harlow and Welch 65]
and [Stam 99], the particle cloud is free to move anywhere in space and dynami-
cally change the resolution of any area of the simulation to suit its importance to
the observer.
The concept of SPH employs smooth scalar functions that map points in space
to a mass density. These scalar functions, referred to as smoothing kernels ,rep-
resent point masses that are centered at particle positions and smoothed out over
a small volume of space, similar to a Gaussian blur in two-dimensional image
processing. The combined set of smoothing kernels defines a density field; the
density at a point is the summation over the function of every individual smooth-
ing kernel in the set. The density field is used in the SPH equations to derive a
force field, which governs the motion of the particles within the fluid.
SPH can be implemented in many different ways, both as a sequential al-
gorithm running on a CPU [Muller et al. 03] and in parallel on a Cell proces-
sor [Hjelte 06] or GPU [Harada et al. 07]. To visualize the state of the simulation,
most often the concept of metaballs is employed. This is a type of implicit sur-
face invented by Blinn in the early 1980s [Blinn 82], used to achieve a fluid-like
appearance. To approximate the shape of this implicit surface, many different
visualization methods have been proposed, ranging from classical methods like
marching cubes [Lorensen and Cline 87] to ray tracing [Kanamori et al. 08], point-
based visualizations [van Kooten et al. 07], various screen-space methods based
on depth field smoothing [van der Laan et al. 09], or screen-space meshes [Muller
et al. 07], and combinations of any of the aforementioned techniques [Zhang
et al. 08]. The preferred technique for both the simulation and the visualization
 
Search Nedrilad ::




Custom Search