Game Development Reference
like the windows are shattering and not the walls. I probably
should take it even higher than I did.
In the Gradient area of the Shatter effect, I selected the gray-
scale map layer I painted in Photoshop. Then—and here's the
key—I animated the Shatter Threshold value. As you increase
the Shatter Threshold value, it uses more of the gradient, start-
ing with light areas and moving towards dark areas. In this case,
because I painted the fi ve circular windows at the top white, they
shatter fi rst (Fig. 16.73).
Figure 16.73 Areas that
correspond to the white areas on
my gradient layer blow up fi rst.
If I were to leave the Shatter Threshold at a low value, nothing
else would blow up. But I animated the Shatter Threshold value
so that as it increases the other windows shatter from top to bot-
tom. I never let the Shatter Threshold value get high enough to
blow up the walls (Fig. 16.74).
Figure 16.74 Increasing the
Shatter Threshold value more
allows darker colors in our
gradient map to blow up
additional pixels on our layer.