POV-Ray : Newsgroups : povray.unofficial.patches : Another post_process idea : Re: Another post_process idea Server Time
2 Sep 2024 06:17:00 EDT (-0400)
  Re: Another post_process idea  
From: Glen Berry
Date: 25 Apr 2000 21:26:03
Message: <njUGOUFjcnSZ3qj34lbk51m8BluE@4ax.com>
On Tue, 25 Apr 2000 08:11:28 -0500, Chris Huff
<chr### [at] yahoocom> wrote:

>It would be a 3*3 matrix, like this:
>
><AA, AB, AC,
> BA, BB, BC,
> CA, CB, CC>
>
>
>resultRed   = AA*inputRed + AB*inputGreen + AC*inputBlue;
>resultGreen = BA*inputRed + BB*inputGreen + BC*inputBlue;
>resultBlue  = CA*inputRed + CB*inputGreen + CC*inputBlue;

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.

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

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

Note:  For the purpose of these examples, R = the values contained in
the Red channel *after* clipping/normalizing to values between 0 and
1. "G" and "B" refer to the Green and Blue channels in a likewise
manner.

I also wanted to ask if the values you are manipulating in your matrix
are the raw unclipped values, or have they already been clipped? It
might be handy to apply a matrix or a formula to either situation, for
different reasons. The above effects are meant to work with values
constrained between 0 and 1, but if I wanted to control image
contrast, I would need to work with the raw unclipped valiues.

Later,
Glen Berry

( Remove the "7" from 7no### [at] ezwvcom to email me. )


Post a reply to this message

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