POV-Ray : Newsgroups : povray.general : Unconvincing TV raster texture using existing PNG : Re: Unconvincing TV raster texture using existing PNG Server Time
4 Nov 2024 13:00:39 EST (-0500)
  Re: Unconvincing TV raster texture using existing PNG  
From: nospam
Date: 27 Nov 2003 23:48:51
Message: <3fc6d290.3794444@localhost>
On Wed, 26 Nov 2003 18:01:27 -0500, "Greg M. Johnson"
<gregj;-)565### [at] aolcom> wrote:

>Here it is.  Any improvements?
>

	I could not get this to work.  Hoever, if by
TV, you mean that scanline effect, try this:

---- cut here ---- save as a pov file ----
/* best render this with no anti-aliasing at all! */
/* it is assumed that the input image aspect ratio
   and the output image aspect ratio are identical */

#version 3.5;


global_settings {
  assumed_gamma 2.2 // set same as your display_gamma setting
  noise_generator 1
}


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


#declare pic_pig = pigment {
  image_map {
    sys "screen.bmp" // your image here
    interpolate 2 // or not
  }
  translate <-0.5, -0.5, 0>
}


#declare scanline = pigment {
  average
  pigment_map {
    [ 1 pic_pig ]
    [ 1 color rgb 0 ]
  }
}


plane {
  <0, 0, -1>, 0
  pigment {
    gradient <0, 1, 0>
    frequency (image_height / 2) // the trick
    pigment_map {
      [ 0.5 scanline ]
      [ 0.5 pic_pig ]
    }
  }
  finish { ambient 1 diffuse 0 }
}


/* actual end of this file */
---- cut ----

	For a neat trick, render this at different
sizes and see what happens (or rather, what does not
happen) to the size of the scanlines

Peter


Post a reply to this message

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