## Axial Lights II (Ghostbuster?)

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

mjkzz
Posts: 1565
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

### Re: Axial Lights II (Ghostbuster?)

by "faint third one", I meant the third faint one on the lower side, it is the refracted ray and its corresponding reflected ray out on the other side is too weak to be seen

mjkzz
Posts: 1565
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

### Re: Axial Lights II (Ghostbuster?)

OK, can not stop thinking .

In the physics class PDF, I believe the percentage of reflection is total percentage loss, ie, loss on first surface plus loss on 2nd surface. So if R is reflectivity, the the total loss is R + (1-R) * R. From Wiki, formula based on Fresnel equations is as below:
Then calculating R for the range 40 to 50 for glass with n=1.52, gives about 4% to 6%, meaning the secondary rays and transmitted rays has a ratio of (0.04)*(0.04) = 9.3 stops and (0.06)*(0.06) = 8.1 stop. With an 8bit camera, that literally means, even if you have a dot of 255 value, its ghost would be clipped to zero. NO ghost

Here is a graph of reflectivity vs incident angle using newly discovered and highly recommended site where you can actually type in an expression and plot a graph with it. Note, when we talk about percent of amount of light, we are talking about the square of the r  the power ratio.
Hope this clarifies things a bit

mjkzz
Posts: 1565
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

### Re: Axial Lights II (Ghostbuster?)

If you look at the formula for the secondary rays, it will have intensity of (1-R)^2*R^2, plotting it and you will see a local maxima at R=0.5. If you can do some calculus by taking derivatives, same. Note, it actually is a maxima because R can not be greater than 1. That corresponds to about 82 degrees (edit, 1.44 rad) of incident angle.

mjkzz
Posts: 1565
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

### Re: Axial Lights II (Ghostbuster?)

Regarding Rik's double pane windows, I think scattering is occurring there. Here is a setup I tried and I actually risked my eyes by looking into the laser through these two thick acrylic boards. Unfortunately, when I tried to re-arrange things to photograph it, I broke the laser

Once major test is to shine the laser head on to the boards, ie, at normal. So in this case, there will be no or minimum reflection to the side (will have straight back reflection). What I saw was that I see multiple lines if I view it from an angle, say 45 degrees. But there is only one line coming out. This suggests there are some kind of scattering on the surface of these boards (after all, they are part of frameless picture frame for photos from 15 years ago). I did not count how many lines as I was kinda nervous looking into a laser. The scattering of light is a game changer

But, those groups of images in Rik's images suggest something more than scattering -- they seem to be further apart from original xmas light. Because these xmas lights are emitting lights, there will be all kind of incident angles hitting the glass and starting certain angle, reflectivity becomes high, and with scattering, an image will start to form and seen by camera. The images might appear stretched out due to high reflectivity starts after incident angle becomes larger and somehow I think integration along some path is happening.

Anyways, I think the double pane thing is beyond my ability to analyse it

mjkzz
Posts: 1565
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

### Re: Axial Lights II (Ghostbuster?)

Last post

Here is a graph showing incident angle x vs number of stops the "ghost" is weaker. The 0.89 is radian where you maintain -8 stops, so translating that into degree is 51 degrees, taking 45 degrees out, we get 6 degrees. I think this is about the same as half angle of view for a 100mm macro set at 1:1 (like Canon 100mm macro) in horizontal direction. For lenses like Laowa 100mm set at 2x, this is not a problem at all. And most importantly, the cut off is -8 stops. Raising cutoff to -7 stops, still significant, it is about at 57.3 degrees, take 45 degrees out, we get 12.3 degree. I think that is more than enough, even for a non-macro lens where you probably will not get 1:1 magnification.

Given narrow angle of view, if we ignore light paths that has two or more reflections occurring, I think it is pretty safe to use my original diagram As really, that is what I observed, so in a sense, I am extremely lucky in many aspects, that is really beginner's luck

mjkzz
Posts: 1565
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

### Re: Axial Lights II (Ghostbuster?)

Made a video about how light ray behave when it shines over a glass. Since I have ZERO knowledge in optics, I think this might be very useful for others like me (if there is any) because I find it fascinating, never thought about it nor could imagine it -- things get really interesting when incident angle is very large, at some point, internal reflection starts occurring, not quite total but amazing. Here are some key points:

1. If I swing the incident angle even between 35 and 55 (-+ 10degrees), I really do not see any secondary rays, they are so faint even if I zoom in.
2. At 65 degrees (45+20), very, very faint secondary rays, I have to zoom in and look for it hard
3. At extreme incident angles, internal reflection start to occur

All these seem to play out well with what I have learned, and of course, if the simulation was built upon the theories I learned, it should But it is really what I observed, too, so I believe it. If it is true, I think this stuff should be "common knowledge", ie, a "given" for other related discussions here. Here is the video I made. The tool is free to use, so I highly recommend people building it themselves. Here is the site. Important note: the glass there is called "half-plane", you can think of it as glass with INFINITE thickness, however, you can use two to build a glass with certain thickness. Have fun.

Here is an image to entice reader to try it themselves

rjlittlefield
Posts: 23034
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

### Re: Axial Lights II (Ghostbuster?)

mjkzz wrote:
Fri Jan 28, 2022 5:44 pm
... [ray tracing] tool .... Here is the site.
Thank you very much for finding this tool!

For my purposes, this tool has several very nice features:
• It properly simulates ray-splitting by refraction/reflection.
• It is open-source and simple enough to modify. (Source code available at https://github.com/ricktu288/ray-optics )
• It was written by somebody other than me.
So, with those things in mind, let me try explaining the double-pane reflections.

First, here is a screen capture of the program's output using the public site:

If you look very Very closely at the upper section, you can see a second ray that emerges close to first one.

By pulling the screen capture into Photoshop and adding a levels adjustment, some further information becomes apparent:

Interesting! Now we can see that there is a second pair of reflections, widely separated from the first!

But why are there only two rays in each pair?

It turns out there are two reasons for this:
1. The screen capture is only 8 bits deep, so that any weaker reflections will never register in the display. No amount of levels adjusting will make a third pair visible.
2. The program is written to totally discard any ray whose power is less than 0.01.

To work around these issues, I made two changes to the source code:
1. Rather than draw each ray with a visual intensity that matches its power, instead draw each ray at a fixed power. (We'll access the actual power a different way later.)
2. Reduce the threshold so that rays are discarded only if their power drops below 0.0000001 . (The program needs some non-zero threshold to avoid infinite recursion that ends in an out-of-memory error.)

With these changes, and zooming out to see more context, a more informative pattern appears. Now we have widely separated groups of closely spaced rays, similar to the widely spaced groups of closely spaced reflections that we see in the physical world.

With much more careful study of this diagram, we might eventually figure out that each of those output "rays" actually consists of some number of individual rays, which were created by splitting at surfaces and then subsequently reflected and refracted so as to take exactly the same outgoing path.

Here I have marked up the previous diagram to show three distinct paths that contribute to the final output in the fourth "ray" of the third group.

It is not immediately evident from the picture, but there are a LOT more than three paths that contribute to that final output, which I will hereafter call a "spot" to clarify that it's actually the combination of a bunch of individual rays.

If we number the spots and groups starting from 0, then the combination at [Group J, Spot K] is made up of all paths that reflect across the big central gap J times, and reflect within each pane of glass another K times.

I don't know a simple formula for counting all those paths, but it is straightforward to write a program that counts them up by starting at the origin and working outward, keeping track of how the counts change at each surface where partial reflection causes incoming rays on two paths to merge onto the same outgoing paths.

Alternatively (or in addition, since I did both), we can tap into one of the program's object types, a thing called "Detector" where the program adds up the power of multiple rays as they cross some defined region of space. The standard Detector was not very good for my analysis here, because (A) it did not count contributions, and (B) it only printed two digits of accuracy. However, it was straightforward to modify the program to keep track of ray counts and to print more digits.

Adding several of these tweaked detectors to the simulation shown above, we get this:

According to this output, the fourth group contains spots whose number of contributing rays, and total power, are:
spot 0: 1 ray, total power 0.00008256
spot 1: 8 rays, total power 0.00026001
spot 2: 36 rays, total power 0.00037070
spot 3: 117 rays, total power 0.00031907
spot 4: 265 rays, total power 0.00018619

The last two counts are not quite correct, because some especially low power rays were discarded by the 0.0000001 threshold. Without the threshold those would be 120 and 330, according to my totally independent program that counts without thresholds.

But the general pattern of power distribution is correct, and it captures & explains an aspect of the physical situation that would otherwise be quite puzzling.

To illustrate the puzzling aspect, here is an ordinary image shot with an ordinary camera and lens, with a light source that consists of an ordinary LED with a small aperture added in front of it.

The whole scene:

and zoomed in to just the part I want to look at:

In this photo, look at Group 4, and notice that Spots 1, 2, and 3, indicated by the lighter gray arrows, are all brighter than Spot 0, indicated by the darker gray arrow.

If we consider only that increasing dot numbers go along with increasing numbers of reflections, then this relationship makes no sense. Spot 0 comes from light that was reflected only 8 times, while Spots 1, 2, and 3 come from light that was reflected 10, 12, and 14 times. More reflections give brighter spots? How can this be??

The answer to this conundrum comes in the number of overlapping paths that create each spot. In group 3, the number of contributing paths are these:
Spot 0: 1 ray
Spot 1: 10 rays
Spot 2: 55 rays
Spot 3: 220 rays
Spot 4: 715 rays
Spot 5: 2002 rays
Spot 6: 5005 rays
Spot 6: 11440 rays (barely recorded)

So, increasing numbers of reflections are accompanied by increasing numbers of paths. As long as the gain in number of paths is enough to make up for loss per reflection, the spots get brighter. It would be interesting to pursue some more numbers along that line of thought, but I'll leave that as an open end for now.

Anyway, what we have here is a very nice match between theory and observation, where the theory incorporates only refraction and reflection. No doubt other effects such as absorption and scattering are occurring in the physical world, but they are not major contributors to the reflection pattern that is seen.

That's enough for tonight.

--Rik

mjkzz
Posts: 1565
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

### Re: Axial Lights II (Ghostbuster?)

Thank you very much for finding this tool!
Thank you for the top notch analysis with this tool and wow, you even modified the code, kowtows!!! I figure it would be invaluable for this community, particularly in the hands of experts like you.

Yes, the first thing came up to my mind was the incident angle hitting the double pane glasses when I saw your pictures, yes, I believe scattering is occurring, not sure how much and that is where I got scared off and took the easy path (of single ray passing one glass)

One thing though, I think if we use a point light source (vs a single ray) in your analysis, those rays you are counting will have significant intensity -- there will be other rays with infinitely close incident angle to the ray being analysed, from the point source hitting the same spot, thus increasing intensity. This summation of other contributing rays means taking integral of some sort when the difference of incident angle is sufficiently small and over a range (at some point, when reflectivity is very small, most lights get refracted, passing through the glass, hence we do not see anything before first, and at some points when reflectivity is close to 1, little get refracted).

This is, of course, just a thought, HOWEVER, your method of counting rays is a super cool approximation of point light source using parallel rays to simplify visualisation. The other way to analyze this is to use some game engine, like Unreal Engine, with ray tracing capabilities. In that case, even scattering can be done, too.

Anyways, thanks for clearing my mind about that, saved me from finding a ray tracing engine to simulate this (see, that double pane window is still on my mind )

rjlittlefield
Posts: 23034
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

### Re: Axial Lights II (Ghostbuster?)

mjkzz wrote:
Sun Jan 30, 2022 1:47 am
One thing though, I think if we use a point light source (vs a single ray) in your analysis, those rays you are counting will have significant intensity -- there will be other rays with infinitely close incident angle to the ray being analysed, from the point source hitting the same spot, thus increasing intensity. This summation of other contributing rays means taking integral of some sort when the difference of incident angle is sufficiently small and over a range (at some point, when reflectivity is very small, most lights get refracted, passing through the glass, hence we do not see anything before first, and at some points when reflectivity is close to 1, little get refracted).
Sure, ultimately the brightness seen by the camera is an integral across all paths that correspond to each pixel. In the real world, this is accomplished by light sources that generate EM waves that bounce around and eventually deposit energy on the sensor. Unfortunately modeling the waves directly takes too much computation, even in the modern era. So instead, modeling light as individual rays is a discrete approximation that gives useful results quickly.

There are two common ways for the rays to be propagated. The one that I used is to trace rays from the source outward. An alternate approach is to trace rays backward from the sinks, that is, from sensor back through the lens and out into the world. This is what CGI programs like game engines do.

In either approach, to do physically accurate reflections for a large scene is computationally expensive. In the scene that I photographed, some of the visible dots come from paths that would have required considering over 10,000 rays (16 reflections, with some pruning). Most of those rays, for most pixels, in fact do not contribute to the final image, but it's tough to know which are which without trying all of them.

The way this problem is handled depends on the rendering engine. In Blender, you can specify the depth to which each ray is to be followed. Specifying depth 16 might accurately capture the groups of dots in my photo. (Edit: I'm not sure if Blender handles ray splitting at transparent objects.) But if it does, you would have to wait quite a long time to see the picture. When there are time constraints, some shortcuts have to be taken. The documentation for Blender states simply that "(n.b. Reflections are not available in the Game Engine)". Unreal Engine is more clever; it does support reflections in real-time mode, but this seems to be accomplished by artistically placed shortcuts rather than objectively accurate simulation. That's a very useful trick for games, perhaps not so much for analyzing optics systems.

--Rik

kaleun96
Posts: 266
Joined: Sat Oct 20, 2018 3:47 pm
Location: Stockholm, Sweden

### Re: Axial Lights II (Ghostbuster?)

Just speed-reading this thread for now as it's getting late but already I see some good ideas and clarifications have come from it!

I saw mjkzz asking a few times about specific setups that had documented ghosting so I thought I'd quickly share in case it is useful in helping troubleshoot the possible causes. I should also mention I got ghosting using Lou's idea of photographing the reflection of the coin off the glass instead of through the glass. So the camera would be horizontal and the light source vertical. Here's an extremely crap diagram that might help explain how I've set mine up (at least the most recent iteration) for the usual method of axial lighting.

The black lines represent a 3D printed plastic box. At one end, it has a hole in the end of the box that a Godox TT350 flash adapts to (perfect fit, i.e. no gaps around). At the other end, the wall is not a wall but a flap that is angled at 45 degrees to direct reflections downwards. The entirety of the box is lined with black felt so the reflections are minimal (there is barely a hint of light reflecting off the 45 degree flap at the other end and down and out of the box). Just to be sure, I've also tried having a surface lined with black felt at the bottom of the 45 degree flap just to make doubly-sure reflections weren't making it all that way back.

The blue is the Godox TT350 flash. The yellow is the camera lens.

The red line represents a Schott Mirona beamsplitter (this stuff, specifically). It has AR coating on one side and high reflectance coating on the other, according to the description this helps remove "double reflection". It is thick at 4mm but I haven't noticed thin pieces of beamsplitter glass removing ghosting either and I bought this piece mainly to see if it removed ghosting. It is placed at a 45 degree angle (a 3D printed mount) that slots into the box and where the black horizontal lines are dotted, this represents this part of the top of the box is open so the lens can image the subject.

The green is a 3D printed cylinder that the coin subjects are placed inside. Not drawn is that the side of the cylinder facing the glass is cut at a 45 degree angle so it can be placed closer to the glass if necessary.
- Cam

mjkzz
Posts: 1565
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

### Re: Axial Lights II (Ghostbuster?)

The way this problem is handled depends on the rendering engine. In Blender, you can specify the depth to which each ray is to be followed. Specifying depth 16 might accurately capture the groups of dots in my photo. (Edit: I'm not sure if Blender handles ray splitting at transparent objects.) But if it does, you would have to wait quite a long time to see the picture. When there are time constraints, some shortcuts have to be taken. The documentation for Blender states simply that "(n.b. Reflections are not available in the Game Engine)". Unreal Engine is more clever; it does support reflections in real-time mode, but this seems to be accomplished by artistically placed shortcuts rather than objectively accurate simulation. That's a very useful trick for games, perhaps not so much for analyzing optics systems.
Sure, not all game engines work the way ray tracing should be done. Like the latest Unreal Engine, I think it is doing some kind of pseudo ray tracing so that they can render a scene in real time for games. I did not dig too deep into UE, but one of the application is for architectural rendering. It takes hours, if not days, to "bake" (as they call it) a scene, even with "server farm" that I wrote a blog about. In this case, I think a game engine might help, but it is way too complicated, at least for me

On the other hand, there might be some open source, true ray tracing apps out there.

mjkzz
Posts: 1565
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

### Re: Axial Lights II (Ghostbuster?)

cool, I was thinking along the line of using LEDs instead of flash. I also made the bottom part as a slot so that I can insert and move coins (my intended goal) easily.

kaleun96
Posts: 266
Joined: Sat Oct 20, 2018 3:47 pm
Location: Stockholm, Sweden

### Re: Axial Lights II (Ghostbuster?)

Well it's that time of the year again when I decide to revisit axial lighting for no good reason. I've been trying some various setups the past few weeks, partly influenced by this thread that I forgot to follow up on earlier in 2022. Reading through it again, as well as some of the old threads Rik linked, helped me understand a lot about what is going on and my issues with axial lighting.

First up, on the subject of ghosting, I know I used to get this when using coated mirrors but can't recall if I ever saw it with uncoated glass. The former would make sense as I believe Rik explained that probably only coated mirrors allow for strong enough internal reflections to result in a visible ghost image. I've been doing some tests lately with various 67mm UV filters and never saw ghosting during that recent testing, perhaps due to so little light getting past the AR coating on both sides of the filters in the first place?

Secondly, on glass thickness, I've definitely seen some differences in spherical aberrations based on minor differences in thickness, as is expected based on previous results shared on this forum and some of Rik's analysis. These aren't perfect tests that would hold up to the standards set on this forum but I think are good enough to illustrate my general findings:

B+W UV filter with ~1.5mm thick glass
Hoya UV filter with ~1.2mm thick glass
JJC UV filter with 0.7mm thick glass
They all interacted with the lens filter that comes with the Laowa 100mm 2x macro lens. The sharpness didn't increase much when this filter was removed but it seems there may be reflections bouncing off this filter as it brightens some of the edges of the designs and legend of the coins but not so much so that it would be a problem. The difference between the 1.2mm and 0.7mm filter is minimal. I think the 0.7mm filter had different coatings that meant it reflected even less light than the 1.2mm filter but I do think it was a touch sharper as well. The 1.5mm filter is of course much less sharp than the other two.

Again, I come to the end of playing around with axial lighting suitably unimpressed with the decrease in sharpness due to spherical aberration. For many, it may not be an issue, but for me it's something I can't get past. Two things that I would love to try are a 55T/45R 2um pellicle beamsplitter from Thorlabs and an infinity-corrected setup with the mirror between objective and tube lens. For the former, I don't want to spend 250 euros, especially when it's only 50mm in diameter and thus only has a useful reflection diameter of about 35mm.

And for the infinity-corrected setup, it doesn't make sense to buy a 1x infinity-corrected microscope objective when it's not going to be better than the Laowa 100mm 2x macro I already have. Is there perhaps some stacked lens setup that could be used though? It's been awhile since I've stacked lenses but IIRC the rear lens is set to infinity but the front lens is not, so that doesn't seem like it would be helpful here.

edit:
Here's the setup I used for testing. I 3D printed a housing for the lens filter and an adapter for my Godox AD100 flash to make sure the alignment was as perfect as possible and reflections minimised. The entire inside surfaces of the housing and adapter were flocked and the coin placed on a pedestal so it sat about 15mm below the bottom opening of the housing. A flocked piece of foamcore sat on the other side of the mirror to prevent back reflections.
- Cam

rjlittlefield
Posts: 23034
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

### Re: Axial Lights II (Ghostbuster?)

kaleun96 wrote:
Wed Jan 04, 2023 8:19 am
decrease in sharpness due to spherical aberration. For many, it may not be an issue, but for me it's something I can't get past
Cam, thanks for the follow-up.

One niggle: I twitch about the words "spherical aberration" as used here.

As I understand your setup, you are shooting through a piece of glass that is slanted with respect to the optical axis. This introduces an asymmetric aberration in which light reaching one side of the aperture is delayed more than light reaching the other side of the aperture. With spherical aberration, light reaching the edges of the aperture is delayed more than the center, but the aberration is symmetric all around the aperture. The asymmetric aberration is more troublesome, as illustrated at https://www.photomacrography.net/forum/ ... 75#p102475 . I suppose that someplace there is an official name for this aberration, but I do not know it.

Anyway, I just wanted to mention that I think your problem with reduced sharpness is not due to spherical aberration in the strict sense. For clarity, I would probably describe it using lots of words, as in "loss of sharpness due to shooting through slanted glass".

--Rik

kaleun96
Posts: 266
Joined: Sat Oct 20, 2018 3:47 pm
Location: Stockholm, Sweden

### Re: Axial Lights II (Ghostbuster?)

rjlittlefield wrote:
Wed Jan 04, 2023 11:41 am
One niggle: I twitch about the words "spherical aberration" as used here.
Ah, I admit I didn't bother investigating the term further and just borrowed it from your post from a decade (!) ago but now, after reading the other (quite helpful) thread you linked, I see I misinterpreted you as saying both a slanted and perpendicular glass would produce spherical aberrations, but you were meaning it would only be present in the latter scenario.

I didn't finish reading that other thread yet but I saw you mentioned that "Surely it's the angle, which affects the amount of water the light travels through" about this other form of aberration (if I'm understanding you correctly), but in my case with the slanted glass the light would be travelling through the same amount of glass regardless of where it hits along its surface - assuming the light is hitting it a 45 degree angle relative to the surface. I understand why it would be different when shooting through water but that doesn't seem to apply here.

I'm likely missing something obvious as I have a long way to go before being able to keep up with many members here when it comes to the behaviour of light and optics.
- Cam