POV-Ray : Newsgroups : povray.general : smooth gradient color_map : Re: smooth gradient color_map Server Time
25 Apr 2024 17:43:30 EDT (-0400)
  Re: smooth gradient color_map  
From: clipka
Date: 25 Jul 2017 12:07:45
Message: <59776cd1$1@news.povray.org>
Am 25.07.2017 um 09:42 schrieb Thomas de Groot:
> On 24-7-2017 13:15, Jim Holsenback wrote:
> 
>> i just updated (developer suggested) both syntax diagrams again ... if
>> you could help me out by replying here with relevant portions and i'll
>> follow up in the morning.
> 
> I /think/ it is quite clear now what is intended and what blend_mode
> does to the color_map entries. I find it a difficult matter altogether
> though. Like always, I need a simple example to play with in order to
> show me the differences. I have not yet done that with Christoph's
> examples but will do so presently....
> 
> After playing a bit with that, I think I understand the theory but less
> the (practical) use of blend_mode :-/

Problem #1:

Linear greyscale gradients (which is what you get by default with
`assumed_gamma 1.0`) are typically perceived as non-linear.

Solution:

Introduce a mechanism to interpolate colour gradients in a non-linear
fashion. Enter `blend_mode 2`. (`blend_mode 1` was defined as a
mechanism to interpolate gradients in a linear fashion even when
`assumed_gamma 2.2` or similar is used.)


Problem #2:

Non-linear interpolation of colour gradients, if done on RGB values,
causes colour gradients to exhibit a midway dip in brightness and a poor
midway hue (note that this effect can be seen not only with `blend_mode
2`, but also with default blend mode if `assumed_gamma 2.2` or similar
is used).

Solution:

Introduce a mechanism to interpolate brightness in a non-linear fashion
while interpolating chromaticity (the relative ratio of R:G:B) in a
linear fashion. Enter `blend_mode 3`.


Post a reply to this message

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