[Radiance-general] sky definition

Rob Guglielmetti [email protected]
Tue, 14 Oct 2003 14:10:29 -0400


Hi Amarpreet,

Good timing, I was just eating lunch here...

[email protected] wrote:

> ... However the sky ...  is defined so easily even though it is so complex.

Well said; I wish more of our clients understood this very simple truth!

> Here are the questions:
> 1. All I do to specify the sun is write the following one line for the sun : 
> does gensky model the sun as a light material using these definitions?
> !gensky 4 11 13:0 +s -a (latitude) -o (longitude) -m (meridian) �B (horizontal 
> diffuse irradiance) �R (horizontal direct irradiance, can direct normal be 
> used?)

Gensky is very flexible, and simple, but added complexity is available. 
   =8-) The manpage explicitly lists all the options, but I don't 
believe specifying direct normal irradiance is an option.  You can 
specify the sun radiance, however.  Others can probably give better info 
on these options, as I tend to use the lat/long/timezone/TOD method.

> 2. Should skyfunc be defined by me before it is used as a modifier in the sky 
> definition, or does the skyfunc modifier take the input from the first line 
> (as above) to modify the glow command?  (pg 355 of RWR)

You've got it, skyfunc is *defined* by gensky, and *applied* by you in 
your subsequent source statements.  When you use skyfunc as a modifier 
right after the inline !gensky command, the sky glow is modeled using 
your input parameters from that gensky command.

> 3. Following parameters define the sky and I believe it is modified so as to 
> give a blue hue etc, but how is it determined as to what it should be for a 
> specific case?
> skyfunc glow skyglow
> 0
> 0
> 4 .986 .986 1.205 0 (these values are modified, sometimes 4 .9 .9 1 0 is used 
> also for sunny skies)
> 
> skyglow source sky
> 0
> 0
> 4 0 0 1 180

By specific case you mean sky color?  The color is totally arbitrary, 
however this is very important, the weighted average RGB must add up to 
1!  If you pick values that give you a pleasing sky color but add up to 
greater or less than 1, your sky luminance will be incorrect.  It will 
be factored by the deviation from 1 in your average.  And, .9 .9 1 
(which is used as an example blue sky on the gensky manpage) is just 
such a combination!  I mentioned this to Greg a little while ago, and I 
think it got fixed in the distribution, but the radiance website still 
has the error:

http://www.radiance-online.org/pipermail/radiance-general/2003-May/000789.html

(hmm, Schorsch, yours still has this error as well: 
http://www.schorsch.com/rayfront/manual/htmlman/gensky.html)


> 4. Similarly while defining the ground, what is the best way to determine what 
> the ground values for RGB should be � I have been contemplating between using 
> one of the following case but what should I base the decision on? How do you 
> judge as to what values should be used for your specific case?
> skyfunc glow ground_glow
> 0
> 0
> 4 1 .7 .25 0 (or 4 1 1 1 0 is used, I am guessing, for a uniform glow!)

Colorwise, the same thing applies for grounds and skies.  Use a color 
that makes sense and don't over saturate it, and make sure its weighted 
average equals 1.  As for ground reflectance, just make sure you specify 
the average ground reflectance in your gensky command with the -g 
parameter.  When skyfunc sees the negative z component to your ground 
hemisphere it will modify the reflectance of that glow by whatever 
factor you used in -g. When you use this feature, as long as the -g 
reflectance matches whatever material you use for your local ground 
plane, you will get a very good match (except at certain shallow viewing 
angles) between the local plane and the distant horizon.

----

      Rob Guglielmetti

e. [email protected]
w. www.rumblestrip.org