RGB to Radiance definition

Dear All,

I am trying to integrate easier ways of defining materials in Groundhog,
for which I have the following doubt. How can I define a Radiance material
(i.e. plastic, metal, glass, etc.) from an RGB combination and the global
Reflectance (transmittance)? The purpose of this is to enable "eyedropping"
a color, and assigning a reflectance or transmittance to it.

What I initially did was to find the combination of RGB reflectances that
satisfied the rho = R*0.265 + 0.67*G + 0.065*B while maintaining the
original proportions of RGB. However, since the RGB color that comes from
the eyedropper has Black/White components (which intend to emulate shadows
and different light exposures), my procedure often ends up returning an R,
G or B channel that is greater than 1.

I guess my question is: Is there any way of reconstructing the R, G and B
reflectances (or transmittances or whatever) from an RGB pixel? Maybe
playing with HSL space or something?

Best,

Germán

Hi Germán,

While it's generally a bad idea to have reflectances (or transmittances) greater than 1 or less than 0, Radiance does not restrict you to this range. In fact, if you are rendering colors from another (wider gamut) color space, such coefficients are sometimes necessary. However, the Y sum (expressed by your R*0.265 + 0.67*G + 0.065*B equation) should stay between 0 and 1. If you have an eyedropper that yields values outside this range, then it is not producing usable colors.

Cheers,
-Greg

···

From: Germán Molina Larrain <[email protected]>
Date: June 22, 2016 4:00:43 PM EDT
To: Radiance general discussion <[email protected]>

Dear All,

I am trying to integrate easier ways of defining materials in Groundhog, for which I have the following doubt. How can I define a Radiance material (i.e. plastic, metal, glass, etc.) from an RGB combination and the global Reflectance (transmittance)? The purpose of this is to enable "eyedropping" a color, and assigning a reflectance or transmittance to it.

What I initially did was to find the combination of RGB reflectances that satisfied the rho = R*0.265 + 0.67*G + 0.065*B while maintaining the original proportions of RGB. However, since the RGB color that comes from the eyedropper has Black/White components (which intend to emulate shadows and different light exposures), my procedure often ends up returning an R, G or B channel that is greater than 1.

I guess my question is: Is there any way of reconstructing the R, G and B reflectances (or transmittances or whatever) from an RGB pixel? Maybe playing with HSL space or something?

Best,

Germán

Hi Greg,

Thanks for your answer. I am already forcing the "Y sum restriction", which
can be easily done by scaling everything... I assume that rendering colours
from "a wider gamut" does not make any physical sense? (i.e. a 60%
reflective black surface?). What would not be a "wider gamut", though? any
color within the RGB triangle in the chromaticity diagram?

..... I have very little idea of what I am talking about..... sorry if I am
speaking nonsense

···

2016-06-23 8:43 GMT-03:00 Greg Ward <[email protected]>:

Hi Germán,

While it's generally a bad idea to have reflectances (or transmittances)
greater than 1 or less than 0, Radiance does not restrict you to this
range. In fact, if you are rendering colors from another (wider gamut)
color space, such coefficients are sometimes necessary. However, the Y sum
(expressed by your R*0.265 + 0.67*G + 0.065*B equation) should stay between
0 and 1. If you have an eyedropper that yields values outside this range,
then it is not producing usable colors.

Cheers,
-Greg

*From: *Germán Molina Larrain <[email protected]>

*Date: *June 22, 2016 4:00:43 PM EDT

*To: *Radiance general discussion <[email protected]>

Dear All,

I am trying to integrate easier ways of defining materials in Groundhog,
for which I have the following doubt. How can I define a Radiance material
(i.e. plastic, metal, glass, etc.) from an RGB combination and the global
Reflectance (transmittance)? The purpose of this is to enable "eyedropping"
a color, and assigning a reflectance or transmittance to it.

What I initially did was to find the combination of RGB reflectances that
satisfied the rho = R*0.265 + 0.67*G + 0.065*B while maintaining the
original proportions of RGB. However, since the RGB color that comes from
the eyedropper has Black/White components (which intend to emulate shadows
and different light exposures), my procedure often ends up returning an R,
G or B channel that is greater than 1.

I guess my question is: Is there any way of reconstructing the R, G and B
reflectances (or transmittances or whatever) from an RGB pixel? Maybe
playing with HSL space or something?

Best,

Germán

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hello Germ�n,

Have a look at Mark Stocks comment on converting RGB values http://www.radiance-online.org/pipermail/radiance-general/2011-April/007743.html

Regards

Terrance

···

On 23/06/2016 4:00 am, Germ�n Molina Larrain wrote:

Dear All,

I am trying to integrate easier ways of defining materials in
Groundhog, for which I have the following doubt. How can I define a
Radiance material (i.e. plastic, metal, glass, etc.) from an RGB
combination and the global Reflectance (transmittance)? The purpose of
this is to enable "eyedropping" a color, and assigning a reflectance
or transmittance to it.

What I initially did was to find the combination of RGB reflectances
that satisfied the rho = R*0.265 + 0.67*G + 0.065*B while maintaining
the original proportions of RGB. However, since the RGB color that
comes from the eyedropper has Black/White components (which intend to
emulate shadows and different light exposures), my procedure often
ends up returning an R, G or B channel that is greater than 1.

I guess my question is: Is there any way of reconstructing the R, G
and B reflectances (or transmittances or whatever) from an RGB pixel?
Maybe playing with HSL space or something?

Best,

Germ�n

The slides referenced in that thread have moved (apologies!) to here:
http://markjstock.org/doc/gsd_talk_11_notes.pdf

The particular slide with my very unscientific RGB-to-reflectance
conversion contains:

Start with an RGB color from whatever color picker you use
(249, 214, 172)
Normalize 0..255 to 0..0.9
(0.88, 0.76, 0.61)
Square it (to move medium gray of 0.5 closer to grey card grey of 0.18)
(0.77, 0.57, 0.37)

I hope this helps.

Mark

···

On 6/23/16, <> wrote:

Hello Germán,

Have a look at Mark Stocks comment on converting RGB values
http://www.radiance-online.org/pipermail/radiance-general/2011-April/007743.html

Regards

Terrance

On 23/06/2016 4:00 am, Germán Molina Larrain wrote:

Dear All,

I am trying to integrate easier ways of defining materials in
Groundhog, for which I have the following doubt. How can I define a
Radiance material (i.e. plastic, metal, glass, etc.) from an RGB
combination and the global Reflectance (transmittance)? The purpose of
this is to enable "eyedropping" a color, and assigning a reflectance
or transmittance to it.

What I initially did was to find the combination of RGB reflectances
that satisfied the rho = R*0.265 + 0.67*G + 0.065*B while maintaining
the original proportions of RGB. However, since the RGB color that
comes from the eyedropper has Black/White components (which intend to
emulate shadows and different light exposures), my procedure often
ends up returning an R, G or B channel that is greater than 1.

I guess my question is: Is there any way of reconstructing the R, G
and B reflectances (or transmittances or whatever) from an RGB pixel?
Maybe playing with HSL space or something?

Best,

Germán

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Thanks, Greg and Mark for your answers!

I studied this more, and decided not to follow Mark's procedure. Groundhog
is meant to be a Lighting tool, thus I do not really want to offer "very
unscientific" methods... I guess I will keep the eyedropper and colorpick
just for SketchUp representation. By default, the Radiance material will be
gray (based on just the reflectance), unless the user decides otherwise.

Would it be a problem if I mixed gray and non-gray materials in the same
model? I mean... I might know the RGB transmittances of a glass, but only
the reflectance of my carpet. Will that induce errors?

Best,

Germán

···

2016-06-23 13:35 GMT-03:00 Mark Stock <[email protected]>:

The slides referenced in that thread have moved (apologies!) to here:
http://markjstock.org/doc/gsd_talk_11_notes.pdf

The particular slide with my very unscientific RGB-to-reflectance
conversion contains:

Start with an RGB color from whatever color picker you use
(249, 214, 172)
Normalize 0..255 to 0..0.9
(0.88, 0.76, 0.61)
Square it (to move medium gray of 0.5 closer to grey card grey of 0.18)
(0.77, 0.57, 0.37)

I hope this helps.

Mark

On 6/23/16, <> wrote:
> Hello Germán,
>
> Have a look at Mark Stocks comment on converting RGB values
>
http://www.radiance-online.org/pipermail/radiance-general/2011-April/007743.html
>
> Regards
>
> Terrance
>
> On 23/06/2016 4:00 am, Germán Molina Larrain wrote:
>> Dear All,
>>
>> I am trying to integrate easier ways of defining materials in
>> Groundhog, for which I have the following doubt. How can I define a
>> Radiance material (i.e. plastic, metal, glass, etc.) from an RGB
>> combination and the global Reflectance (transmittance)? The purpose of
>> this is to enable "eyedropping" a color, and assigning a reflectance
>> or transmittance to it.
>>
>> What I initially did was to find the combination of RGB reflectances
>> that satisfied the rho = R*0.265 + 0.67*G + 0.065*B while maintaining
>> the original proportions of RGB. However, since the RGB color that
>> comes from the eyedropper has Black/White components (which intend to
>> emulate shadows and different light exposures), my procedure often
>> ends up returning an R, G or B channel that is greater than 1.
>>
>> I guess my question is: Is there any way of reconstructing the R, G
>> and B reflectances (or transmittances or whatever) from an RGB pixel?
>> Maybe playing with HSL space or something?
>>
>> Best,
>>
>> Germán
>>
>>
>
>
> _______________________________________________
> Radiance-general mailing list
> [email protected]
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

If you don't know the RGB values of a material, you can just use gray. It won't hurt your accuracy as much as shifting *all* surfaces to gray. It may be misleading when looking at renderings, however. People may assume what is shown as gray really is gray, when it's actually unknown.

Cheers,
-Greg

···

From: Germán Molina Larrain <[email protected]>
Date: June 24, 2016 6:59:57 AM PDT

Thanks, Greg and Mark for your answers!

I studied this more, and decided not to follow Mark's procedure. Groundhog is meant to be a Lighting tool, thus I do not really want to offer "very unscientific" methods... I guess I will keep the eyedropper and colorpick just for SketchUp representation. By default, the Radiance material will be gray (based on just the reflectance), unless the user decides otherwise.

Would it be a problem if I mixed gray and non-gray materials in the same model? I mean... I might know the RGB transmittances of a glass, but only the reflectance of my carpet. Will that induce errors?

Best,

Germán

2016-06-23 13:35 GMT-03:00 Mark Stock <[email protected]>:
The slides referenced in that thread have moved (apologies!) to here:
http://markjstock.org/doc/gsd_talk_11_notes.pdf

The particular slide with my very unscientific RGB-to-reflectance
conversion contains:

Start with an RGB color from whatever color picker you use
(249, 214, 172)
Normalize 0..255 to 0..0.9
(0.88, 0.76, 0.61)
Square it (to move medium gray of 0.5 closer to grey card grey of 0.18)
(0.77, 0.57, 0.37)

I hope this helps.

Mark

On 6/23/16, <> wrote:
> Hello Germán,
>
> Have a look at Mark Stocks comment on converting RGB values
> http://www.radiance-online.org/pipermail/radiance-general/2011-April/007743.html
>
> Regards
>
> Terrance
>
> On 23/06/2016 4:00 am, Germán Molina Larrain wrote:
>> Dear All,
>>
>> I am trying to integrate easier ways of defining materials in
>> Groundhog, for which I have the following doubt. How can I define a
>> Radiance material (i.e. plastic, metal, glass, etc.) from an RGB
>> combination and the global Reflectance (transmittance)? The purpose of
>> this is to enable "eyedropping" a color, and assigning a reflectance
>> or transmittance to it.
>>
>> What I initially did was to find the combination of RGB reflectances
>> that satisfied the rho = R*0.265 + 0.67*G + 0.065*B while maintaining
>> the original proportions of RGB. However, since the RGB color that
>> comes from the eyedropper has Black/White components (which intend to
>> emulate shadows and different light exposures), my procedure often
>> ends up returning an R, G or B channel that is greater than 1.
>>
>> I guess my question is: Is there any way of reconstructing the R, G
>> and B reflectances (or transmittances or whatever) from an RGB pixel?
>> Maybe playing with HSL space or something?
>>
>> Best,
>>
>> Germán
>>

By the way, I love your presentation, Mark. Would it be OK to link it to radiance-online.org (rather than having it buried in an obscure mailing list thread)?

-Greg

···

From: Mark Stock <[email protected]>
Date: June 23, 2016 9:35:47 AM PDT

The slides referenced in that thread have moved (apologies!) to here:
http://markjstock.org/doc/gsd_talk_11_notes.pdf

The particular slide with my very unscientific RGB-to-reflectance
conversion contains:

Start with an RGB color from whatever color picker you use
(249, 214, 172)
Normalize 0..255 to 0..0.9
(0.88, 0.76, 0.61)
Square it (to move medium gray of 0.5 closer to grey card grey of 0.18)
(0.77, 0.57, 0.37)

I hope this helps.

Mark

On 6/23/16, <> wrote:

Hello Germán,

Have a look at Mark Stocks comment on converting RGB values
http://www.radiance-online.org/pipermail/radiance-general/2011-April/007743.html

Regards

Terrance

On 23/06/2016 4:00 am, Germán Molina Larrain wrote:

Dear All,

I am trying to integrate easier ways of defining materials in
Groundhog, for which I have the following doubt. How can I define a
Radiance material (i.e. plastic, metal, glass, etc.) from an RGB
combination and the global Reflectance (transmittance)? The purpose of
this is to enable "eyedropping" a color, and assigning a reflectance
or transmittance to it.

What I initially did was to find the combination of RGB reflectances
that satisfied the rho = R*0.265 + 0.67*G + 0.065*B while maintaining
the original proportions of RGB. However, since the RGB color that
comes from the eyedropper has Black/White components (which intend to
emulate shadows and different light exposures), my procedure often
ends up returning an R, G or B channel that is greater than 1.

I guess my question is: Is there any way of reconstructing the R, G
and B reflectances (or transmittances or whatever) from an RGB pixel?
Maybe playing with HSL space or something?

Best,

Germán

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Thanks very much, Greg! I will have that in mind... I guess the "rendering"
issue may be misleading when sharing the models. It is OK for now, I guess.

And, Yes! That is an awesome presentation! Really really cool tips, facts
and images.

Best,

···

2016-06-24 20:32 GMT-03:00 Greg Ward <[email protected]>:

By the way, I love your presentation, Mark. Would it be OK to link it to
radiance-online.org (rather than having it buried in an obscure mailing
list thread)?

-Greg

> From: Mark Stock <[email protected]>
> Date: June 23, 2016 9:35:47 AM PDT
>
> The slides referenced in that thread have moved (apologies!) to here:
> http://markjstock.org/doc/gsd_talk_11_notes.pdf
>
> The particular slide with my very unscientific RGB-to-reflectance
> conversion contains:
>
> Start with an RGB color from whatever color picker you use
> (249, 214, 172)
> Normalize 0..255 to 0..0.9
> (0.88, 0.76, 0.61)
> Square it (to move medium gray of 0.5 closer to grey card grey of 0.18)
> (0.77, 0.57, 0.37)
>
> I hope this helps.
>
> Mark
>
> On 6/23/16, <> wrote:
>> Hello Germán,
>>
>> Have a look at Mark Stocks comment on converting RGB values
>>
http://www.radiance-online.org/pipermail/radiance-general/2011-April/007743.html
>>
>> Regards
>>
>> Terrance
>>
>> On 23/06/2016 4:00 am, Germán Molina Larrain wrote:
>>> Dear All,
>>>
>>> I am trying to integrate easier ways of defining materials in
>>> Groundhog, for which I have the following doubt. How can I define a
>>> Radiance material (i.e. plastic, metal, glass, etc.) from an RGB
>>> combination and the global Reflectance (transmittance)? The purpose of
>>> this is to enable "eyedropping" a color, and assigning a reflectance
>>> or transmittance to it.
>>>
>>> What I initially did was to find the combination of RGB reflectances
>>> that satisfied the rho = R*0.265 + 0.67*G + 0.065*B while maintaining
>>> the original proportions of RGB. However, since the RGB color that
>>> comes from the eyedropper has Black/White components (which intend to
>>> emulate shadows and different light exposures), my procedure often
>>> ends up returning an R, G or B channel that is greater than 1.
>>>
>>> I guess my question is: Is there any way of reconstructing the R, G
>>> and B reflectances (or transmittances or whatever) from an RGB pixel?
>>> Maybe playing with HSL space or something?
>>>
>>> Best,
>>>
>>> Germán
>>>
>>>
>>
>>
>> _______________________________________________
>> Radiance-general mailing list
>> [email protected]
>> http://www.radiance-online.org/mailman/listinfo/radiance-general
>>
>
> _______________________________________________
> Radiance-general mailing list
> [email protected]
> http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general