POV-Ray : Newsgroups : povray.binaries.images : gradient variations : Re: gradient variations Server Time
30 Jul 2024 08:28:53 EDT (-0400)
  Re: gradient variations  
From: clipka
Date: 18 May 2012 13:06:36
Message: <4fb6819c$1@news.povray.org>
Am 18.05.2012 18:19, schrieb Le_Forgeron:
> Le 18/05/2012 14:44, clipka nous fit lire :
>> Am 17.05.2012 12:24, schrieb Le_Forgeron:
>>
>>> What about... interpolating in HSV or HSL space ?
>>
>> No, thanks - we certainly don't want to average hues. That would mess up
>> every gradient involving some neutral grey and any other color, giving
>> the transition an unexpected reddish hue (or whatever hue our algorithm
>> would assign to grey).
>
> If you have a neutral grey and another non-neutral, the right hue for
> grey is the other hue.

Yes, but the code to convert between RGB and HSV/HSL doesn't know that. 
Besides, any grey ever so slightly off-neutral - whether intentionally 
or unintentionally - has its own inherent hue.

Oh, and averaging hues would actually not just tint the transition, it 
would make them rainbow-style. For instance, a transition between green 
and an ever so slightly reddish grey would include some pastel yellow. 
Or some blue and pink, depending on which "direction" you choose for 
interpolating hues.

> The real non-slope is opposite hue. (yellow&  blue... magenta&  green..)

When interpolating hues, those would become rainbow-style rather than 
going via neutral grey.


Post a reply to this message

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