|
![](/i/fill.gif) |
>> OOC did you decide already which algorithm to use for this? Will it give
>> more linear looking gradients between different colours too?
>
> I expect so.
>
> When interpolating between two colors, POV-Ray currently computes
> something along the lines of:
>
> q = 1-p;
> result = p * color1 + q * color2;
>
> For a "perceptually linear" gradient, the formula would be changed to:
>
> q = 1-p;
> temp1 = pow(color1, 1/gamma);
> temp2 = pow(color2, 1/gamma);
> tempR = p * color1 + q * color2;
> result = pow(tempR, gamma);
>
> where gamma would be a value around 2.5.
OOC why 2.5? CIELAB uses a value of 3 to computer the "lightness".
Whilst that will be great for greys, it might not work so well for
colours. For example if you take a gradient between dark green and dark
blue, or between purple and orange, I actually think the 3.7 "physically
linear" method gives a more perceptually linear result currently.
Post a reply to this message
|
![](/i/fill.gif) |