Hi!
I've been working on an optical simulation where I'm sending a beam of light through a hole and then a prism to capture its dispersion. This has been working pretty well with LuxCoreRender and Blender. See the attached test render and nodes for the prism material. The lamp is currently an area lamp (with the laser setting on) and I'm using the bidirectional path tracer engine.
Now I would like to modify the lamp to use a custom spectrum. For example, I would like to get the effect that if I define a spectrum where there's no emission above 600 nm, the red part of the rainbow would disappear.
Is this behavior generally possible with LuxCoreRender, ideally from Blender? I found a few references that sounded like what I'm looking for, but I haven't been able to get it to work.
Is the right approach to define texture nodes on the lamp or not use a lamp at all and emit light from an object? I'm not sure how to do the former. For the latter, I was able to create a material using Irregular Data and Emission nodes and place an object where the light would be, but that seems to make the dispersion disappear altogether.
Thanks for any pointers!
Max
Spectral light and dispersion
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
- FarbigeWelt
- Donor
- Posts: 1046
- Joined: Sun Jul 01, 2018 12:07 pm
- Location: Switzerland
- Contact:
Re: Spectral light and dispersion
There are different ways. What about defining RGB = 0,1,1 instead 1,1,1. Or use another node as color input e.g. Lights>Irregular Spectrum.
Light and Word designing Creator - www.farbigewelt.ch - aka quantenkristall || #luxcorerender
MacBook Air with M1
MacBook Air with M1
Re: Spectral light and dispersion
LuxCoreRender does wave length related interactions "on-demand" (so it is not technically a full spectral render). At the moment, the only wave length related interaction has been implemented for glass dispersion.
However, for defining a spectrum with no emission above 600nm, the solution suggested FarbigeWelt should work: just use a an irregular data texture node (with a table of emissions for each wave length) as input of the light "color".
Re: Spectral light and dispersion
Since the laser light is not texturable, you will have to use a plane mesh (so you can use material nodes to do what Dade said).
However, a mesh light does not emit parallel light rays, so you will have to build a mesh tube around it.
Here is a thread with a file which was created for old LuxRender (you will have to re-create the materials, but you can see how to model the light and tube around it): http://www.luxrender.net/forum/viewtopi ... ser#p66844
I'm also attaching the file here in case the old forum goes down again.
However, a mesh light does not emit parallel light rays, so you will have to build a mesh tube around it.
Here is a thread with a file which was created for old LuxRender (you will have to re-create the materials, but you can see how to model the light and tube around it): http://www.luxrender.net/forum/viewtopi ... ser#p66844
I'm also attaching the file here in case the old forum goes down again.
- Attachments
-
- laser.zip
- (155.86 KiB) Downloaded 177 times
Re: Spectral light and dispersion
Using theta parameter of area light (and BiDir rendering), it should emit parallel rays
Re: Spectral light and dispersion
Here's an example scene (using a foggy world volume to show the beam).
- Attachments
-
- meshlight_laser.blend
- (1.26 MiB) Downloaded 188 times
Re: Spectral light and dispersion
Thanks for all the replies! I think I got what I was going for.
The crucial missing piece was that it seems like the Spread Angle in the Emission node needs to be set to exactly 0. Otherwise the dispersion just doesn't show up. I attached a new test render and the material nodes I used.
A few more things I was wondering about:
The crucial missing piece was that it seems like the Spread Angle in the Emission node needs to be set to exactly 0. Otherwise the dispersion just doesn't show up. I attached a new test render and the material nodes I used.
A few more things I was wondering about:
- What kind of interpolation is used for the Irregular Data, between the data points and outside of the specified range?
- Is the Irregular Data vector being normalized or used unmodified?
- Using material emission as the light source seems to work just fine, but in case I wanted to do the same thing using a lamp, how would I go about that? I don't see a Show Nodes button like when I set the material on an object.
- I would like to figure out how to use not only perfectly straight rays so that the left and right side of the rainbow become softer. How could I modify the light source to do that?
Re: Spectral light and dispersion
You can't use a lamp.
LuxCore's light sources are not node based, apart from the mesh light.
And since an area lamp is exactly the same as a mesh light, I decided it was not worth the effort to create a "use nodes" option for area lamps.