Friday, November 27, 2020

TiltSim 2 and the internodal hiatus!

A quick post on a minor tweak I've made to TiltSim 2.

As we know from previous posts, we can successfully model a complex lens by making use of a split/thick lens model, ie:

To register a lens in TiltSim 2 all we need is three pieces of information. First the maximum magnification (M), second the minimum focus distance at that magnification (X) and third the focal length (f).

As an example, let's take the 24mm TS-E f/3.5L II, with an M of 0.34 at an X of 230mm. The hiatus between the two principal nodes is found from solving the equation for t above. Which gives a hiatus of just over 103mm. That is the front principal is positioned 103mm away from the rear principal.

Having 'registered' the above lens in TiltSim 2 we now see something like this:

Here we see the hiatus, which splits the Scheimpflug line in two (shown by the two red dots, one of them on the sensor plane, ie at x=0): in the above at 103mm parallel to the tilted optical axis.

But what if we use a non-retrofocus T/S lens, eg a Canon 135mm f/4L (macro) TS-E, with an X of 486mm and an M of 0.5.

The hiatus now is about -121mm!

In other words, because the 135mm TS-E is of a tele construction, the front principal is behind the rear principal. Plugging X and M into TiltSim 2, we now see something like this:

As usual I welcome any feedback on this post.

Thursday, November 26, 2020

TiltSim 2

In my e-class, 'Getting even more out of Focus :-)' and in the TiltSim simulator, I created a simplified tool to allow Tilt/Shift (T/S) lens users to virtually explore their T/S lenses.

The simplification was to use a thin lens model and then assume focus from the T/S thin lens was the same as focus from the untilted lens. That is I ignored the tilt of the optical axis in the simulation, ie assumed it remained as untilted.

The above was an OK approach if you just wanted to get a rough view of focusing a T/S lens.

In this post I'm releasing TiltSim 2.

TiltSim 2 is based on the DOFIS split thick lens model, that ensures the lens equation fits the manufacturers' data, ie Maximum Magnification is correctly modelled at the Minimum Focus Distance.

Focus in TiltSim 2 is along the optical axis and from the sensor. TiltSim 2 estimates the position of the front principal and its movement as you tilt and focus.

TiltSim 2 also shows the Scheimpflug line, as well as the more useful (to DSLR users) Hinge line. 

Note, as we are using a DSLR T/S lens, the sensor plane does not move.

The only concession in TiltSim 2 is that this version ignores pupil magnification, ie it is assumed to be unity.

To use TiltSim 2 just click on the link on the right to access the Desmos-based TiltSim 2. You do not need to provide personal info to use TiltSim 2.

The first thing to do is to set up your lens under the Set Up tab:

In the above example, I've set up a 24mm focal length lens and set the minimum focus distance and the magnification at this point (both of these are available from the manufacturer's data or by measuring these directly).

A Circle of Confusion of 24 microns has been used, ie a Rule of Ten CoC value.

The orientation of the lens is set to landscape (0): portrait would be 1.

The crop factor is set to unity, ie a full frame sensor is being used.

Finally, I've set diffraction aware off (0).

With the above settings locked in, I can now close the Set Up folder.

The main TiltSim 2 window will look something like this:

The T_iltFocus slider moves the focus, relative to the sensor, along the optical axis, ie whether it is
tilted or not. This slider is set between the minimum focus of the lens and 4 times the hyperfocal, but you can change these limits if you wish. In addition, focus is scrubby on the simulator.

The G_o2inf is either on (1) or off (0) and moves focus to infinity. To use T_iltFocus, G_o2inf must be set to 0.

L_tilt10ths is the lens tilt angle in tenths of a degree. TiltSim 2 allows lens tilts betweem -8.5 and 8.5 degrees, but you can change these limits if you wish.

S_electN is a slider to select the aperture number, which is shown in the chart, with some other information. In the above example we see that the aperture is set to f/3.5. The info field's position on the chart is scrubby, so position it where you like.

G_plane and G_planeangle controls where the simulated ground plane is positioned, relative to the sensor. In TiltSim 2 the sensor is always positioned at (0,0). the vertical position of the G_plane is scrubby.

The S_hift slider allows you to simulate shift in the T/S lens.

O_bject and E_xtend provides you a 'surface' to position, which you can use to simulate 'features of interest'.

Finally, the main window of TiltSim 2 shows the field of view of the lens and the depths of field. In the above, as we have zero lens tilt, TiltSim 2 is being used as a normal DoF simulator. The red dashed, vertical line, shows the hyperfocal. The vertical, black dashed line, close to (0,0), parallel to the sensor plane, is the hinge plane. The Hinge being positioned at the lens front principal, at a height of J, parallel to the sensor.

As this post is intended to 'just' release TiltSim 2, I don't intend to spend time looking at its functionality. However, this next screen shot shows TiltSim 2 in its design mode, ie as a T/S simulator.

Rather than discuss the above: I suggest those that are interested in using TiltSim 2, take a look at the simulator - all from the comfort of their favorite chair.

As usual I welcome any feedback on this post.

Tuesday, November 24, 2020

More on tilting with DOFIS

As the astute reader will have noticed, I've tidied up my Magic Lantern scripts and have now converged on DOFIS as my only ML Lua script; as DOFIS meets all my needs:

  • 'Accurate' lens model, accounting for principal nodes and entrance/exit pupil position
  • Runs on my 5D3 and EOSMs
  • Diffraction aware with IR supported
  • Depth of Field feedback
  • Manual focus bracketing feedback, eg number of brackets to take and when to take them
  • Auto focus bracketing on selected AF lenses
  • Exposure bracketing, with and without focus bracketing
  • Support for Tilt/Shift (TS) lenses

In this post I'll talk about the latest version of DOFIS and how it supports the TS user.

Unlike normal lenses, TS lenses require a little bit of skill/knowledge to use effectively. In previous posts I've talked about the general principles behind TS lenses and written a simplified TS simulator to give the TS user a tool to help visualise TS focusing.

The key points being:

  • Setting the tilt angle positions the so-called hinge line below the lens front principal, parallel to the sensor plane;
  • The lens front principal, along the optical axis, is fedback in DOFIS;
  • The lens focus and depths of field positions, along the lens optical axis remain the same even when tilting;
  • Focusing rotates the plane of sharp focus, that passes through the hinge line and the point of focus on the lens axis

DOFIS now has a menu item called Show TS Info:


As we can see in the above DOFIS menu screen grab, show TS info is switched on. We also see, that the hinge calculator has been used to select a 3 degree tilt. The hinge calculator tells me that the J height is 450mm, parallel to the sensor plane, from the front principal of the lens.

DOFIS also tells me the front principal is positioned at about 127mm from the sensor.

The test shot was taken as a result of tilting the camera down by 30 degrees and seeking to keep the ground plane in focus, whilst keeping the aperture wide open.

Here we see that I'm at f/3.5 and I'm focused at 1m from the sensor. Although not shown, as there is no feedback on tilt, the tilt was about 3 degrees, which is what I used in the hinge calculator.

We see, in the top right, that DOFIS is providing us LV information on our TS shot, ie the J height is 45cm and the angle of the plane of sharp focus, from the vertical, is estimated at 64 degrees at the current point of focus, which tallies well with our camera tilt of 30 degrees. In a perfect world the camera tilt plus plane of sharp focus for this test should be 90 degrees.

The J height also gives us a way to visualise the slanted depths of field as, at the hyperfocal, the depth of field, either side of the plane of sharp focus is J, parallel to the sensor plane.

Using my, yet to be published, TiltSim 2, we can see what the above looks like:

Here we see, if we position the focus to emulate the test shot, the camera tilt shows 25 degrees for a perfect alignment of the plane of sharp focus. Pretty close to our real world example. 

Bottom line: the DOFIS TS feedback is there to help you visualise your scene; it is not guaranteed to be accurate, but it shouldn’t be far off.

As usual I welcome feedback on this post.

Friday, November 20, 2020

DOFIS: Plane of Sharp Focus

As DSLR tilt/shift (TS) lens users know, positioning the plane of sharp focus is inevitably an iterative process. However, with DOFIS, Canon Magic Lantern users can get a little help along the way.

Although there are hints that Canon are working on some exciting tilt/shift technology, eg a tilt/shift adapter, the current generation of Canon TS lenses are rather dumb, ie there is no link between the tilt angle and the camera.

To offset this lack of feedback, I've now added a Plane of Sharp Focus info field into DOFIS, in addition to the Hinge (J) calculator that I mentioned in a recent post.

The DOFIS menu feedback looks like this:

Here we see the Hinge calculator set to 4 degrees, showing a hinge height (parallel to the sensor plane), measured from the front principal (which DOFIS also tells us), of 34cm. 

Under DOFIS Additional Info, we also see the Plane of Sharp Focus estimate, at the current focus, is 37 degrees, ie down vertically from the Hinge plane, which is parallel to the sensor plane as shown below:

The J calculator and the PoSF feedback are in DOFIS to help you visualise how to control your TS focus: you will still need to carry out actual focusing using an iterative process. Whilst you are using the tilt calculator functionality in DOFIS, eg dialling in a tilt angle, you can also refocus and see how the plane of sharp focus angle changes. 

Finally, if tilting the camera as well, then it will be necessary to re-estimate J to your chosen hinge plane, as shown below, where the camera is tilted around the front principal of the tilted lens axis.

In the above sketch we see that the hinge needs to be reset to ‘connect’ it with the chosen ground plane, as the principal plane's node position hasn't changed in this example. 

As usual I welcome any feedback on this post.

Thursday, November 19, 2020

Taking the blinkers off your camera

As we know, our camera can see more that we can with our eyes, although all cameras are blinkered by the manufacturers, to suppress the UV and IR bands.

Unless you are lucky enough to be doing photography from the Space Station, on the ground we receive the Sun's spectrum shaded in red above. However, our eyes can not see into the UV or the (near) IR bands. The smooth black curve shows the Sun is like a Plankian black body emitter, at a temperature of around 5778K.

As an aside, it’s interesting to note that animals see the world differently to us:

As we see above, some see 'just two colours and others four.

Our cameras can see more than we can, although the manufacturers put UV and IR blinkers on them:

So far I've only converted two of my cameras to dedicated IR capture, in my case choosing a 720nm filter, having removed the hot mirror: 

Last week, having a 'spare' EOS M, I decided to explore a full spectrum conversion: sending my camera off to Alan Burch at

Today my conversion arrived back to me (many thanks Alan for the quick turn around) and now I have an EOS M that captures 'every' photon it sees. 

So what does it see?

The above is a handheld demo (11mm, f/9, ISO100 at 1/160s), out of camera capture, using Sunshine white balance in Lightroom.

The image above is processed in Lightroom for a 'colour look'.

The final image is a B&W take in Lightroom.

It's early days in exploring my full spectrum conversion, and I've not yet decided how I want to use the camera, eg:

  • As is with no additional filters (colour and B&W).
  • With a UV band filter
  • With an IR band filter (at several cuts)
  • With a vis band filter, albeit with a different band pass to the one Canon uses
Bottom line: I'm looking forward to exploring the world with an unblinkered camera.

Wednesday, November 18, 2020

DOFIS: Tilt Calculator

Just a quick post to say I've added in a Hinge distance calculator for Tilt lens users.

In the above screen grab, for my 24mm TS-E, we see the Hinge Calculator showing that a tilt of 2.5 degrees gives a hinge distance of 55cm.

Additionally DOFIS tells us that the front principal, along the tilted optical axis, from where the hinge ‘line’ is measured, parallel to the sensor plane, is at 127mm from the sensor. In the above focus was set at infinity, ie no lens extension. At minimum focus DOFIS would tell you that the front principal is positioned at about 135mm from the sensor.

Tuesday, November 17, 2020

Sky Replacement: a 150 year old problem

This post is triggered by a recent George Eastman Museum talk, given by Mark Osterman, on "A Photographic Truth", which I thoroughly recommend:

The talk has real resonance for today's photographer.

For example, with the recent addition of sky replacement in Photoshop, together with similar functionality in other post processing software, photographers can literally 'do what they like', as they create their art.

If you replace the sky: is it a photograph or is it art or is it both? Even if you replace the sky with one of your skies?

Some see this ability to alter 'reality' a problem; however, as Mark discusses, photographers have been doing sky replacement, and other 'alterations of the truth', from day one.

My own perspective is clear, all photography is a lie, as our cameras and, whatever capture process we use, can never truly capture the reality of the scene. Even our eyes, and brain, distort reality.

Let the debate continue :-)