How to understand the material and geometry definition of sky and ground?

Hi Hao,

Maybe it would be best not to create a new topic for every question you have related to sky definitions. Since these are more discussions than simple questions and corresponding answers, it would feel less frantic to have just one thread rather than multiple ones going at the same time.

The output of gensky does not specify colors, which can vary with sky conditions and ground cover. However, if you want a match between your sky radiance/luminance values, you need to balance whatever color you specify for the glow such that:

0.265*R + 0.670*G + 0.065*B == 1

The above formula computes a Y-like channel from RGB, and making sure it’s unity keeps from changing the absolute values calculated in gensky.

Do the same thing for the ground color if you don’t have a gray ground. The -g option to gensky sets the average (Y) ground reflectance, so if you have an actual ground surface as well, it should be diffuse and use this -g setting times your groundglow color. In the example above, if you had the default “-g 0.2” setting in gensky, you can multiply 0.2 by the groundglow color to get the material for your ground plane:

void plastic ground_mat
0
5 0.16 0.22 0.16 0 0

ground_mat ring ground_plane
0
0
8 0 0 0 0 0 1 0 20

You shouldn’t make the ground plane too large – just big enough to capture any building shadows. Past the limit of the ground plane, you will see the groundglow in your description, so make sure that has the same color as your ground geometry.

I hope this helps.
-Greg

2 Likes