I wanted to have direct color control over sun, so I switched to distant and tried to increase size to also get nice blurry shadows.
However up to sun size of 0.04 the shadows are sharp and at 0.05 size the sun/distant light pretty much just dissapears.
Is this a known bug or some limitation? Is there a way to directly control sun light/temperature?
BTW I know I can somehow counterbalance sun color using the color input but that is just way to complicated way to control sun color.
distant light size
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Re: distant light size
This code in the addon is responsible:
The problem is that the distant light does not work with very small theta. In a normal-scaled scene you should not notice the transition between the light types.
Can you upload the scene (or a simpler scene that shows the problem)?
Maybe the scene is scaled very small?
Code: Select all
if lamp.luxcore.sun_type == "sun":
# sun
definitions["type"] = "sun"
definitions["dir"] = sun_dir
definitions["turbidity"] = lamp.luxcore.turbidity
definitions["relsize"] = lamp.luxcore.relsize
elif lamp.luxcore.theta < 0.05:
# sharpdistant
definitions["type"] = "sharpdistant"
definitions["direction"] = distant_dir
else:
# distant
definitions["type"] = "distant"
definitions["direction"] = distant_dir
definitions["theta"] = lamp.luxcore.theta
Can you upload the scene (or a simpler scene that shows the problem)?
Maybe the scene is scaled very small?
Re: distant light size
Ok,
I made a new scene, very basic.
It doesn't matter if I use metric at 0.01(cm) or at 1 or if I turn off unit scale completely.
Distant light does not work at all if it's size is 0.05 or above.
I made a new scene, very basic.
It doesn't matter if I use metric at 0.01(cm) or at 1 or if I turn off unit scale completely.
Distant light does not work at all if it's size is 0.05 or above.
- Attachments
-
- distantsize.blend
- (755.93 KiB) Downloaded 123 times
Re: distant light size
The problem is that the size of the distant light influences the amount of light it emits.
The sharpdistant light on the other hand always emits the same amount (because the size can't change).
So what happens in your scene is that as soon as the sharpdistant light gets replaced with the distant light by increased size, the amount of emitted light suddenly drops to something very low and only scales up slowly with increased size.
Try the following: Disable the world light, start a viewport render, and increase the light size.
The automatic tonemapper will adapt to the sudden brightness change.
With the sky enabled, the tonemapper will not adapt because the sky is still very bright.
The sharpdistant light on the other hand always emits the same amount (because the size can't change).
So what happens in your scene is that as soon as the sharpdistant light gets replaced with the distant light by increased size, the amount of emitted light suddenly drops to something very low and only scales up slowly with increased size.
Try the following: Disable the world light, start a viewport render, and increase the light size.
The automatic tonemapper will adapt to the sudden brightness change.
With the sky enabled, the tonemapper will not adapt because the sky is still very bright.
Re: distant light size
Thank you so much, now it works!B.Y.O.B. wrote: ↑Tue Sep 04, 2018 8:21 am The problem is that the size of the distant light influences the amount of light it emits.
The sharpdistant light on the other hand always emits the same amount (because the size can't change).
So what happens in your scene is that as soon as the sharpdistant light gets replaced with the distant light by increased size, the amount of emitted light suddenly drops to something very low and only scales up slowly with increased size.
Try the following: Disable the world light, start a viewport render, and increase the light size.
The automatic tonemapper will adapt to the sudden brightness change.
With the sky enabled, the tonemapper will not adapt because the sky is still very bright.
However If I wanted to use camera tonemapping/shutter speed etc close to real-like settings I have to use pretty high values for distant light.
Which makes me think how it affects performace?
Like if I use linear/autolinear tonemapping and low values for distant+sky intensity VS camera settings + high distant light values
Can I expect different performance cause of the insane numbers? Or it doesn't matter?
Re: distant light size
It doesn't matter for performance.
However if the values get too extreme, you might experience the limits of floating point accuracy (e.g. you could get visible banding in the sky).
See e.g. https://github.com/LuxCoreRender/LuxCore/issues/89 (the attached picture is from that issue)
However if the values get too extreme, you might experience the limits of floating point accuracy (e.g. you could get visible banding in the sky).
See e.g. https://github.com/LuxCoreRender/LuxCore/issues/89 (the attached picture is from that issue)