## Sky color

Please use this forum for general user support and related questions.

Forum rules
Please include your operating system type/version, LuxRender version and Exporter version used when submitting a support post.

Make sure you have read the Release forum thread for Release and RC (Release Candidates) builds as these threads contain information on known problems and workarounds: Test Builds Forum

### Re: Sky color

B.Y.O.B. wrote:I meant that the greenish ground part in the image with 0.0 still is too bright.

It is what the model predict and what you can probably expect in reality. I have the feeling that the problem is arise from a balance from sky intensity and sun intensity more than ground albedo alone. Anyway, I could add a flag to render the lower hemisphere with a user defined color instead of what the model predict.

Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

### Re: Sky color

In Corona and Modo renderer it's possible to set ground albedo RGB values, so sky can be colored a little. It can be black if set to 0.0 if I remember correctly but I can check it. Indeed setting this to dark grey is what I meant.
Luxrender, Blender, Windows.
Eneen

Posts: 88
Joined: Fri Nov 26, 2010 8:19 am

### Re: Sky color

Ok, here are screens from Corona. I think It uses older version of model, because sun light power is too low (shadows too shallow).

Ground color: 0,0,0

Ground color: 60,60,60

Ground color: 120,120,120

Ground color: 255,0,0

Ground color: 120,120,120
Affected by sky color enabled

Horizon blur option set to: 0,1

Horizon blur option set to: 0,5
Luxrender, Blender, Windows.
Eneen

Posts: 88
Joined: Fri Nov 26, 2010 8:19 am

### Re: Sky color

I have added the support for (optional) ground color to Sky2:

It can be enabled with:

Code: Select all
scene.lights.skylight.type = sky2scene.lights.skylight.dir = 0.166974 -0.59908 0.783085scene.lights.skylight.turbidity = 2.2scene.lights.skylight.groundalbedo = 0.0 0.0 0.0scene.lights.skylight.gain = .00005 .00005 .00005### New parameters#scene.lights.skylight.ground.enable = 1scene.lights.skylight.ground.color = 0.45 0.0 0.0

Note 1: there is no relation between ".groundalbedo" and ".ground.color" but you may want to use similar colors for coherency.
Note 2: ".gain" is not applied to the ground color.
Note 3: The ground color is a value between 0.0 and infinity.

Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

### Re: Sky color

Added support in LuxBlend, but could not test because of compilation errors.

B.Y.O.B.

Posts: 5180
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

### Re: Sky color

The ".ground.color" parameter does not work here (always a black color).
Am I doing something wrong? Scene exported with filesaver attached.
Code: Select all
scene.lights.light-00000000097AC260.groundalbedo = 0 0 0scene.lights.light-00000000097AC260.ground.enable = 1scene.lights.light-00000000097AC260.ground.color = 0.780685544 0.0364960507 0.0364960507
Attachments
scene.zip

B.Y.O.B.

Posts: 5180
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

### Re: Sky color

It is likely to be this:

Dade wrote:Note 2: ".gain" is not applied to the ground color.
Note 3: The ground color is a value between 0.0 and infinity.

Tonemapping and sky gain ?

Have you tried to use something like:

Code: Select all
scene.lights.light-00000000097AC260.ground.color = 1000000.0 0.0 0.0

It is a light emission amount, not simply an RGB color.

Posts: 8404
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

### Re: Sky color

Dade wrote:Tonemapping and sky gain ?

Yes, I discovered that just now, too.
If I lower the sky gain to 0.00005 I can see the ground color.

Have you tried to use something like:
Code: Select all
scene.lights.light-00000000097AC260.ground.color = 1000000.0 0.0 0.0

that's the first thing I tried and strangely it does not work.

I think it would be more user friendly if the ground color was tied to the sky gain.

edit: Jens found that you are clamping the ground color here into 0..1 range: https://bitbucket.org/luxrender/luxrays ... ts.cppT212

B.Y.O.B.

Posts: 5180
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

### Re: Sky color

Hi

with:

Code: Select all
sl->groundColor = props.Get(Property(propName + ".ground.color")(Spectrum(.75f, .75f, .75f))).Get<Spectrum>().Clamp(0.f, INFINITY);

and in exporter:

Code: Select all
 groundcolor = list(lux_lamp.groundcolor * 100000 * energy)

it works also with "normal" light gains.

Althought the colorpicker in blender misbehaves, we should better multiply the cols by 100k ? ( would be a rounded multiplier, cause sunsky is typically 70k brighter )

EDIT: tested this for a while and seems a reasonable way to go. I'll commit this testwise.

Also coupled groundcol to energy, but this has an issue if gain > 1 and groundcolor is already maxed. Perhaps Dade can clarify what best clamp maxi is good in core

Jens

jensverwiebe

Posts: 3429
Joined: Wed Apr 02, 2008 4:34 pm

### Re: Sky color

Code: Select all
scene.lights.skylight.ground.autoscale = 1

to scale the ground color by the intensity of sky zenith, it seems to work quite well as it change with the general intensity of the sky.