Page 1 of 1

Nonvisible spectrum

Posted: Mon Aug 09, 2021 11:50 pm
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.

Re: Nonvisible spectrum

Posted: Tue Aug 10, 2021 10:27 am
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.

Re: Nonvisible spectrum

Posted: Tue Aug 10, 2021 2:57 pm
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.

Re: Nonvisible spectrum

Posted: Tue Aug 10, 2021 4:29 pm
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

Re: Nonvisible spectrum

Posted: Tue Aug 10, 2021 4:56 pm
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

Re: Nonvisible spectrum

Posted: Tue Aug 10, 2021 6:18 pm
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.

Re: Nonvisible spectrum

Posted: Tue Aug 10, 2021 6:36 pm
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!