Saturday, March 19, 2016

Silent Toggler

The following script, an update from the previous versions, has been written to work on all ML enabled cameras, including the EOSM.

The functionality pivots around a simple idea, that many photographers want quick access to different ML features, ie without having to go in and out of the ML menus. In addition, many use a single set up for each feature, eg auto bracketing at, say, 2Ev.

The following features are accessible via 'the toggler' button. The default is the RATE key, but this is your choice on all cameras other than the EOSM, which uses the main dial's up (top) toggle. The button is simply changed in the script. The toggler cycles through the following:

  • ‘Black’ bookend exposure for differentiating (focus and/or exposure) brackets;
  • ETTR;
  • Auto bracketing;
  • Dual-ISO;
  • Full Res Silent Picture taking
Additionally, focus stacking feedback is provided after the first image is taken. Yellow means focus towards infinity, red towards the macro end and if you hit a sweet spot green will be seen. If green is not seen, simply move into the yellow just before going red.

To get the best out of the toggler script, you should set your preferred ML menu settings for ETTR, Auto bracketing, Dual-ISO and FRSP. My preferences, when using the toggler, are:
 

ETTR (via HalfDblShutter press) 
  • Trigger mode = Half Double Click 
  • Slowest Shutter = according to needs
  • Highlight Ignore = 0% or a few tenths of a % 
  • Midtone and Shadow SNR = 0 
  • Link to Dual = Off
Auto Bracketing (following a full shutter press)
  • Bracket Type = Exposure (Tv, Ae)
  • Frames = Autodetect
  • Ev increment = 2Ev
  • Sequence = 0 -+ -- ++
  • 2-second delay = Auto
  • ISO shifting = OFF
Dual-ISO (following a full shutter press)
  • Recovery ISO = 800
Silent Picture (via half shutter press)
  • Silent Mode = Full-res
  • Slit-Scan Mode = Top-Bottom
  • File Format = DNG
In addition I have the ML spotmeter on and in Ev mode, as this allows me to set the exposure for an auto exposure capture from the darkest frame, ie set at, say, -3-4 Ev. The ETTR, Dual-ISO and Silent Picture modules need to be switched on.

As some may not have used Silent Picture mode in ML before, I offer the following insight. The limits are that the exposure should be between 1/4 to 1/2 second to 15 seconds. Thus it is a feature that is not for hand holding. You will not be able to review the image captured in-camera. The capture is shutterless and totally silent. The capture that I use is a DNG, but there is another option, the MLV, but this requires more post processing. The DNG is accessible via, say, normal Lightroom ingestion (but your image will not have EXIF data attached to it).

The silent picture mode is great for when you wish to capture images without drawing audible notice to yourself :-)

As usual I welcome feedback and any suggestions to make ‘The Toggler’ better.

--[[    
    Still photography toggler script
    Version 1.0 (should work on all ML enabled cameras with the Lua module)
    Garry George March 2016
    http://photography.grayheron.net/
    Workflow toggler script to help with focus and exposure setting.
    Toggle through your workflow using the selected option ie a button or the top of the main dial or toggle switch.
    For focus feedback yellow means move more towards the infinity end, Red means move more towards macro end,
    Green means at the sweet spot. If Green not seen, move to just being in the yellow from being in the Red.
--]]
factor = 0.2
b1 = lens.dof_far
fp = lens.focal_distance
c1 = b1 - (b1 - fp*10)*factor
inf = 1000000
started = false
current_tv = 0
play = 0
toggler = 0
-- Change toggler value to your choice of button, eg KEY.RATE, KEY.UP, KEY.INFO or KEY.PLAY.
-- See http://davidmilligan.github.io/ml-lua/modules/constants.html for key constants
-- Default is KEY.RATE for non-EOSM cameras. EOSM self selects upper toggle on main dial as the EOSM doesn't have many buttons!
if camera.model_short == "EOSM" then toggler = KEY.UP else toggler = KEY.RATE end

event.keypress = function(key)
    if keymenu.submenu["Turn On/Off"].value == "Off" then
        started = false
        return true
    elseif key == toggler 
    then
    play = play + 1
    if play == 7 then play = 0 end
    return false
    elseif key == KEY.FULLSHUTTER and play ~= 6
        then
        b1 = lens.dof_far -- in mm
        fp = lens.focal_distance -- in cm
        c1 = b1 - (b1 - fp*10)*factor
        started = true
        return true
    elseif key == KEY.HALFSHUTTER and play == 6
        then
        b1 = lens.dof_far -- in mm
        fp = lens.focal_distance -- in cm
        c1 = b1 - (b1 - fp*10)*factor
        started = true
        return true
    end
end

lv.info
{
    name = "Info 1",
    value = "",
    priority = 100,
    update = function(this)
    this.value = ""
    if keymenu.submenu["Turn On/Off"].value == "On" and started and fp ~= 0
    then
            this.foreground = COLOR.BLACK
            a2 = lens.dof_near
            if a2 > b1 then
            this.background = COLOR.RED
            elseif a2 < c1 then
            this.background = COLOR.YELLOW
            else
            this.background = COLOR.GREEN1
            end
            if lens.dof_far >= inf then
            this.value = "INF"
            else
            this.value = "   "
            end
    else
    this.value = ""
    end
    end
}

lv.info
{
    name = "Info 2",
    priority = 100,
    value = "",
    update = function(this)
    if keymenu.submenu["Turn On/Off"].value == "On" then
        i = menu.set("Shoot","Advanced Bracket",0)
        i = menu.set("Expo","Auto ETTR",0)
        i = menu.set("Expo","Dual ISO",0)
        i = menu.set("Shoot","Silent Picture",0)
        this.foreground = COLOR.YELLOW
        this.background = COLOR.BLUE
            if play == 0 then
                current_tv = camera.shutter.ms
                this.value = " Off"
            elseif play == 1 then
                this.value = " BE "
                camera.shutter.ms = 1
                i = menu.set("Shoot","Advanced Bracket",0)
            elseif play == 2 then
                this.value = " Off"
                camera.shutter.ms = current_tv
            elseif play == 3 then
                this.value = "ETTR"
                i = menu.set("Expo","Auto ETTR",1)
                i = menu.set("Auto ETTR","Trigger mode",3)
            elseif play == 4 then
                this.value = "Auto"
                i = menu.set("Shoot","Advanced Bracket",1)
            elseif play == 5 then
                this.value = "Dual"
                i = menu.set("Expo","Dual ISO",1)
            elseif play == 6 then
                this.value = "FRSP"
                i = menu.set("Shoot","Silent Picture",1)
            else
                this.value = ""
            end                                   
        end
    end
}

keymenu = menu.new
{
    parent = "Shoot",
    name = "Landscape Helper",
    help = "Toggle through workflow",
    help2 = "Grab exposure or take picture as required",
    submenu =
    {
        {
            name = "Turn On/Off",
            help = "Switches the script on/off",
            help2 = "Provides access to ML functionality",
            choices = {"On","Off"},
        },
        {
            name = "Bracket to bracket overlap",
            help = "Amount to overlap each bracket",
            help2 = "% of FP-2-DoF(far) distance",
            choices = {"20","10", "5"},
            update = function(this)
            factor = tonumber(keymenu.submenu["Bracket to bracket overlap"].value)/100
            end,
        }
    }
}

No comments:

Post a Comment