distant light vs sunlight

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

distant light vs sunlight

Post by lacilaci »

distant light doesn't produce caustics, only sun does

distant:
distantlight.jpg
sunlight:
sunlight.jpg
Since we don't have direct control over sunlight in luxcore I would have to rely on postprocessing whitebalancing. We either need direct control over color or temperature on sun or make distant light act in the same way as sun (so that it can do caustics)
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: distant light vs sunlight

Post by Dade »

lacilaci wrote: Tue Aug 06, 2019 7:07 am distant light doesn't produce caustics, only sun does
Yes, this is normal: distant light is a not intersectable light source (i.e. all parallel rays coming for a direction) while sun is intersectable (i.e. a very far and small bright disk , the "relsize" parameter can be used to artificially increase the disk size and make caustics easier to render). They are two quite different types of light sources.
Support LuxCoreRender project with salts and bounties
User avatar
FarbigeWelt
Donor
Donor
Posts: 1046
Joined: Sun Jul 01, 2018 12:07 pm
Location: Switzerland
Contact:

Re: distant light vs sunlight

Post by FarbigeWelt »

Dade wrote: Tue Aug 06, 2019 8:41 am
lacilaci wrote: Tue Aug 06, 2019 7:07 am distant light doesn't produce caustics, only sun does
Yes, this is normal: distant light is a not intersectable light source (i.e. all parallel rays coming for a direction) while sun is intersectable (i.e. a very far and small bright disk , the "relsize" parameter can be used to artificially increase the disk size and make caustics easier to render). They are two quite different types of light sources.
Does this mean one can replace sun by a circle faced object? But then one gets a number of lights equal the number of triangles of the circle area.
What would be the amount of work to implement a round area light, intersectable in this case not like the (round) laser?
What is the amount of work if this round area light (with light count 1) can be set to blackbody temperature color?
Light and Word designing Creator - www.farbigewelt.ch - aka quantenkristall || #luxcorerender
MacBook Air with M1
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: distant light vs sunlight

Post by lacilaci »

I think distant light should work like sun (intersectable disc) just with proper full color controls
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: distant light vs sunlight

Post by Sharlybg »

lacilaci wrote: Tue Aug 06, 2019 10:07 am I think distant light should work like sun (intersectable disc) just with proper full color controls
You normally don't need that. normal sun + gain color just do the Job. any color any mood any shadow sharpness is possible with it.

Yes changing angle make sun color warmer or colder but it is easy to fix that with gain color in less than a second.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: distant light vs sunlight

Post by B.Y.O.B. »

FarbigeWelt wrote: Tue Aug 06, 2019 10:06 am Does this mean one can replace sun by a circle faced object?
No, because a circle shaped meshlight won't emit parallel light rays over the whole scene.
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: distant light vs sunlight

Post by lacilaci »

Sharlybg wrote: Tue Aug 06, 2019 10:20 am
lacilaci wrote: Tue Aug 06, 2019 10:07 am I think distant light should work like sun (intersectable disc) just with proper full color controls
You normally don't need that. normal sun + gain color just do the Job. any color any mood any shadow sharpness is possible with it.

Yes changing angle make sun color warmer or colder but it is easy to fix that with gain color in less than a second.
does this look like a blue sun to you?:
suncolor.jpg
no, sun color is right now some sort of counterbalance to actual sun color which depends on it's angle... this is as counter intuitive as it gets imho...
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: distant light vs sunlight

Post by Dade »

lacilaci wrote: Tue Aug 06, 2019 10:07 am I think distant light should work like sun (intersectable disc) just with proper full color controls
"If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck.": it is pointless to have 2 light sources that work in the same way.

The source of your problem is not being able to use textures in light source parameters. With old Lux it was possible and using the blackbody texture for light source gain/color, I think it is what you are looking for.

There are various way to address this problem:

1) add texture support for light source parameters;

2) add some specific support to LuxCore express gain/color with temperature/etc.

3) add some specific support to BlendLuxCore express gain/color with temperature/etc (it is a static transformation from color to color values).

They are all viable but we must stop adding new features to v2.2 or it is never going to be finished. I'm working on shadow terminator problem, than I have a pending DLSC rework and it is done. After that, only bug fixes.
Support LuxCoreRender project with salts and bounties
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: distant light vs sunlight

Post by lacilaci »

Dade wrote: Tue Aug 06, 2019 10:48 am
lacilaci wrote: Tue Aug 06, 2019 10:07 am I think distant light should work like sun (intersectable disc) just with proper full color controls
"If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck.": it is pointless to have 2 light sources that work in the same way.
I absolutely agree, I also agree that my problem could be solved by having direct color control over sun...
But I also have to ask... what is the purpose of distant light?
User avatar
lacilaci
Donor
Donor
Posts: 1969
Joined: Fri May 04, 2018 5:16 am

Re: distant light vs sunlight

Post by lacilaci »

From user perspective this could be solved in 2 ways.

1.make distant light literally the same as sunlight but give a direct color control over light.

2.get rid of distant light and give user a checkbox saying "direct light control" enabling color controls.

having distant light is pointless as long as it's non intersectible and you have to use crazy values to turn it into substitute of sun(which you never really can cause it won't cast caustics)... Unless there is a specific reason that I'm not aware of why this even exists..
Post Reply