Game Development Reference
In-Depth Information
n 24-bit (565 RGB, 8 A): This format is great for making nice-looking bitmaps
with a good alpha channel. Green gets an extra bit because the human eye is
more sensitive to changes in green than red or blue.
n 16-bit (565 RGB): This compact format is used for storing bitmaps with more
varieties of color and no alpha channel.
n 16-bit (555 RGB, 1 A): This compact format leaves one bit for translucency,
which is essentially a chroma key.
n 8-bit indexed: A compact way to store bitmaps that have large areas of subtly
shaded colors; some of the indexes can be reserved for different levels of
translucency.
Many renderers, including DirectX, support a wide variety of pixel depth in each red,
blue, green, and alpha channel.
Support Tools Your Content Creators Will Actually Use
Avoid writing oddball tools to try to save a few bits here and there. Try to
write your game so that your content creators, such as artists, can use the
same art formats used by popular art tools like Photoshop. They will be able
to easily manipulate their work in a common and well-known tool, and your
game will look exactly the way the artists intended it to look. You
ll also be
able to find artists who can work on your game if you stick to the standard
formats and tools. If you must, you can write some great compression
methods to process the results into something really small.
'
Which Is Better: 24-, 16-, or 8-Bit Art?
It
s virtually impossible to choose a single format to store every bitmap in your game
and have all your bitmaps come through looking great. In fact, I can assure you that
some of your bitmaps will end up looking like they should be in your laundry pile.
Figure 8.2 shows three different bitmaps that were created by drawing a grayscale
image in Photoshop. The bitmap on the far left uses 8 bits per channel, the center
bitmap is stored using 5 bits per channel, while the one on the right is stored using
4 bits. If you attempt to store a subtly shaded image using too few colors, you ' ll see
results closer to the right bitmap, which looks crummy.
If you can use 8 bits for each channel, you
'
ll trade this
quality for a much larger size. Needless to say, if your artist storms into your office
and wonders why her beautiful bitmaps are banded all to hell, you
'
ll see the best result, but you
'
ve likely forced
them into a bad color space. If your artists can choose the format that reproduces
the image reliably in the best possible compression, great! But you
'
'
ll tend to find
Search WWH ::




Custom Search