Light sources using real world spectra

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.
Post Reply
lighting_freak
Posts: 234
Joined: Thu Jan 18, 2018 6:02 pm

Light sources using real world spectra

Post by lighting_freak »

Hi,

is there an option available in lux core that makes light sources emitting real world colors.
In classic lux was a "tabulated data" option that allows to include digitized spectral spread sheets.
Is this feature already somewhere hidden in lux core?

BR
OS - Windows 7 X64
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light sources using real world spectra

Post by Dade »

lighting_freak wrote: Tue Feb 20, 2018 5:55 pm is there an option available in lux core that makes light sources emitting real world colors.
In classic lux was a "tabulated data" option that allows to include digitized spectral spread sheets.
Is this feature already somewhere hidden in lux core?
Yes, there is the support for blackbody, irregulardata, lampspectrum, etc. however they are textures and they can be used only in for the emission of materials and volumes (i.e. for area lights). All the not intersectable, environmental lights can use only constant values (not textures).

For instance the syntax of irregulardata texture is:

Code: Select all

scene.textures.<tex_name>.type = irregulardata
scene.textures.<tex_name>.wavelengths = <a vector of wave lenghts>
scene.textures.<tex_name>.data = <a vector of values>
scene.textures.<tex_name>.resolution = <float>
scene.textures.<tex_name>.emission = <1 if used for a light source, 0 otherwise>
It should be the same of old Lux (syntax aside).
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 sources using real world spectra

Post by B.Y.O.B. »

The irregular data texture is already usable in BlendLuxCore.
(Material node tree, Add menu -> Light -> Irregular Data)

I did not see a "tabulated data" texture in the LuxCore SDL manual - is irregular data the same with a different name, or is it not available (yet)?
Attachments
scrn_2018-02-21_18-14-31.png
scrn_2018-02-21_18-14-31.png (12.25 KiB) Viewed 4483 times
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Light sources using real world spectra

Post by Dade »

B.Y.O.B. wrote: Wed Feb 21, 2018 5:16 pm The irregular data texture is already usable in BlendLuxCore.
(Material node tree, Add menu -> Light -> Irregular Data)

I did not see a "tabulated data" texture in the LuxCore SDL manual - is irregular data the same with a different name, or is it not available (yet)?
"Tabulated data" was just a front-end to "irregular data" in old lux (notice the "return new IrregularDataTexture(n, &wl[0], &data[0], resolution);" at the end): https://bitbucket.org/luxrender/lux/src ... ew-default

So it was basically an utility but you can achieve the same results using directly "irregular data".
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 sources using real world spectra

Post by B.Y.O.B. »

I guess this frontend could be replicated in Python.
lighting_freak
Posts: 234
Joined: Thu Jan 18, 2018 6:02 pm

Re: Light sources using real world spectra

Post by lighting_freak »

Hi,

having spectra that code special white lights from 380nm up to 780nm using a sampling of 5 to 10nm makes the irregular data input kind of confusing, doesn't it?

BR
OS - Windows 7 X64
CPU - Intel CORE i7
GPU1 - Variants of notebook card from nVidia
GPU2 - Variants of notebook onboard card from Intel
Lux - Latest possible relaease
Post Reply