POV-Ray : Newsgroups : povray.bugreports : Grayscale_Output=yes doesn't work Server Time
29 Mar 2024 01:14:27 EDT (-0400)
  Grayscale_Output=yes doesn't work (Message 11 to 11 of 11)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Kenneth
Subject: Re: Grayscale_Output=3Dyes doesn't work
Date: 17 Mar 2015 18:40:00
Message: <web.5508a96db912e944f644696d0@news.povray.org>
Leroy <lrw### [at] joplincom> 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

<<< Previous 10 Messages Goto Initial 10 Messages

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