|
 |
Leroy <lrw### [at] joplin com> wrote:
> I haven't try to output to a file (there's no point if you can't display
> it).
> Any Ideals?
There actually *is* a goofy way to get a grayscale 'preview' (well, not exactly
a true preview): by RE-rendering your color image in POV-Ray, using a
function_image trick. It will reproduce the image 1:1 in grayscale, quickly.
The idea is to have the following code in a separate SDL scene file, then run it
after your original color render. (Your original image needs to be put into a
folder whose 'path' POV-Ray can recognize, of course.)
If the original image is a .png file, I'm not sure what the assumed-gamma value
should be, in global_settings (I haven't tested that). Probably 1.0.
-------
camera {
perspective
location <0, 0, -1.000>
look_at <0, 0, 0>
right x*image_width/image_height
// angle 67 // by default
}
#declare my_function =
function{pigment{image_map{bmp "my color image.bmp"}}} // your original
// color image's name and file type here
box{<0,0,0>,<1,1,0>
texture {
pigment{
image_map{
function 600,450{ // pixel resolution of original color image
my_function(x,y,z).gray
}
}
// These two additions are because function-image results are
// normally mirror-flipped...
scale <1,-1,0>
translate 1*y
}
finish{
ambient 1
diffuse 0
}
}
translate <-.5,-.5,0>
scale <4/3,1,1> // scale x to the original color image aspect
// ratio (or alternately, pixel dimension in x divided by pixel dimension
// in y -- 600/450, for example)
}
Post a reply to this message
|
 |