Dithering


   Dithering

    On  the  16-bit  screen  you have choice of 65535 colors.  32 shades of
blue  and  red,  and  64  of green.  In 15-bit mode matters get even worse,
number  of  colors  shrinks  to 32768, 32 shades per color gun.  This makes
many pictures look poor.  Images containing a lot of smooth color gradients
are  simply  tragic.   But on the other hand, 15/16-bit screens take only a
half  of  24-bit  screen's memory, and they are faster to work with (due to
smaller amount of data to shift around).

    In  order  to  help  non-24-bit  screens  look  acceptable I decided to
implement  dithering.  The result is so good, that there is hardly a reason
to  use  full  24-bit  with  Real3D  anymore  (I  mean, for screen output).
There's a picture included in the archive to let you compare the difference
visually.

    Two dithering modes are available:

    Ordered  -  classical  and  very  fast, using 4x4 dispersed dot ordered
    dither  pattern.   Produces  good results, but under some circumstances
    aliasing  can  be  observed, due to the simple ("mechanical") nature of
    this method.

    Floyd-Steinberg  -  more  accurate  and just a bit slower.  Minding the
    fact that the huge percentage of render time is taken by Real3D itself,
    it  is  unlikely  that  you  notice  any  difference  in speed.  Little
    digression  (techies only):  I replaced original error-diffusion values
    with  ones  that  look  better  when quantizing from 24 to 16 bits.  In
    result, 16-bit output is nearly indistinguishable from 24-bit original,
    even on a good monitor (tested on 20' Sony Black Trinitron).


    All   algorithms   have   been   tested   visually  and  statistically,
Floyd-Steinberg  having  both  visual  perception and mean square error per
color  gun  notably  better  for  sample images I rendered.  Not that I was
surprised.  :)


                                                                             

HTML Conversion by AG2HTML.pl V2.951201, perl 5.002 & witbrock@cs.cmu.edu