Game Development Reference
In-Depth Information
the alpha channel. The 1 bit for the alpha channel can be either set or not, which means
your image can have only fully transparent or fully opaque pixels. In other words,
RGB5551 sprites can't blend with pixels in the background.
If you don't need any transparency at all, like for background images, you can use the
RGB565 format, which provides 5 bits for red, 6 bits for green, and 5 bits for the blue
color channel. It doesn't use an alpha channel. The fact that there are 6 bits for green
colors and only 5 bits for the other two color channels has something to do with our
hunter-gatherer background. Our retina is simply trained to differentiate better between
green color tones, so that extra bit is provided to the green channel where we would no-
tice a “missing color bit” more easily.
The PVRTC2 and PVRTC4 image formats provide 2 and 4 bits per pixel, respectively,
and no alpha channel. Only use this format for monotonous or dark background images
and if you really need to squeeze out some memory and rendering speed because they
come with a severe impact on image quality. Think of the artifacts seen in JPEG im-
ages with a relatively low-quality setting.
The Dithering option allows you to optimize the image quality whenever the image
format requires the image's color depth to be reduced. Dithering emulates gradients by
randomly distributing pixels with similar color tones across a larger area. This effect-
ively reduces the “banding” effect when the color depth of an image is reduced. Be-
cause all the dithering options are applied in real time in the TexturePacker preview
without affecting your source images, you can just try the various dithering algorithms
to find out which provides the best quality.
Tip While evaluating dithering algorithms, keep in mind that the ultimate qual-
ity test is of course your game running on a device. Some artifacts that are
clearly visible on your computer screen may not be noticeable on the device. In
particular, that's because the color profile of your computer screen is different
from the device's color profile, either through manual adjustments (brightness,
contrast, color tone), limitations imposed by the display technology, or a change
in color vibrancy as the display ages. That also means a single device isn't rep-
resentative for the final look of the game. At the very least, you should test the
game with the device brightness set to minimum and maximum levels.
Search Nedrilad ::

Custom Search