Spectral rendering and color management questions

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
irieger
Posts: 5
Joined: Mon Jul 02, 2018 7:45 pm

Spectral rendering and color management questions

Post by irieger »

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
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Spectral rendering and color management questions

Post by B.Y.O.B. »

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.
Burk
Posts: 29
Joined: Wed Jun 06, 2018 5:58 pm
Location: Hamburg, Germany

Re: Spectral rendering and color management questions

Post by Burk »

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 211 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: 5
Joined: Mon Jul 02, 2018 7:45 pm

Re: Spectral rendering and color management questions

Post by irieger »

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
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Spectral rendering and color management questions

Post by B.Y.O.B. »

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.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Spectral rendering and color management questions

Post by Dade »

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
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Spectral rendering and color management questions

Post by Dade »

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
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Spectral rendering and color management questions

Post by Dade »

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: 29
Joined: Wed Jun 06, 2018 5:58 pm
Location: Hamburg, Germany

Re: Spectral rendering and color management questions

Post by Burk »

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