POV-Ray : Newsgroups : povray.binaries.images : Blend mode vs. poly_wave Server Time
14 May 2021 16:24:49 EDT (-0400)
  Blend mode vs. poly_wave (Message 1 to 3 of 3)  
From: Cousin Ricky
Subject: Blend mode vs. poly_wave
Date: 19 Dec 2020 12:15:09
Message: <5fde351d@news.povray.org>
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'
blend_v_poly-pbi.png


 

From: Kenneth
Subject: Re: Blend mode vs. poly_wave
Date: 21 Dec 2020 03:20:01
Message: <web.5fe059b5cd008ccdd98418910@news.povray.org>
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

From: Cousin Ricky
Subject: Re: Blend mode vs. poly_wave
Date: 21 Dec 2020 23:18:49
Message: <5fe173a9$1@news.povray.org>
On 2020-12-21 4:18 AM, Kenneth wrote:
> 
> I assume your images were made in v3.7.1.

I used v3.8, but the blend modes were introduced in 3.7.1.


Post a reply to this message

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