Game Development Reference
In-Depth Information
Figure 6.6. Execution of scenario A from Table 6.1 with k r = 250 at 60 Hz. The
images on the left correspond to the original SPH algorithm, while the images on the right
correspond to the collapsed SPH algorithm. The top images visualize a fluid at rest, while
the bottom images show the behavior of the fluid under influence of an artificially generated
wave. Particle colors range from blue to green to red to denote areas of low, medium, and
high density, respectively (see Color Plate II).
6.7
Performance
In this section, we will evaluate the performance of the original SPH algorithm
from Section 6.3, the collapsed SPH algorithm from Section 6.5, and the grid-cell-
based spatial hash structure from Section 6.4.2. Also, we will show performance
numbers for an SPH implementation based on the homogeneous SPH simplifica-
tions presented in Equation (6.8) to test whether the algorithm is bound by the
complexity of SPH evaluations or by neighbor searching.
To test the performance, we again use the water-in-a-glass simulation from
Section 6.6, with three different sets of parameters. However, we nowmeasure the
performance during three stages of the simulation: stage 1, in which water falls
and sloshes about; stage 2, in which water stabilizes until it is at rest; and stage 3,
in which an artificial wave is generated, compressing the fluid particles against
the sides of the glass. For all three parts of the simulation, we measure both
Search Nedrilad ::




Custom Search