|
![](/i/fill.gif) |
In article <3906b624@news.povray.org>, Warp <war### [at] tag povray org>
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] yahoo com
TAG(Technical Assistance Group) e-mail: chr### [at] tag povray org
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
![](/i/fill.gif) |