POV-Ray : Newsgroups : povray.general : Albedo in PoV-Ray? Server Time
5 Nov 2024 05:24:01 EST (-0500)
  Albedo in PoV-Ray? (Message 1 to 5 of 5)  
From: Jörg 'Yadgar' Bleimann
Subject: Albedo in PoV-Ray?
Date: 6 May 2009 05:05:54
Message: <4a0152f2$1@news.povray.org>
High!

During the process of getting together the astronomical data for my 
Solar System project ("PoVSolar"), I usually also find albedo values for 
the various planetary objects.

Now my question: as the albedo value gives the percentage of incoming 
light reflected from a body, is it correct to assume that HSL brightness 
values directly correspond to albedo (I know that there are different 
ways to compute astronomical albedo, but for the time being, I would 
stick to the basic definition), so that a dark grey asteroid with an 
albedo of 0.04 would be best modeled as rgb 0.04? (Yes, I've also 
already heard of a PoV macro to convert HSL vectors into RGB vectors, 
within colors.inc, if I remember correctly...)

How can I adjust the overall (=average) brightness of a bitmap texture 
to a certain value? Can it be done within PoV-Ray or should I better 
relay on GIMP to do this?

See you in Khyberspace!

Now playing: I've Been Losing You, Extended Mix (a-ha)

Yadgar


Post a reply to this message

From: Mike Williams
Subject: Re: Albedo in PoV-Ray?
Date: 6 May 2009 06:09:32
Message: <kv3P9BDYHWAKFwVk@econym.demon.co.uk>

>High!
>
>During the process of getting together the astronomical data for my 
>Solar System project ("PoVSolar"), I usually also find albedo values 
>for the various planetary objects.
>
>Now my question: as the albedo value gives the percentage of incoming 
>light reflected from a body, is it correct to assume that HSL 
>brightness values directly correspond to albedo (I know that there are 
>different ways to compute astronomical albedo, but for the time being, 
>I would stick to the basic definition), so that a dark grey asteroid 
>with an albedo of 0.04 would be best modeled as rgb 0.04? (Yes, I've 
>also already heard of a PoV macro to convert HSL vectors into RGB 
>vectors, within colors.inc, if I remember correctly...)
>
>How can I adjust the overall (=average) brightness of a bitmap texture 
>to a certain value? Can it be done within PoV-Ray or should I better 
>relay on GIMP to do this?

Using rgb 0.04 is fine if the object has zero saturation.

For non-grey colours, the albedo is probably best represented by .gray 
(watch out for that American spelling, the UK English spelling doesn't 
work) which returns a value where the three components are weighted in a 
way that corresponds to the way the human eye responds. As you say, 
there are various definitions of albedo, but using the response of the 
human eye is a reasonable one to go with.

   #declare C = rgb <0.5,0.3,0.2>;

then C.gray, the albedo of that colour, returns 0.348

If you have an object that has the same hue and saturation as C but has 
albedo A, then you can write

   pigment {C*A/C.gray}

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: clipka
Subject: Re: Albedo in PoV-Ray?
Date: 6 May 2009 07:30:00
Message: <web.4a017431954af5e953a485b50@news.povray.org>
=?ISO-8859-1?Q?J=F6rg_=27Yadgar=27_Bleimann?= <yaz### [at] gmxde> wrote:
> Now my question: as the albedo value gives the percentage of incoming
> light reflected from a body, is it correct to assume that HSL brightness
> values directly correspond to albedo

AFAIU, that would be the case if the celestial body in question would exhibit
only perfectly diffuse reflection.

> How can I adjust the overall (=average) brightness of a bitmap texture
> to a certain value? Can it be done within PoV-Ray or should I better
> relay on GIMP to do this?

You might use an "average" pseudo-pattern, as in

pigment {
  average {
    [ 0.1 myBitmapPigment ]
    [ 0.9 color rgb 0 ]
  }
}

to e.g. tune the pigment to 10% the original bitmap's brightness.

Of course in order to tune to a particular overall brightness, you'd have to
compute the original bitmap's brightness first; you could do this by sampling a
few points using the eval_pigment() builtin macro.

Also note that you may have gamma issues with the input imagery.


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Albedo in PoV-Ray?
Date: 10 May 2009 09:21:41
Message: <4a06d4e5$1@news.povray.org>
High!

Mike Williams wrote:

> For non-grey colours, the albedo is probably best represented by .gray 
> (watch out for that American spelling, the UK English spelling doesn't 
> work) which returns a value where the three components are weighted in a 
> way that corresponds to the way the human eye responds.

Is the .gray value equivalent to the luminosity value in the HSL model? 
I just started an animation of the Jovian moon Amalthea (albedo 0.09) 
using the CHSL2RGB macro in colors.inc...

See you in Khyberspace!

Yadgar


Post a reply to this message

From: Mike Williams
Subject: Re: Albedo in PoV-Ray?
Date: 10 May 2009 16:26:16
Message: <baFQQdBVfzBKFwIA@econym.demon.co.uk>

>High!
>
>Mike Williams wrote:
>
>> For non-grey colours, the albedo is probably best represented by
>>.gray  (watch out for that American spelling, the UK English spelling
>>doesn't  work) which returns a value where the three components are
>>weighted in a  way that corresponds to the way the human eye responds.
>
>Is the .gray value equivalent to the luminosity value in the HSL model?
>I just started an animation of the Jovian moon Amalthea (albedo 0.09)
>using the CHSL2RGB macro in colors.inc...

No, they're very different.

color.gray responds in the same way as the pigments in the human eye.
The eye is more sensitive to green and less sensitive to blue. I believe
that the calculation is

   gray = R*0.297 + G*0.569 + B*0.114

The L in HSL is calculated using only two colours, the ones that have
the max and min values in RGB space:

   L = (max + min)/2

   pure red   gives gray=0.297 L=0.5
   pure green gives gray=0.569 L=0.5
   pure blue  gives gray=0.114 L=0.5

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

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