Page 1 of 1

Light sources using real world spectra

Posted: Tue Feb 20, 2018 5:55 pm
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

Re: Light sources using real world spectra

Posted: Wed Feb 21, 2018 4:19 pm
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).

Re: Light sources using real world spectra

Posted: Wed Feb 21, 2018 5:16 pm
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)?

Re: Light sources using real world spectra

Posted: Wed Feb 21, 2018 6:25 pm
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".

Re: Light sources using real world spectra

Posted: Wed Feb 21, 2018 6:42 pm
by B.Y.O.B.
I guess this frontend could be replicated in Python.

Re: Light sources using real world spectra

Posted: Mon Feb 26, 2018 10:42 pm
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