POV-Ray : Newsgroups : povray.binaries.images : Calibrated spectral colors Server Time
22 Dec 2024 07:03:09 EST (-0500)
  Calibrated spectral colors (Message 1 to 8 of 8)  
From: Cousin Ricky
Subject: Calibrated spectral colors
Date: 2 Aug 2023 17:03:58
Message: <64cac4be$1@news.povray.org>
A few years ago I created a macro that returns reflective spectral power
distribution (SPD) curves, but I hesitated to publish it due to its poor
correspondence with RGB colors.  But over the past couple of months, I
developed a filter that solves this problem: you submit an RGB spec, and
it figures out what to tell the SPD generator.  For good measure, I also
threw in a true RGB generator.

  https://github.com/CousinRicky/POV-MakeSpectrum

The illustrations show three examples of X11/SVG colors passed through
my library.  For each illustration, the large spheres were pigmented
with SPDs converted to colors using Lightsys IV.  The left SPD was built
from individual red, green, and blue curves, and the right SPD is from
my original SPD generator (albeit tweaked over the years), which was
designed to generate reflective SPDs resembling those bundled with
Lightsys IV and SpectralRender.  The small sphere at the center was
simply pigmented with the straight sRGB color.

The sphere colors are all reduced to 62.5% value, corresponding to a
finish diffuse of 0.625.  The scene has the recommended assumed_gamma 1:
the library handles sRGB and gamma issues.


Post a reply to this message


Attachments:
Download 'test_makespectrum_x11-pbi003.jpg' (37 KB) Download 'test_makespectrum_x11-pbi040.jpg' (42 KB) Download 'test_makespectrum_x11-pbi100.jpg' (36 KB)

Preview of image 'test_makespectrum_x11-pbi003.jpg'
test_makespectrum_x11-pbi003.jpg

Preview of image 'test_makespectrum_x11-pbi040.jpg'
test_makespectrum_x11-pbi040.jpg

Preview of image 'test_makespectrum_x11-pbi100.jpg'
test_makespectrum_x11-pbi100.jpg


 

From: Mike Miller
Subject: Re: Calibrated spectral colors
Date: 3 Aug 2023 08:00:00
Message: <web.64cb96616ed655f13e2343efdabc9342@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
> A few years ago I created a macro that returns reflective spectral power
> distribution (SPD) curves, but I hesitated to publish it due to its poor
> correspondence with RGB colors.  But over the past couple of months, I
> developed a filter that solves this problem: you submit an RGB spec, and
> it figures out what to tell the SPD generator.  For good measure, I also
> threw in a true RGB generator.
>
>   https://github.com/CousinRicky/POV-MakeSpectrum
>
> The illustrations show three examples of X11/SVG colors passed through
> my library.  For each illustration, the large spheres were pigmented
> with SPDs converted to colors using Lightsys IV.  The left SPD was built
> from individual red, green, and blue curves, and the right SPD is from
> my original SPD generator (albeit tweaked over the years), which was
> designed to generate reflective SPDs resembling those bundled with
> Lightsys IV and SpectralRender.  The small sphere at the center was
> simply pigmented with the straight sRGB color.
>
> The sphere colors are all reduced to 62.5% value, corresponding to a
> finish diffuse of 0.625.  The scene has the recommended assumed_gamma 1:
> the library handles sRGB and gamma issues.

I had to lookup 'SPD curves' to understand what you did here. :)
.....very impressive.
Mike


Post a reply to this message

From: And
Subject: Re: Calibrated spectral colors
Date: 4 Aug 2023 00:25:00
Message: <web.64cc7d616ed655f1e794a73aa81652d@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
> A few years ago I created a macro that returns reflective spectral power
> distribution (SPD) curves, but I hesitated to publish it due to its poor
> correspondence with RGB colors.  But over the past couple of months, I
> developed a filter that solves this problem: you submit an RGB spec, and
> it figures out what to tell the SPD generator.  For good measure, I also
> threw in a true RGB generator.
>
>   https://github.com/CousinRicky/POV-MakeSpectrum
>
> The illustrations show three examples of X11/SVG colors passed through
> my library.  For each illustration, the large spheres were pigmented
> with SPDs converted to colors using Lightsys IV.  The left SPD was built
> from individual red, green, and blue curves, and the right SPD is from
> my original SPD generator (albeit tweaked over the years), which was
> designed to generate reflective SPDs resembling those bundled with
> Lightsys IV and SpectralRender.  The small sphere at the center was
> simply pigmented with the straight sRGB color.
>
> The sphere colors are all reduced to 62.5% value, corresponding to a
> finish diffuse of 0.625.  The scene has the recommended assumed_gamma 1:
> the library handles sRGB and gamma issues.

If I understand correctly, it inputs computer color(often 3- value like RGB),
output a spectral curve. This is very important for some application.

I want to research it in the future.


Post a reply to this message

From: BayashiPascal
Subject: Re: Calibrated spectral colors
Date: 6 Aug 2023 00:10:00
Message: <web.64cf1cc96ed655f18f8c74531749e915@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> wrote:
> A few years ago I created a macro that returns reflective spectral power
> distribution (SPD) curves, but I hesitated to publish it due to its poor
> correspondence with RGB colors.  But over the past couple of months, I
> developed a filter that solves this problem: you submit an RGB spec, and
> it figures out what to tell the SPD generator.  For good measure, I also
> threw in a true RGB generator.
>
>   https://github.com/CousinRicky/POV-MakeSpectrum
>
> The illustrations show three examples of X11/SVG colors passed through
> my library.  For each illustration, the large spheres were pigmented
> with SPDs converted to colors using Lightsys IV.  The left SPD was built
> from individual red, green, and blue curves, and the right SPD is from
> my original SPD generator (albeit tweaked over the years), which was
> designed to generate reflective SPDs resembling those bundled with
> Lightsys IV and SpectralRender.  The small sphere at the center was
> simply pigmented with the straight sRGB color.
>
> The sphere colors are all reduced to 62.5% value, corresponding to a
> finish diffuse of 0.625.  The scene has the recommended assumed_gamma 1:
> the library handles sRGB and gamma issues.


Hi Cousin Ricky,

Your post attracted my attention as I've spent some time working with spectral
power distribution myself. I had a look at your library and Ive's work (which I
didn't knew about), but couldn't check Lightsys as the link is broken.

If I understand well, your macros are intended to be used as a conversion tool
from RGB values to SPDs to be used in Ive's macros. Could you explain what are
the advantages of using your macros over Ive's D_RGB macro (which seems to me to
have the same function) ?

Regards,
Pascal


Post a reply to this message

From: Cousin Ricky
Subject: Re: Calibrated spectral colors
Date: 6 Aug 2023 16:34:09
Message: <64d003c1@news.povray.org>
On 2023-08-06 00:08 (-4), BayashiPascal wrote:
> 
> Your post attracted my attention as I've spent some time working with spectral
> power distribution myself. I had a look at your library and Ive's work (which I
> didn't knew about), but couldn't check Lightsys as the link is broken.

I have reposted Lightsys 4d in p.binaries.scene-files.

> If I understand well, your macros are intended to be used as a conversion tool
> from RGB values to SPDs to be used in Ive's macros. Could you explain what are
> the advantages of using your macros over Ive's D_RGB macro (which seems to me to
> have the same function) ?
I had two issues with D_RGB().  The first, as Ive made clear in the
documentation, is that it does not match the RGB colors that we are used
to.  This makes matching colors more difficult, and this task is indeed
the reason I held up publishing MakeSpectrum for so long.

The second issue is that some RGB combinations create pigments that
reflect/transmit more light than than they receive at some wavelengths.
This can be seen in the attached illustration.

I am currently looking at a potential third issue: whether or not
generating SPDs by naively combining primary colors will lead to the
same fade_color/absorption primary color bias than RGB rendering has,
but I do not have results on that yet.


Post a reply to this message


Attachments:
Download 'graph_d_rgb.png' (94 KB)

Preview of image 'graph_d_rgb.png'
graph_d_rgb.png


 

From: BayashiPascal
Subject: Re: Calibrated spectral colors
Date: 7 Aug 2023 06:40:00
Message: <web.64d0c9006ed655f18f8c74531749e915@news.povray.org>
Thanks for your reply.

> I had two issues with D_RGB().  The first, as Ive made clear in the
> documentation, is that it does not match the RGB colors that we are used
> to.  This makes matching colors more difficult, and this task is indeed
> the reason I held up publishing MakeSpectrum for so long.

I think I see what you mean: Ive's D_RGB() function's arguments represents a
combination of the SPDs for the D_CC_A3, D_CC_B3, D_CC_C3 color patches (used as
proxy for red, green, blue), while in your approach the RGB values in argument
stand for the 'pure' red, green, blue of "pigment {rgb <red,green,blue>}" that
POV-Ray users are used too. Right?

> The second issue is that some RGB combinations create pigments that
> reflect/transmit more light than than they receive at some wavelengths.
> This can be seen in the attached illustration.

Ok.

> I am currently looking at a potential third issue: whether or not
> generating SPDs by naively combining primary colors will lead to the
> same fade_color/absorption primary color bias than RGB rendering has,
> but I do not have results on that yet.

I don't understand what you mean here, but I guess you'll share here your
results about it, so wait-and-see.


Post a reply to this message

From: Alain Martel
Subject: Re: Calibrated spectral colors
Date: 7 Aug 2023 10:25:56
Message: <64d0fef4$1@news.povray.org>
Le 2023-08-06 à 16:34, Cousin Ricky a écrit :

> The second issue is that some RGB combinations create pigments that
> reflect/transmit more light than than they receive at some wavelengths.
> This can be seen in the attached illustration.
> 
That part can be explained by florescence. Some of the absorbed light of 
shorter wave length get re-emitted as longer wave length.
One blue photon is absorbed and re-emitted as 2 red photons or a red and 
an infra red photon.
Notice that the excess tend to be in the dark red region of the 
spectrum, almost infra red.


Post a reply to this message

From: Cousin Ricky
Subject: Re: Calibrated spectral colors
Date: 7 Aug 2023 16:35:36
Message: <64d15598@news.povray.org>
On 2023-08-07 06:35 (-4), BayashiPascal wrote:
> 
>> I am currently looking at a potential third issue: whether or not
>> generating SPDs by naively combining primary colors will lead to the
>> same fade_color/absorption primary color bias than RGB rendering has,
>> but I do not have results on that yet.
> 
> I don't understand what you mean here, but I guess you'll share here your
> results about it, so wait-and-see.

And it turns out that combining red, green, and blue SPDs does lead to
the same bias as RGB rendering.

The top right and top center images use SpectralRender, while the upper
right image is straight up RGB rendering.  Each image in the lower row
shows the SPD of the sphere in the image directly above.

You can see how the hue of the transparent prism in the top right image
very quickly drifts toward phosphor blue.  This is what drove me to
spectral rendering in the first place.  The top center image, which uses
macro MakeSp_RGB_Args() to combine red, green, and blue SPDs similarly
to D_RGB(), shows the same bias as the RGB render.  In the top left
image, which uses macro MakeSp_Meta_RGB_Args(), the transparent prism
maintains the hue of the sphere.

RGB composites are still useful for opaque pigments, as most hues cannot
be created at full 'value' with the metamer macros.  For example, the
blue in these images (H = 210) maxes out at 0.8214.  Aqua in the OP
maxes out at approximately 0.625.  But for colored transparent
materials, disconnecting the SPD from RGB modeling really makes a
difference.


Post a reply to this message


Attachments:
Download 'fade_metamer_rgb-pbi.jpg' (117 KB)

Preview of image 'fade_metamer_rgb-pbi.jpg'
fade_metamer_rgb-pbi.jpg


 

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