Nonvisible spectrum

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
naruto123sdo
Posts: 19
Joined: Mon Jun 14, 2021 9:47 pm

Nonvisible spectrum

Post by naruto123sdo »

Hi,

In my application, we use near infrared illumination light source and monochrome camera with long pass filters (wavelength below red will be filtered out), and we are trying to simulate that. I noticed Luxcore can transfer spectrum into RGB and then saved as BW in the rendered result, but is it possible to average the spectral response, so that a monochrome camera with filters can be simulated? Thanks.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Nonvisible spectrum

Post by Dade »

How does the filter works exactly ? Are you still working only in the visible Spectrum ?

If you filter just clamp the range wavelengths visible, you may need only to post process the final output of the rendering.

I mean, for instance, if a filter clamp the wavelengths between 625–700nm (i.e. only visible Red), you just need to multiply the RGB output for (1.0, 0.0, 0.0) to obtain the result.
Support LuxCoreRender project with salts and bounties
naruto123sdo
Posts: 19
Joined: Mon Jun 14, 2021 9:47 pm

Re: Nonvisible spectrum

Post by naruto123sdo »

Dade wrote: Tue Aug 10, 2021 10:27 am How does the filter works exactly ? Are you still working only in the visible Spectrum ?

If you filter just clamp the range wavelengths visible, you may need only to post process the final output of the rendering.

I mean, for instance, if a filter clamp the wavelengths between 625–700nm (i.e. only visible Red), you just need to multiply the RGB output for (1.0, 0.0, 0.0) to obtain the result.
Hi Dade, the filter clamps all the wavelengths below ~700 nm, and our illumination is above 800 nm, so its actually not working in the visible range. Is this possible to be simulated? Thanks.
bestman8
Posts: 16
Joined: Sat Jul 25, 2020 6:45 pm

Re: Nonvisible spectrum

Post by bestman8 »

naruto123sdo wrote: Tue Aug 10, 2021 2:57 pm
Dade wrote: Tue Aug 10, 2021 10:27 am How does the filter works exactly ? Are you still working only in the visible Spectrum ?

If you filter just clamp the range wavelengths visible, you may need only to post process the final output of the rendering.

I mean, for instance, if a filter clamp the wavelengths between 625–700nm (i.e. only visible Red), you just need to multiply the RGB output for (1.0, 0.0, 0.0) to obtain the result.
Hi Dade, the filter clamps all the wavelengths below ~700 nm, and our illumination is above 800 nm, so its actually not working in the visible range. Is this possible to be simulated? Thanks.
i dont know if luxcore can do it but for that you might want to look at mitsuba
naruto123sdo
Posts: 19
Joined: Mon Jun 14, 2021 9:47 pm

Re: Nonvisible spectrum

Post by naruto123sdo »

bestman8 wrote: Tue Aug 10, 2021 4:29 pm i dont know if luxcore can do it but for that you might want to look at mitsuba
Thank you, but I think its community is not as active as luxcore
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Nonvisible spectrum

Post by Dade »

naruto123sdo wrote: Tue Aug 10, 2021 2:57 pm Hi Dade, the filter clamps all the wavelengths below ~700 nm, and our illumination is above 800 nm, so its actually not working in the visible range. Is this possible to be simulated?
Not directly but it should be possible to workaround the problem: it is just a convection to interprete the 3 numbers in any color definition has the wavelength of Red, Green and Blue. Instead, for instance, you could look at them as a sample of 800nm, 850nm and 900nm wavelengths.

You have just to define the inputs according how you are interpreting the outputs. As long as the inputs are coherent with how you are interpreting the outputs, the results will be correct (with a caveat, see below).

So, for instance, if you define light emission as (<light emitted at 800nm>, <light emitted at 850nm>, <light emitted at 900nm>) and materials as (<light reflected at 800nm>, <light reflected at 850nm>, <light reflected at 900nm>), the rendering will be correct.

If you need to sample more wave lengths, you can render multiple images with different definitions and merge the results.

This is all true as long as you don't have any wavelength related interaction like dispersion: in this case the above trick doesn't work because the dispersion code assume to work on standard visible spectrum. But it is the only case where this trick doesn't work.
Support LuxCoreRender project with salts and bounties
naruto123sdo
Posts: 19
Joined: Mon Jun 14, 2021 9:47 pm

Re: Nonvisible spectrum

Post by naruto123sdo »

Dade wrote: Tue Aug 10, 2021 6:18 pm
naruto123sdo wrote: Tue Aug 10, 2021 2:57 pm Hi Dade, the filter clamps all the wavelengths below ~700 nm, and our illumination is above 800 nm, so its actually not working in the visible range. Is this possible to be simulated?
Not directly but it should be possible to workaround the problem: it is just a convection to interprete the 3 numbers in any color definition has the wavelength of Red, Green and Blue. Instead, for instance, you could look at them as a sample of 800nm, 850nm and 900nm wavelengths.

You have just to define the inputs according how you are interpreting the outputs. As long as the inputs are coherent with how you are interpreting the outputs, the results will be correct (with a caveat, see below).

So, for instance, if you define light emission as (<light emitted at 800nm>, <light emitted at 850nm>, <light emitted at 900nm>) and materials as (<light reflected at 800nm>, <light reflected at 850nm>, <light reflected at 900nm>), the rendering will be correct.

If you need to sample more wave lengths, you can render multiple images with different definitions and merge the results.

This is all true as long as you don't have any wavelength related interaction like dispersion: in this case the above trick doesn't work because the dispersion code assume to work on standard visible spectrum. But it is the only case where this trick doesn't work.
Hi Dade, this merging idea is excellent and it happens that I currently do not need dispersion. Thanks a lot!
Post Reply