POV-Ray : Newsgroups : povray.text.scene-files : smoothing 8 bit greyscale (to 16 bit) Server Time
31 Oct 2024 12:18:25 EDT (-0400)
  smoothing 8 bit greyscale (to 16 bit) (Message 1 to 3 of 3)  
From: Pete
Subject: smoothing 8 bit greyscale (to 16 bit)
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

From: Warp
Subject: Re: smoothing 8 bit greyscale (to 16 bit)
Date: 10 Jul 2000 19:28:04
Message: <396a5c04@news.povray.org>
Pete <Pet### [at] nymaliasnet> wrote:
: /* use -w and -d to set output image size to

  You mean -w and -h?

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Pete
Subject: Re: smoothing 8 bit greyscale (to 16 bit)
Date: 11 Jul 2000 21:25:19
Message: <320.227T756T12853693PeterC@nym.alias.net>
Warp wrote:

>Pete <Pet### [at] nymaliasnet> wrote:
>: /* use -w and -d to set output image size to
>
>  You mean -w and -h?
>
>--
>main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
>):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/

WOOPS!  Yeah.  I meant -w and -h.  Sorry!!


Post a reply to this message

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