CompuServe Messages

#question rendering

    26-Nov-94 21:49:30
Sb: #question rendering
Fm: Marion K. Marks 70700,2777
To: Mario Gervais 75271,3540
You will ALWAYS get banding on 16-bit displays. The reason is simply because of how 16-bit displays work. Those 65,536 colors are PRESET. They are NOT a palette of 65,536 colors from an available color space of 16,777,216 shades or even 262,144 shades! That board can display ONLY those SPECIFIC 65,536 colors, and that's Just Not Enough for smooth gradients. Most 16-bit cards generate their palettes by giving you five bits (32 levels) each for Red and Blue, and six bits (64 levels) for Green, on the grounds that the human eye can distinguish more levels of Green than it can Red or Blue. Actually, the eye can distinguish more shades of Green than Red, but more of Red than Blue. So some cards (such as the ATI boards) can let you pick from this method (known as 5-6-5) or use 6-5-5 instead (giving you 64 shades of Red but only 32 shades of Green — better for pictures involving flesh tones, so you would use this mode if you do lots of portrait photography manipulation) and other modes as well. True 24-bit, however, is 8-8-8 — EIGHT bits, and thus 256 levels, each for Red, Green, and Blue. The eye can only distinguish adjacent shades here in the mid ranges of green, yellow, and gray/white and similar colors, and even then it's not usually enough to notice as "banding." Windows has no 16-bit color mode. Any mode over 8-bits (256 colors) is called "direct color mode" (since the color is stored directly in the pixel values themselves rather than the pixel values being a lookup value to index into a palette of colors from a larger color space — 262,144 or 6-6-6 for most SVGA cards, 16,777,216 or 8-8-8 for the Macintosh). All colors in direct color mode are specified as 24-bit RGB values. When they get actually written to the video card's memory, the lower two or three bits (two for Green, three for Red or Blue) of each of the three primary color values is simply DROPPED. So shades of Red with values 128, 129, 130, 131, 132, 133, 134, and 135 all come out to be the SAME color on the 16-bit display. 136 suddenly jumps up a substantial amount of brightness above 135, and thus your banding. 3D Studio r3 and later does ALL its work in FORTY-EIGHT bits of color space (plus 16 bits of alpha)! That's 16 bits for EACH PRIMARY, for a total of 240 TRILLION colors! Of course, no video board in the world can currently display that, and none of the file formats 3DS uses can hold such colors. But by calculating colors to such high precision, the quality of the image is very much improved, particularly for gamma correction (which usually leads to EXTREME banding in the dim areas of a picture since dim colors are ramped up quite steeply — but the extra color precision allows those steps to be "filled in" to the full 24-bit resolution of the output!). Not only that, but 3DS by default DITHERS DOWN to 24-bit from its 48-bit when saving Targas, Tiffs, or BMPs! This makes even the very subtle banding of 24-bit images far less noticeable, and in fact downright invisible to all but the most discerning of eyeballs with the very best of monitors (I know of no printer or printing press in the world which has a color gamut big enough for that to be noticeable with them). But just as 3DSr3 can dither 48-bit color down to 24-bits or to 8-bits, 3DSr2 and later can dither down to 16 bits as well for .TarGA files only. For 3DSr2, you need to set the System Options or the 3DS.SET file to set Targa Depth to 16 instead of 24. For 3DSr3 and r3.5 (which is erroneously called "r4" around here but I refuse to call it that), just click on the Options button from the Render Image/Animation dialog box and change ".TGA Depth" to 16 (there are two buttons: 24 and 16, and 24 is the default). Do this ONLY if your FINAL OUTPUT is to 16-bit (for instance, if you intend to make a 16-bit MPEG or .AVI animation for a CD-ROM, or you're planning on outputting to a Targa+ card in one of its higher-resolution 16-bit modes and don't mind the smaller color depth because the resolution is more important), AND you are outputting to .TGA files either for final output or as an intermediate step (such as assembly into an .AVI). This still won't ELIMINATE banding, but it will make it a LOT less noticeable. The cost is visible dithering, but that will be considerably less visible in an animation. It'll just look like video noise/film grain, which will actually make the animation look less "computery." Such .TGA files also won't compress well at all using the standard RLE compression available with .TGAs, since there will no longer be large areas of the same color, so you may need to allocate more disk space than usual.