POV-Ray : Newsgroups : povray.text.scene-files : smoothing 8 bit greyscale (to 16 bit) : smoothing 8 bit greyscale (to 16 bit) Server Time
28 Jul 2024 12:26:55 EDT (-0400)
  smoothing 8 bit greyscale (to 16 bit)  
From: Pete
Date: 10 Jul 2000 18:11:55
Message: <1426.226T2453T7395718PeterC@nym.alias.net>
Greetings all.  I am a newbie to this group and I have
been following the discussion on povray.general on smoothing
8-bit greyscale data into smooth 16-bit data for height
fields.  Here is a useful .pov file that has worked for me:

--
/* .pov "program" to read in an 8-bit greyscale image
   and smooth/blur it a little so that it contains
   16-bit data in memory.  The output file will
   contain the blurred 16-bit greyscale image, suitable for
   smooth height fields. */

/* use -w and -d to set output image size to
   be in proportion to the input image dimensions.
   (hint: render the output image to be a different
   size to get the maximum use of the anti-aliasing. */

/* for further blurring, I suppose one could use focal
   blur, but I havn't tried that */

/*
   Set jitter to zero for best smoothing.
      -J0.0
*/


global_settings {
  assumed_gamma 2.4 // tricky, that
  hf_gray_16   // for 16k greyscale in a 24-bit targa output
}


camera {
  direction <0, 0, 1>
  right <1, 0, 0>
  up <0, 1, 0>
  orthographic
  translate <0, 0, -10>
}


background { color rgb 0 }


box {
  <-0.5, -0.5, 0>, <0.5, 0.5, 0.001>
  pigment {
    image_map {
      png "cld_tile.png"  // YOU WILL NEED TO CHANGE THIS
      once
      interpolate 2  /* this gets us some blurring - anti alias to get more */
    }
    translate <-0.5, -0.5, 0>
  }
  finish { ambient 1 diffuse 0 }
}


/* actual end of this file */


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.