Sky color

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

Moderators: Dade, coordinators

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

Postby Dade » Sun Nov 29, 2015 9:59 am

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.
User avatar
Dade
Developer
 
Posts: 8363
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Sky color

Postby Eneen » Sun Nov 29, 2015 1:34 pm

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: 87
Joined: Fri Nov 26, 2010 8:19 am

Re: Sky color

Postby Eneen » Mon Nov 30, 2015 7:14 am

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

c_sky_ground-000.jpg

Ground color: 0,0,0

c_sky_ground-060.jpg

Ground color: 60,60,60

c_sky_ground-120.jpg

Ground color: 120,120,120

c_sky_ground-255R.jpg

Ground color: 255,0,0

c_sky_ground-120_affected_by_sky.jpg

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

c_sky_horizon_blur_01.jpg

Horizon blur option set to: 0,1

c_sky_horizon_blur_05.jpg

Horizon blur option set to: 0,5
Luxrender, Blender, Windows.
Eneen
 
Posts: 87
Joined: Fri Nov 26, 2010 8:19 am

Re: Sky color

Postby Dade » Sun Dec 06, 2015 6:03 am

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

sky.jpg


It can be enabled with:

Code: Select all
scene.lights.skylight.type = sky2
scene.lights.skylight.dir = 0.166974 -0.59908 0.783085
scene.lights.skylight.turbidity = 2.2
scene.lights.skylight.groundalbedo = 0.0 0.0 0.0
scene.lights.skylight.gain = .00005 .00005 .00005
#
## New parameters
#
scene.lights.skylight.ground.enable = 1
scene.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.
User avatar
Dade
Developer
 
Posts: 8363
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Sky color

Postby B.Y.O.B. » Sun Dec 06, 2015 7:51 am

Added support in LuxBlend, but could not test because of compilation errors.
User avatar
B.Y.O.B.
Developer
 
Posts: 5140
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

Re: Sky color

Postby B.Y.O.B. » Sun Dec 06, 2015 9:41 am

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 0
scene.lights.light-00000000097AC260.ground.enable = 1
scene.lights.light-00000000097AC260.ground.color = 0.780685544 0.0364960507 0.0364960507
Attachments
scene.zip
(1.54 KiB) Downloaded 47 times
image.png
User avatar
B.Y.O.B.
Developer
 
Posts: 5140
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

Re: Sky color

Postby Dade » Sun Dec 06, 2015 10:33 am

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.
User avatar
Dade
Developer
 
Posts: 8363
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

Re: Sky color

Postby B.Y.O.B. » Sun Dec 06, 2015 10:52 am

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
User avatar
B.Y.O.B.
Developer
 
Posts: 5140
Joined: Wed Nov 10, 2010 4:10 pm
Location: Germany

Re: Sky color

Postby jensverwiebe » Sun Dec 06, 2015 11:25 am

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
User avatar
jensverwiebe
Developer
 
Posts: 3407
Joined: Wed Apr 02, 2008 4:34 pm

Re: Sky color

Postby Dade » Sun Dec 06, 2015 12:16 pm

I added a new parameter:

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.
User avatar
Dade
Developer
 
Posts: 8363
Joined: Sat Apr 19, 2008 6:04 pm
Location: Italy

PreviousNext

Return to LuxRender User Support

Who is online

Users browsing this forum: Google [Bot] and 3 guests