POV-Ray : Newsgroups : povray.unofficial.patches : Another post_process idea : Re: Another post_process idea Server Time
2 Sep 2024 06:20:17 EDT (-0400)
  Re: Another post_process idea  
From: Chris Huff
Date: 26 Apr 2000 08:44:03
Message: <chrishuff_99-F9EDE4.07470226042000@news.povray.org>
In article <3906b624@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   Perhaps something like this:
> 
> #declare ColoringFunction = function { x*.25+y*.6+z*.15 }
> 
> global_settings
> { post_process { pixel_color ColoringFunction(Red, Green, Blue) }
> }
> 
> or:
> 
> #declare RedFunction = function { ... }
> #declare GreenFunction = function { ... }
> #declare BlueFunction = function { ... }
> 
> global_settings
> { post_process
>   { pixel_color <RedFuntion(Red, Green, Blue),
>                  GreenFunction(Red, Green, Blue),
>                  BlueFuntion(Red, Green, Blue)>
>   }
> }
> 
> or something similar.

What I was thinking of was something like this:
global_settings or camera {
    post_process {
        post_function < function {...red function...},
                        function {...green function...},
                        function {...blue function...} >
    }
}
And there would be additional variables:
r, g, b                   - unclipped RGB colors.
x, y, z                   - intersection point.
u, v                      - UV coordinates.
depth                     - distance to intersection point.
inorm_x, inorm_y, inorm_z - surface normal at intersection point.
pnorm_x, pnorm_y, pnorm_z - perturbed surface normal.
dir_x, dir_y, dir_z       - ray direction(if I succeed in adding it to 
the available information).


You could use this filter to do the same thing as the color_matrix 
filter, and just about anything else that doesn't require information on 
other pixels:
post_function < function {r*AA + g+AB + b*AC},
                function {r*BA + g+BB + b*BC},
                function {r*CA + g+CB + b*CC} >

Another possibility would be to implement these variables as functions 
taking two parameters(pixel coordinates), and add h and v variables for 
pixel coordinates...the functions would return the information for the 
specified pixel. This would be tremendously flexible, and would allow 
blurring filters.

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

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