Page 1 of 2

Show light intensity of laser beams more precisely

Posted: Fri Aug 24, 2018 10:43 am
by Burk
I use LuxCoreRender 2.0 a lot to visualize light paths:
  • I send a laser beam through the setup of an experiment and track with the Bidir engine which path the laser beam takes.
  • This works very well for all reflections and refractions.
  • The light intensity of the different parts of the ligth path are calculated manually by me using the fresnel equations and are noted in Photoshop on the picture rendered from LuxCore, e.g. for a laser in water in a container in air (laser in black by inversion in photoshop, container in blue):
laser in water in container.png
The color intensity indicates the light intensity of the laser beam but not very exactly. Is it somehow possible to show the light intensity of the laser beam and its resulting parts more precisely, e.g. by annotating automatically or by coloring the beam?

(The volume absorption color is not sufficient here, as it is calculated only by the length of the path, but it would have to be calculated according to the light intensity due to refraction or reflection, depending on the incidence angle and the optical density of the materials involved.)

Re: Show light intensity of laser beams more precisely

Posted: Fri Aug 24, 2018 3:16 pm
by Dade
Burk wrote: Fri Aug 24, 2018 10:43 am The color intensity indicates the light intensity of the laser beam but not very exactly. Is it somehow possible to show the light intensity of the laser beam and its resulting parts more precisely, e.g. by annotating automatically or by coloring the beam?
Volume scattering will eventually scatter the light in laser beam toward the camera and will make the laser light, inside the volume, visible. This will however affect (uniformly) the amount of light transported by the laser beams.

The question is what are you exactly trying to obtain, a measured numeric values of the light beams, only a visual feedback, etc. :?:

Re: Show light intensity of laser beams more precisely

Posted: Fri Aug 24, 2018 4:01 pm
by Burk
Dade wrote: Fri Aug 24, 2018 3:16 pm Volume scattering will eventually scatter the light in laser beam toward the camera and will make the laser light, inside the volume, visible. This will however affect (uniformly) the amount of light transported by the laser beams.
Yes, for my pictures (see above) I currently use a world volume with white scattering (hence black when inverted in photoshop). The scattering scale is 0.1 which is a compromise between visibility and outshining and the change of geometry by brightly shining laser beams.
Dade wrote: Fri Aug 24, 2018 3:16 pm
The question is what are you exactly trying to obtain, a measured numeric values of the light beams, only a visual feedback, etc. :?:
Best would be an automatic notation of each part of the ligth path like I have started manually in my picture. Similar to the Blender viewport with lengths and angles ;) . But I think I cannot expect that.

Second best would be a visualization of the light intensity by colours. Starting with a white laser the colour could change according to the remaining light intensity. So, for example red for >50%, yellow for >25%, green for >12%, light blue for >6%, blue for >3%, purple for >1%

In luxCoreRender there is probably the absolute value for the light intensity available, otherwise the white scattering could not be graded so well.
Perhaps it is possible to calculate this absolute value as a percentage of the initial light intensity of the laser and to choose the color accordingly from the color wheel.

That would, however, exceed my current capabilities and I would probably first have to learn Phyton for LuxCore :? .

Re: Show light intensity of laser beams more precisely

Posted: Fri Aug 24, 2018 6:41 pm
by Dade
Burk wrote: Fri Aug 24, 2018 4:01 pm Second best would be a visualization of the light intensity by colours. Starting with a white laser the colour could change according to the remaining light intensity. So, for example red for >50%, yellow for >25%, green for >12%, light blue for >6%, blue for >3%, purple for >1%
You are somewhat describing the result of the contour lines image pipeline plugin: http://www.luxrender.net/forum/viewtopi ... =8&t=11440

It may be a solution to your problem. Anyway you can get and HDR image out of LuxCore with a absolute (16bit) floating value for each pixel and it can be post processed as you want.

Re: Show light intensity of laser beams more precisely

Posted: Fri Aug 24, 2018 9:01 pm
by Burk
Dade wrote: Fri Aug 24, 2018 6:41 pm
Burk wrote: Fri Aug 24, 2018 4:01 pm Second best would be a visualization of the light intensity by colours. ...
You are somewhat describing the result of the contour lines image pipeline plugin: http://www.luxrender.net/forum/viewtopi ... =8&t=11440

It may be a solution to your problem.
That seems very, very interesting. It seems to be exactly the solution for my question,

Where do I find that and what is to do to let it work ??

The last entry was the answer to the question of B.Y.O.B.:
Postby Dade » Fri Dec 26, 2014 11:29 am
B.Y.O.B. wrote:
"I guess this AOV is not yet exposed by pyluxcore? I can't find it here: https://bitbucket.org/luxrender/luxrays ... lt#cl-1009"
Wait, still work in progress (anyway, it is going to be on "for_v1.5" branch).

Re: Show light intensity of laser beams more precisely

Posted: Fri Aug 24, 2018 10:32 pm
by B.Y.O.B.
If you use Blender and the new BlendLuxCore addon, you can just enable the contour lines plugin in the imagepipeline settings and start the render (it even works in viewport render).
You can adjust the settings during the final render, they will be updated without restart necessary.

However, from my experience: it is a bit hard to find the right values for the different parameters of the contour lines.
Here is an example scene: viewtopic.php?f=4&t=374&p=4134&hilit=ir ... tour#p4133

If you don't use Blender and the addon: the linked thread also contains examples how to use the contour lines plugin from the Python API.

Re: Show light intensity of laser beams more precisely

Posted: Sat Aug 25, 2018 9:16 pm
by lighting_freak
Hi,

I think, that there might be way of creating tiny tubes following Basic optical equations by using a CAD-Environment (Freecad). Most of them are coming with some macro-interface. You could try to create the geometry and create also some 3D annotations the will write the intensity.

A next step might be to Export the mesh of those shapes into lux core render (using lux core api) and make a light source with the calculated intensities out of each "beam).

I don´t know how often this type of Task is on your desk, creating such a Project will take some time in the first shot.
All upcoming Tasks will be more quick.

BR

Re: Show light intensity of laser beams more precisely

Posted: Sun Aug 26, 2018 11:43 am
by Burk
lighting_freak wrote: Sat Aug 25, 2018 9:16 pm creating tiny tubes following Basic optical equations ...
Thank you for your suggestion, lighting_freak. But that will not work for me.
The geometry is done very well by LuxCoreRender for the calculation of angles of refraction and reflection. (see my picture above which is the result of LuxCoreRender. It shows even the light intensity by colour intensity of the respective part of the light path.
lighting_freak wrote: Sat Aug 25, 2018 9:16 pm I don´t know how often this type of Task is on your desk ...
That is the essential point. Currently I have many tasks of this type.
The setups are often geometrically more complicated than the example above. I also have to analyse many angles for the initial laser beam.
Over all I'd like to avoid manual handling of the pictures (like making labels for each part of the light path).

Therefore, I am currently pursuing the advice of Dade and B.Y.O.B. to use Irridiance Contour Lines.

Re: Show light intensity of laser beams more precisely

Posted: Sun Aug 26, 2018 5:25 pm
by lighting_freak
Hi,

as you wish. My proposal was a completly automatic process of generation of beams and labels (and finaly a lux core scene).
One more question if it's allowed... whats the used media in your first beam intersection (100% to 14% reflection and 86% refraction)

BR

Re: Show light intensity of laser beams more precisely

Posted: Sun Aug 26, 2018 9:17 pm
by Burk
lighting_freak wrote: Sun Aug 26, 2018 5:25 pm My proposal was a completly automatic process of generation of beams and labels ...
That is interesting. How could I get that done automatically?
lighting_freak wrote: Sun Aug 26, 2018 5:25 pm whats the used media in your first beam intersection (100% to 14% reflection and 86% refraction)
The interface was water to air (IOR=1.333, IOR=1.000). Incidence angle = 45°, refraction angle = 70.5°. Refectivity = 14%.