Game Development Reference
In-Depth Information
Scenario A
Scenario B
Scenario C
cons
upd
cons
upd
cons
upd
Stage 1
ori
0.888
38.6
0.955
29.3
1.017
22.2
col
0.806
33.2
0.938
25.5
0.974
19.7
gcb
1.071
28.7
1.169
22.1
1.219
17.6
hom
1.026
29.5
1.210
21.0
1.300
17.3
Stage 2
ori
0.622
57.1
0.718
36.4
0.910
25.2
col
0.541
46.8
0.696
31.6
0.857
22.6
gcb
0.624
40.6
0.740
26.4
0.963
19.2
hom
0.617
40.0
0.742
26.0
1.107
18.6
Stage 3
ori
0.731
68.2
0.753
38.6
0.813
29.2
col
0.619
54.0
0.741
33.2
0.801
25.7
gcb
0.721
37.9
0.819
27.9
0.826
21.6
hom
0.710
36.9
0.819
27.4
0.912
21.1
Ta b l e 6 . 2 . Performance of the original SPH algorithm with neighbor lists (ori), the col-
lapsed SPH algorithm (col), the collapsed algorithm with the grid-cell-based data structure
(gcb), and a simulation with all previous improvements and the optimizations for homo-
geneous fluids (hom). Execution times are measured in milliseconds and split in a spatial
hash construction part (cons) and an SPH simulation update part (upd). The evaluation
is split in three stages: stages 1 and 2 both last 2 seconds, and stage 3 lasts 16 seconds.
Three scenarios are tested at 60 Hz with 8,000 fluid particles; scenario A has parameter
values k r = 250 , g r = 100 , μ r = =1 . 5 ; scenario B has parameter values k r = 750
g r = 100 , μ r =1 . 5 ; and scenario C has parameter values k r = 250 , g r =33 , μ r =1 . 5 .
All tests are performed on a single core of an Intel Xeon W3520.
ing evaluation royally outweighs the time lost during construction. These bench-
marks suggest that for the chosen target platform, a grid-cell-based spatial hash is
a sound choice.
Table 6.2 also shows that the collapsed SPH algorithm—used by col, gcb,
and hom—has a much improved evaluation time compared to the original SPH
algorithm.
Lastly, the optimizations introduced by simplification of the SPH equations
introduced in Section 6.6 hardly pay off. The simulation seems to be bound by
the neighbor search, not by the SPH arithmetic.
To give an impression of actual frame rates obtained by the aforementioned
methods, we show frame rates of the water-in-a-glass test in five cases: the orig-
inal two-pass SPH algorithm without neighbor lists, the original algorithm with
neighbor lists, the collapsed SPH algorithm, the collapsed algorithm with a grid-
cell-based hash structure, and the collapsed algorithm for homogeneous fluids.
Between the first and the last case, the difference in frame rate is almost twofold.
The frame rates are listed in Table 6.3.
Search Nedrilad ::




Custom Search