Spectral rendering and color management questions

Use this forum for general user support and related questions.
Post Reply
irieger
Posts: 2
Joined: Mon Jul 02, 2018 7:45 pm

Spectral rendering and color management questions

Post by irieger » Tue Jul 03, 2018 6:14 am

Hello,

I'm currently playing with LuxCoreRender to render glass and try to do some tests to simulate real world image data(camera data). One of the core features I want to try with Lux is spectral rendering for better rendering of dispersion and some testing with spectra rendering in general. Now I have a few questions:
  • How is spectral rendering activated? Can't find the option for it even in some samples for glass refraction and dispersion from this forum/the sample git I see nothing special. How is the number of spectral bands to use set?
  • a) How is the conversion from spectra to RGB done? Integration over CIE-XYZ or LMS and conversion from there I guess?
    b) Is it possible, to use another spectral response curve like a measured camera response for experiments? As in general camera color response isn't just a linear combination of the human spectral response and therefore it isn't enough to just do a color conversion afterwards.
    c) Can the image be exported in it's wavelength channels as a multichannel exr? Would be nice for simulations where you want to create multispectral image information in a pbr manner but process the spectral data outside of Lux.
  • How is going from RGB to spectrum done when rendering spectral for material and textures with 3 colors?
    I'd guess using something like "Physically Meaningful Rendering using Tristimulus Colours" (Meng et. al. 2015)/"Reproducing Spectral Reflectances From Tristimulus Colours" (Otsu et. al. 2018)
  • How is the state of color management in Lux? As I found no option and nothing on the luxcorerender.org site hints at it, I guess there is currently the assumption that everything is sRGB? When rendering in a three color model it would work to just color manage outside Lux even if it would preferable to have some options inside. But for spectral rendering it is crucial to have color management as the source color space is a need to know when trying to recover a valid spectral reflectance curve for a color.
So this got a bit lengthy but as I wasn't able to find those information after quite some search I hope it can be answered here.


Greetings,
Ingmar

User avatar
B.Y.O.B.
Developer
Posts: 1211
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Spectral rendering and color management questions

Post by B.Y.O.B. » Tue Jul 03, 2018 9:24 am

irieger wrote:
Tue Jul 03, 2018 6:14 am
How is spectral rendering activated? Can't find the option for it even in some samples for glass refraction and dispersion from this forum/the sample git I see nothing special. How is the number of spectral bands to use set?
LuxCore does not support spectral rendering currently.
The glass materials uses some tricks to simulate it, which are activated if the "dispersion" value of the glass is greater than 0.
Support LuxCoreRender project with salts and bounties

Burk
Posts: 16
Joined: Wed Jun 06, 2018 5:58 pm
Location: Hamburg, Germany

Re: Spectral rendering and color management questions

Post by Burk » Tue Jul 03, 2018 10:03 am

B.Y.O.B. wrote:
Tue Jul 03, 2018 9:24 am
The glass materials uses some tricks to simulate it, which are activated if the "dispersion" value of the glass is greater than 0.
I tried that and it works. But:
For me it seems the spectral colors are not in the correct order.
See:
Prisma4 Test.blend
(665.02 KiB) Downloaded 7 times
In the final rendering the order is: red-green-yellow-violett-blue. It should be red-yellow-green-blue-violett. Is'nt it?

irieger
Posts: 2
Joined: Mon Jul 02, 2018 7:45 pm

Re: Spectral rendering and color management questions

Post by irieger » Wed Jul 04, 2018 8:39 am

Ok, thank you. Read about spectral rendering without too much information on it but thought it meant that Lux can now work fully spectral. However, how about my questions regarding color management? Especially as it matters for the part where we go spectral and back.

User avatar
B.Y.O.B.
Developer
Posts: 1211
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Spectral rendering and color management questions

Post by B.Y.O.B. » Wed Jul 04, 2018 8:55 am

irieger wrote:
Wed Jul 04, 2018 8:39 am
Read about spectral rendering without too much information on it but thought it meant that Lux can now work fully spectral.
Well, "Lux" is a bit unspecific.
Old "Classic" LuxRender is indeed spectral, but it is no longer developed.
The new LuxCore(Render) is currently an RGB renderer.

All questions which I did not address are questions I don't know the answer to.
Dade can probably help you there.
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 1144
Joined: Mon Dec 04, 2017 8:36 pm

Re: Spectral rendering and color management questions

Post by Dade » Wed Jul 04, 2018 9:15 am

B.Y.O.B. wrote:
Wed Jul 04, 2018 8:55 am
Dade can probably help you there.
LuxCore does spectral rendering on demand and only when necessary (and supported). At the moment, the only wave length related interaction supported by LuxCore is dispersion.
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 1144
Joined: Mon Dec 04, 2017 8:36 pm

Re: Spectral rendering and color management questions

Post by Dade » Wed Jul 04, 2018 9:21 am

irieger wrote:
Tue Jul 03, 2018 6:14 am
b) Is it possible, to use another spectral response curve like a measured camera response for experiments? As in general camera color response isn't just a linear combination of the human spectral response and therefore it isn't enough to just do a color conversion afterwards.
There is a camera response plugin for the image pipeline: https://github.com/LuxCoreRender/LuxCor ... sponse.cpp

It can be used with one of the pre-defined cameras or a custom table.
irieger wrote:
Tue Jul 03, 2018 6:14 am
c) Can the image be exported in it's wavelength channels as a multichannel exr? Would be nice for simulations where you want to create multispectral image information in a pbr manner but process the spectral data outside of Lux.
Nope, the rendering is all done in sRGB, only the event of a wavelength related interaction (like with dispersion) is done using spectral.
Support LuxCoreRender project with salts and bounties

User avatar
Dade
Developer
Posts: 1144
Joined: Mon Dec 04, 2017 8:36 pm

Re: Spectral rendering and color management questions

Post by Dade » Wed Jul 04, 2018 9:30 am

Burk wrote:
Tue Jul 03, 2018 10:03 am
In the final rendering the order is: red-green-yellow-violett-blue. It should be red-yellow-green-blue-violett. Is'nt it?
The order is purple-blue-green-yellow-red (or reversed, it depends from where you are looking at the caustic): https://en.wikipedia.org/wiki/Rainbow#/ ... bow_01.png

as in the related code: https://github.com/LuxCoreRender/LuxCor ... ss.cpp#L36

Something not matching :?:
Support LuxCoreRender project with salts and bounties

Burk
Posts: 16
Joined: Wed Jun 06, 2018 5:58 pm
Location: Hamburg, Germany

Re: Spectral rendering and color management questions

Post by Burk » Wed Jul 04, 2018 3:07 pm

Dade wrote:
Wed Jul 04, 2018 9:30 am
Something not matching :?
Yes, I got these pictures from rendering the blend-file above with order of colors as blue-purple-yellow-green-yellow-red:
Zoom:
Prism4 spectrum order zoom.png
I now found that it is possibly an effect from the volume scattering, where the different colors overlay. With scattering scale=.00001 the order of color is correct. I got this picture:
prism4 v2 Test mit volume scattering .00001.png

Post Reply