POV-Ray : Newsgroups : povray.unofficial.patches : Another post_process idea : Re: Another post_process idea Server Time
2 Sep 2024 12:19:08 EDT (-0400)
  Re: Another post_process idea  
From: Chris Huff
Date: 26 Apr 2000 19:06:36
Message: <chrishuff_99-05553F.18093626042000@news.povray.org>
In article <njUGOUFjcnSZ3qj34lbk51m8BluE@4ax.com>, Glen Berry 
<7no### [at] ezwvcom> wrote:

> How hard would it be to do something like the following?
> 
>    resultRed = ( ((R+G+B)/3)^0.95)*1.05
>    resultGreen = (R+G+B)/3
>    resultBlue = ((R+G+B)/3)^0.9
> 
> This gives a fairly close approximation of Selenium Toning.

Hmm, now that I think of it...if I add "exponent" and "multiply" 
filters...that could be probably be written using multiple filters:
post_process {
    color_matrix < 0.3, 0.3, 0.3, 
                   0.3, 0.3, 0.3,
                   0.3, 0.3, 0.3 >
    exponent < 0.95, 1, 0.9>
    multiply < 1.05, 1, 1>
}


> Or maybe this?
> 
>    resultRed = ((R+G+B)/3)^0.67
>    resultGreen = ((R+G+B)/3)^0.85
>    resultBlue = ((R+G+B)/3)
> 
> This gives a fairly close approximation of Sepia Toning

post_process {
    color_matrix < 0.3, 0.3, 0.3, 
                   0.3, 0.3, 0.3,
                   0.3, 0.3, 0.3 >
    exponent < 0.67, 0.85, 1>
}


> Or maybe even this?
> 
>    output_Red = 100*sin(R*pi*3)
>    output_Green = 100*cos(G*pi*3)
>    output_Blue = -100*sin(B*pi*3)
> 
> This gives a very wild posterization effect

post_process {
    color_function < function {100*sin(r(h,v)*pi*3)},
                     function {100*cos(g(h,v)*pi*3)},
                     function {100*sin(b(h,v)*pi*3)} >
}
I don't know enough about the inner workings of isosurface functions to 
do this last one, though.

One other thing that might be possible: some kind of heiarchical linking 
of post_process filters. Instead of a simple list, you could have 
several "branches" that are combined at the end. I am not sure if I am 
up to coding this though. :-)
An example would be:
post_process {
    average {
        find_edges {...}
        find_edges {...}
        blur {...}
    }
}
This would do each filter individually, and then average their results.

-- 
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.