POV-Ray : Newsgroups : povray.advanced-users : L*C*h(uv) color solid Server Time
1 Jul 2024 07:40:12 EDT (-0400)
  L*C*h(uv) color solid (Message 51 to 60 of 82)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: clipka
Subject: Re: L*C*h(uv) color solid
Date: 24 Nov 2016 20:33:55
Message: <58379503$1@news.povray.org>
Am 25.11.2016 um 01:50 schrieb Mike Horvath:
> On 11/24/2016 6:43 PM, clipka wrote:
>> Am 24.11.2016 um 23:56 schrieb Mike Horvath:
>>
>>> Okay, the problem is that I want to use sRGB instead of RGB in the
>>> pigments. However, it seems to not be possible to multiply the sRGB
>>> colors and then average them like you can with regular RGB. Or is there
>>> a way to get this to work?
>>
>> Don't use sRGB when mucking around with colour spaces, unless you know
>> /exactly/ what you are doing. Colour space experts are smart enough to
>> specify colours in terms of linear light intensity, or otherwise
>> explicitly inform the readers.
>>
> 
> The functions output sRGB colors with Illuminant = D65 and Observer = 2°
> (1931) according to one of the conversion websites that uses these
> formulas.
> 
> I'd like the POV code to use sRGB as well.

Don't try to go via that route; it won't work with the approach I've
described.

Instead, in the function pipeline, insert a function to explicitly
convert from sRGB to RGB:

    3D cartesian -> Lch -> sRGB -> RGB -> "distance"

    3D cartesian -> Lch -> sRGB -> RGB -> pigments


Post a reply to this message

From: clipka
Subject: Re: L*C*h(uv) color solid
Date: 24 Nov 2016 20:36:14
Message: <5837958e$1@news.povray.org>
Am 25.11.2016 um 01:47 schrieb Mike Horvath:
> Thank you clipka! Everything is working perfectly now! Part of the
> problem was a bug in my conversion functions. Once I fixed it, I started
> getting the correct results.
> 
> Do you mind if I put a LGPL license on the code an upload it to Wikipedia?

Feel free to do so.


Post a reply to this message

From: Mike Horvath
Subject: Re: L*C*h(uv) color solid
Date: 24 Nov 2016 20:56:34
Message: <58379a52$1@news.povray.org>
On 11/24/2016 8:28 PM, Mike Horvath wrote:
> I've attached the final shape, with the outside sRGB bits trimmed off.
>
> Mike

For comparison, here is the same image with the corner bits left in.

Mike


Post a reply to this message


Attachments:
Download 'cielch_color_solid_cylinder_isosurface.png' (24 KB)

Preview of image 'cielch_color_solid_cylinder_isosurface.png'
cielch_color_solid_cylinder_isosurface.png


 

From: Mike Horvath
Subject: Re: L*C*h(uv) color solid
Date: 24 Nov 2016 20:59:28
Message: <58379b00$1@news.povray.org>
On 11/24/2016 8:33 PM, clipka wrote:
> Don't try to go via that route; it won't work with the approach I've
> described.
>
> Instead, in the function pipeline, insert a function to explicitly
> convert from sRGB to RGB:
>
>     3D cartesian -> Lch -> sRGB -> RGB -> "distance"
>
>     3D cartesian -> Lch -> sRGB -> RGB -> pigments
>

Do you have a function to convert between sRGB and RGB? One was not 
included with ColorMine AFAIK.

Mike


Post a reply to this message

From: clipka
Subject: Re: L*C*h(uv) color solid
Date: 24 Nov 2016 21:11:30
Message: <58379dd2$1@news.povray.org>
Am 25.11.2016 um 02:59 schrieb Mike Horvath:
> On 11/24/2016 8:33 PM, clipka wrote:
>> Don't try to go via that route; it won't work with the approach I've
>> described.
>>
>> Instead, in the function pipeline, insert a function to explicitly
>> convert from sRGB to RGB:
>>
>>     3D cartesian -> Lch -> sRGB -> RGB -> "distance"
>>
>>     3D cartesian -> Lch -> sRGB -> RGB -> pigments
>>
> 
> Do you have a function to convert between sRGB and RGB? One was not
> included with ColorMine AFAIK.

No ready-made function; you'll need to piece things together from e.g.
https://en.wikipedia.org/wiki/SRGB.


Post a reply to this message

From: clipka
Subject: Re: L*C*h(uv) color solid
Date: 24 Nov 2016 21:19:30
Message: <58379fb2$1@news.povray.org>
Am 25.11.2016 um 02:33 schrieb clipka:

> Instead, in the function pipeline, insert a function to explicitly
> convert from sRGB to RGB:
> 
>     3D cartesian -> Lch -> sRGB -> RGB -> "distance"
> 
>     3D cartesian -> Lch -> sRGB -> RGB -> pigments

I forgot: You won't necessarily need the sRGB->RGB step for the
"distance" function, as sRGB channel values of 0 and 1 map to RGB
channel values of 0 and 1, respectively.


Post a reply to this message

From: Mike Horvath
Subject: Re: L*C*h(uv) color solid
Date: 24 Nov 2016 21:31:18
Message: <5837a276$1@news.povray.org>
On 11/24/2016 9:11 PM, clipka wrote:
> Am 25.11.2016 um 02:59 schrieb Mike Horvath:
>> On 11/24/2016 8:33 PM, clipka wrote:
>>> Don't try to go via that route; it won't work with the approach I've
>>> described.
>>>
>>> Instead, in the function pipeline, insert a function to explicitly
>>> convert from sRGB to RGB:
>>>
>>>     3D cartesian -> Lch -> sRGB -> RGB -> "distance"
>>>
>>>     3D cartesian -> Lch -> sRGB -> RGB -> pigments
>>>
>>
>> Do you have a function to convert between sRGB and RGB? One was not
>> included with ColorMine AFAIK.
>
> No ready-made function; you'll need to piece things together from e.g.
> https://en.wikipedia.org/wiki/SRGB.
>

I am looking at the "The reverse transformation" section. Do I just need 
to use the C_linear function?


Mike


Post a reply to this message

From: clipka
Subject: Re: L*C*h(uv) color solid
Date: 24 Nov 2016 21:55:02
Message: <5837a806$1@news.povray.org>
Am 25.11.2016 um 03:31 schrieb Mike Horvath:
> On 11/24/2016 9:11 PM, clipka wrote:
>> Am 25.11.2016 um 02:59 schrieb Mike Horvath:
>>> On 11/24/2016 8:33 PM, clipka wrote:
>>>> Don't try to go via that route; it won't work with the approach I've
>>>> described.
>>>>
>>>> Instead, in the function pipeline, insert a function to explicitly
>>>> convert from sRGB to RGB:
>>>>
>>>>     3D cartesian -> Lch -> sRGB -> RGB -> "distance"
>>>>
>>>>     3D cartesian -> Lch -> sRGB -> RGB -> pigments
>>>>
>>>
>>> Do you have a function to convert between sRGB and RGB? One was not
>>> included with ColorMine AFAIK.
>>
>> No ready-made function; you'll need to piece things together from e.g.
>> https://en.wikipedia.org/wiki/SRGB.
>>
> 
> I am looking at the "The reverse transformation" section. Do I just need
> to use the C_linear function?

Yup, that's the one.


Post a reply to this message

From: Mike Horvath
Subject: Re: L*C*h(uv) color solid
Date: 24 Nov 2016 22:09:15
Message: <5837ab5b$1@news.povray.org>
On 11/24/2016 9:54 PM, clipka wrote:
> Am 25.11.2016 um 03:31 schrieb Mike Horvath:
>> On 11/24/2016 9:11 PM, clipka wrote:
>>> No ready-made function; you'll need to piece things together from e.g.
>>> https://en.wikipedia.org/wiki/SRGB.
>>>
>>
>> I am looking at the "The reverse transformation" section. Do I just need
>> to use the C_linear function?
>
> Yup, that's the one.
>
>

Okay, I will try that.

Mike


Post a reply to this message

From: scott
Subject: Re: L*C*h(uv) color solid
Date: 28 Nov 2016 03:23:40
Message: <583be98c@news.povray.org>
>> May I ask the stupid question, "why not"?
>>
>> I would expect the Lch colour space to encompass all the RGB colour
>> space, so the boundaries of the latter should be sufficient to bound the
>> shape.
>>
>> My guess is that the issues you see with the shape are due to bogosities
>> in your colour conversion functions.
>>
>
> L, C and H are supposed to form a cylinder. There are some very small
> sRGB bits poking outside of the cylinder. I guess I could show the bits
> as well, as long as I explain what they are.

If sRGB is poking out of your cylinder, then Adobe RGB is going to poke 
out even more, and the entire human visual range is going to be much 
larger. Are you sure you've got the radius of your cylinder correct to 
match your colour calculations? Also it would be surprising to me if the 
human visual range came out exactly as a cylinder (after a brief glance 
of the maths involved), are you sure about this?


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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