|
|
Back before development was started on POV-Ray 3.7.1, it was pointed out
that poly_wave 2.2 can be used to achieve non-linear gradients with
assumed_gamma 1. Alas, while trying to adapt Warp's wood texture to
linear color, I realized that poly_wave only gives the desired result
for the very simplest of gradients.
The attached montage compares poly_wave 2.2 with blend modes 1 to 3,
blend_gamma 2.2, for a variety of color maps on gradient x. The color
maps are, left to right, top to bottom:
[0.0 Red] [1.0 Green]
[0.0 Red] [1.0 Yellow]
[0.0 Yellow] [1.0 Red]
[0.0 Red] [1.0 Black]
[0.0 Black] [1.0 Red]
[0.5 Red] [1.0 Green]
[0.0 Red] [0.5 Green]
[0.5 Red] [1.0 Yellow]
[0.0 Red] [0.5 Yellow]
[0.5 Yellow] [1.0 Red]
[0.0 Yellow] [0.5 Red]
[0.5 Red] [1.0 Black]
[0.0 Red] [0.5 Black]
[0.5 Black] [1.0 Red]
[0.0 Black] [0.5 Red]
[1/3 Red] [2/3 Green]
[1/3 Red] [2/3 Yellow]
[1/3 Yellow] [2/3 Red]
[1/3 Red] [2/3 Black]
[1/3 Black] [2/3 Red]
The issue is that poly_wave does not adjust the colors themselves; it
adjusts their positions within the gradient. If you want traditional
gamma 2.2 gradients without mathematically micromanaging the color map,
you'll need to use POV-Ray 3.8.
Post a reply to this message
Attachments:
Download 'blend_v_poly-pbi.png' (15 KB)
Preview of image 'blend_v_poly-pbi.png'
|
|
|
|
Cousin Ricky <ric### [at] yahoocom> wrote:
> Back before development was started on POV-Ray 3.7.1, it was pointed out
> that poly_wave 2.2 can be used to achieve non-linear gradients with
> assumed_gamma 1.
>...
> The attached montage compares poly_wave 2.2 with blend modes 1 to 3,
> blend_gamma 2.2, for a variety of color maps on gradient x.
> ...
> The issue is that poly_wave does not adjust the colors themselves; it
> adjusts their positions within the gradient.
I assume your images were made in v3.7.1.
Just some thoughts/questions that occured to me, re: what the expected results
should be:
1) Does using poly wave with a 2.2 exponent, plus blend mode 2 (with its
blend_gamma 2.2), cause those two 2.2 'exponents' to multiply(?) in some way, or
otherwise interact to give the 'wrong' result in a blend? In other words, for
example, would poly wave 2.2 plus blend_gamma 1.0 be the 'proper' way to get
your non-linear color blend for that particular combination? (Or maybe the
reverse of that?) Just a conjecture.
2) My understanding of blend_gamma, from some older tests I did, was that the
colors to be blended in the color_map probably need to be 'shades' of colors--
like <.3,.5,.7> -- rather than pure ones like <1,0,0> or even <.5,0,0>. The
reason being is that the effect of a gamma exponent doesn't work on 1.0 or 0.0
colors, only on in-between values. (Of course, the intermediate blend between
<1,0,0> and <0,1,0> is obviously *some* kind of blend.) But I don't know about a
blend like <.5,0,0> and, say, <0,1,0>; the first color would simply turn into
<.22,0,0>, I think (or maybe an unexpected value?)-- which is still 'pure red',
just a darker version(?)
All of this is off the top of my head, though; no tests.
Post a reply to this message
|
|