Thursday, July 20, 2017

Your Choice

A short post to say I've expanded the choices in the focus bar to allow you to decide what criterion you wish to use to calculate the near depth of field when in infinity blur mode.

This is useful when refining the focus beyond the hyperfocal distance, ie focusing between the HFD and when the focus distance reaches infinity. 

In this focusing zone the far DoF is meaningless, as the far DoF distance is infinity. But the infinity defocus blur in this zone still has meaning, as represented by the blur gauge on the right hand side of the focus bar.

The four sensible choices that are available to calculate the near DoF are:
  • The defocus blur alone, ie the green/red vertical bar
  • Twice the defocus blur alone
  • The defocus and diffraction blur taken in quadrature, ie the total blur
  • Twice the defocus and diffraction blur taken in quadrature
The default may be set by changing the menu item at the end of the script.

Finally, the bottom DoF info shows the defocus blur at the near and far DoFs, and updates to show the infinity defocus component if in the infinity focus mode. 


  1. Hi Garry. Well done for sharing your scripts with fellow ML enthusiasts.

    Can you please confirm that the version available for download is the one you intended people to use. The reason I am checking is that it has capital X's as padding around the text information displayed and this looked like something you may have put in to aid development at some point.

    Also, from a usability perspective would it be preferable to save the menu state in a config file? I have other LUA scripts I like to run and so have the LUA scripting module loaded all the times; so every time I restart my camera the FOCUS script is instantiated and with the current menu defaults the focus bar is displayed. It gets a bit tedious having to disable it each time.

    Happy to do some testing if you would like.

    1. This comment has been removed by the author.

    2. Ross

      The XXXXXXXs mean you are not using the latest Lua version. I recommend you use the Lua fix in the experimental area.

      It is my intention to implement a config functionality, but I've never looked this before.

      I welcome any pointers/help to make the script more robust/useful.