POV-Ray : Newsgroups : povray.unofficial.patches : Megapov post_process save_file format : Megapov post_process save_file format Server Time
19 Apr 2024 22:51:34 EDT (-0400)
  Megapov post_process save_file format  
From: ThomasR
Date: 11 Jan 2011 06:00:00
Message: <web.4d2c3703162a5787a8dd583f0@news.povray.org>
Hello everyone,

I'm using this macro :

#version unofficial MegaPov 1.21;

#macro make_depth(max_depth, min_depth, file_name)

global_settings{



        post_process {

                PP_Init_Depth_Output()



                function { (f_output_depth(x,y)-min_depth)/(max_depth-min_depth)
}

                function { (f_output_depth(x,y)-min_depth)/(max_depth-min_depth)
}

                function { (f_output_depth(x,y)-min_depth)/(max_depth-min_depth)
}

                function { 1 }



                save_file file_name



        }



}

#end

to compute the distance to first intersection.

Everything is working allright, and I get my distance as a png image, with 256
grayscale.

Problems come on the next step : 256 grayscales are not precise enough.
Is there a way to change the format in which the save_file command saves the
image ?
I tried to write the distance into a formatted txt file, which would be
acceptable, but I need to get a float from f_output_depth(x,y), and this seems
to be a vector or color expression.

If this is documented somewhere, I dont find it...

Thanks for helping

Thomas


Post a reply to this message

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