Wow, that’s pretty cool! ![]()
Just put out a new version.
Added this and your previous suggestions.
In the results tab, there’s a dropdown to select between the different scales. In red
Also aligned the plots in the viewport. When you go between the wall shot and the intensity plot (in green), they line up on the horizontal axis. If the intensity profile plots are stretched out, just shrink the width of the window.
Added surface roughness to smooth reflectors (yellow). The roughness value is height variation. Roughness scale is the distance over which the roughness is applied. Setting it to 0 disables it. Adding a value models random peaks on the surface and scatters the light. It adds processing time, so I have it off by default. You can play around with it and see what it does. At low roughness, it’s mostly a loss of intensity. Once it gets super high, it starts to behave like and OP. Makes sense.
Added a diffusion film simulation (purple). The angle is the FWHM diffusion angle. It scatters the rays on a bell curve based on this angle. Higher value, more dispersion. Dust doesn’t do too much unless you have a ton of it, at which point you’d reduce the transmissivity and a tiny bit of diffusion angle. Maybe a few degrees. Your guess is as good as mine
Let me know if you have any feedback!
No clue how it was developed! ACES was the default for UE4. six7 shared some good links earlier.
Epic games also has a cool interactive site where you can play with the curve and see the effect on renders:
Cool font. Reminds me of the picture where it looks like Ben Stiller if you stare at it and Beyonce if you zoom out and squint.
Here’s the M21B, SFT60 at 50m. -0.2mm, 0mm and +0.2mm
Above the focal point is definitely better than below.
Intensity plots, same order. Both out of focus hits the same-ish peak, but doesn’t maintain the hotspot as well. -0.2mm is definitely the worst.
Thank you so much (and to six7) for the resources! They’ll be a great read.
Thank you for these simulated beams, they are very informative!
It’s somewhat understandable that the negative offset has the worst throw: it indicates that the emitter is above the focal plane, which means it does not emit light backwards to hit the section of the reflector below its plane.
It is interesting to see how much more the negative offset changes the beam profile, compared to a positive offset of equal magnitude. In particular, the corona becomes much more pronounced. I think I have a hypothesis for why this is the case, but should work it out more carefully first.
Most throwers I’ve seen have the beam profile as indicated by the first (negative offset) simulation, which is a bit concerning. Though the intensity difference is definitely not visible to the naked eye, and it’s probably ok to prioritize beam aesthetics.
Love this new release! It’s very convenient to be able to adjust exposure post-rendering, and to automatically have all plots visible and ready to be saved.
The gridlines are super neat, when I get a moment I might run a couple emitter+reflector combos to check the formulas. I expect the hotspot and spill angles to hold up well; corona might be a bit iffy because I just learned that a pronounced corona is produced by a beam with a slight offset rather than perfect focus. It should be possible to determine the offset that produces the most pronounced corona and compute its angle, but I don’t know if that’s an interesting enough computation to justify doing. Maybe I should just go all in and incorporate offset as a model parameter.
It’s like Christmas - thank you! :-)
I may have missed it, but: is there a way to export the intensity plot as a spreadsheet? I’m interested in trying various transforms on it to better understand how each part of the beam behaves.
With a negative offset, the emitter sits below the focal plane, meaning that it’s between the focus and the vertex of the parabola. I think it’s because in this position, the beam always diverges, whereas when the emitter is above the focal plane, it will converge first, before diverging, so for the same offset magnitude, it’ll product a tighter beam.
Maybe with off the shelf throwers, they put the emitter a bit lower so that it gets a slightly wider corona. Makes it a bit more useable at close and mid range at the expense the hotspot width.
I think the most pronounced corona would be one that’s super out of focus. Would be interesting to see it included as a parameter! I included it because I noticed that gaskets usually come in 1 or 2 thicknesses, but emitter heights come in a bit of a range. At least for convoy, they’re usually within 0.2mm of the focus, except for the 11mm 7070 gasket. Most 7070 emitters are 1mm tall. That gasket is 1.4mm thick, so not sure what’s going on there.
Here you go. Export CSV in the results tab. It’ll create a CSV for each plot you have selected.
Thank you so much! I’ll think more and respond in detail a bit later.
For now another question has arisen: in your simulation, is the gasket perfectly absorptive and blocks all incident light, or does it diffusely reflect incident light? I’m curious because this can make a real difference in the beam profile close to the outer boundary of the “secondary corona”, which I will also attempt to model.
It’s set up as a black hole. I have a variable in there for gasket reflectively, but it’s currently a specular reflector, which is wrong. I was planning to change it to a diffuse model later.
If I read correctly, there should be a dedicated button to export the CSVs, but I’m not seeing it. Screenshot attached. Could there be some sort of bug that hides it from view?
Additionally, the top part of the plot (which should display info like focus offset) is not visible in the tab, and must be exported to become visible.
I made a v0.0.6 that has it: Release v0.0.6 · ylinmtl/flashlight-sim · GitHub
You should see this in the results tab.
You can just shrink the window width-wise and it’ll shrink the wall shot a bit and show the title.
That said, what’s your screen resolution? I’ll use that as the scale going forward
Thanks! I thought the version I downloaded this morning was the latest, but see that github indicates another update 3 hours ago. I can confirm that the export works!
My screen resolution is 1920x1200. Thanks for offering to use it as the scale!
Working on corona prediction with emitter offset. Generating beamshots at a usable resolution takes quite a while on my crappy machine. Third beam taken from M21B F150R, post 54.
If you happen to have more beamshots (and intensity plots) of round LES emitters, I would love to test some formulas on them! The ideal exposure would be the highest exposure that does not overexpose the center of the hotspot.
I’ll produce some high res wallshots and plots for the combinations below for you. I also added a batcher so you can queue up a bunch and leave it running.
Thank you so much!! Looking forward to testing some models against these wallshots.

















