Light source color temperature

Discussion related to the LuxCore functionality, implementations and API.
Post Reply
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Light source color temperature

Post by Dade »

I added the support to all light sources of ".temperature" and ".temperature.normalize" properties to set light color temperature. For instance:

Code: Select all

scene.lights.l1.type = point
scene.lights.l1.position = -3.0 -5.0 4
scene.lights.l1.gain = 500 500 500
# Set the light source color temperature, if set to -1, disable it
scene.lights.l1.temperature = 8000
scene.lights.l1.temperature.normalize = 0
It works also for material emission:

Code: Select all

scene.materials.whitelight.type = matte
scene.materials.whitelight.kd = 0.0 0.0 0.0
scene.materials.whitelight.emission = 1 1 1
scene.materials.whitelight.emission.gain = 10 10 10
# Set the light source color temperature, if set to -1, disable it
scene.materials.whitelight.emission.temperature = 8000
scene.materials.whitelight.emission.temperature.normalize = 0
Note: this makes also the use of blackbody texture not necessary.

See viewtopic.php?f=4&t=2586 to check where this is all coming from.
Support LuxCoreRender project with salts and bounties
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Light source color temperature

Post by B.Y.O.B. »

What would be sensible min/max limits for this property?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light source color temperature

Post by Dade »

B.Y.O.B. wrote: Mon Sep 21, 2020 3:02 pm What would be sensible min/max limits for this property?
The range is something around 0-13000.
Support LuxCoreRender project with salts and bounties
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Light source color temperature

Post by B.Y.O.B. »

It looks like this option does not work on "constantinfinite" lights, maybe a bug/copy paste mistake?
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light source color temperature

Post by Dade »

B.Y.O.B. wrote: Mon Sep 21, 2020 7:00 pm It looks like this option does not work on "constantinfinite" lights, maybe a bug/copy paste mistake?
May be, I didn't tested all light sources, I will check.
Support LuxCoreRender project with salts and bounties
User avatar
B.Y.O.B.
Developer
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Light source color temperature

Post by B.Y.O.B. »

This is now supported in the Blender addon.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light source color temperature

Post by Dade »

Dade wrote: Mon Sep 21, 2020 10:20 pm
B.Y.O.B. wrote: Mon Sep 21, 2020 7:00 pm It looks like this option does not work on "constantinfinite" lights, maybe a bug/copy paste mistake?
May be, I didn't tested all light sources, I will check.
I forgot to write I Should have fixed this problem.
Support LuxCoreRender project with salts and bounties
Post Reply