Sunday, May 22, 2016

Long Exposure Simulation in Lightroom

One technique that many photographers ‘ignore’ is long exposure photography. The reasons are simple: if shooting in bright conditions then getting to long exposures is near impossible without the use of Neutral Density (ND) filters; with NDs you need to carry extra equipment, the NDs, to cover you various lenses as well as various NDs to ensure you can cover a wide LE domain; if you try and ‘save some equipment’, by using a variable ND, then you may generate exposure variability across the sky if shooting too wide.

One technique that overcomes the above limitations is to ‘simulate’ LEs by taking multiple images and post processing them. For example, if my base exposure was, say, 1/10s, and I wanted to take a 2 second exposure; then I would take 20 consecutive images and post process then to simulate the 2 second exposure I could not take.

If you have Magic Lantern enabled on your Canon EOS, then you could make use of the RAW video feature and lower the fps to capture the 20 x 1/10 exposures. But what if you wanted to simulate, say, a 60 second exposure. Well you could exend the RAW video technique, but you will need to post process some 600 images!

This is why I developed the following ‘hybrid’ approach. That is carrying a single ND to slow the shutter to a reason speed for LE simulation. In the test example in this post I set myself the task of taking a 60 second exposure in daylight. The base exposure was about 1/300s, but I had access to a 10 stop ND. But this ‘only’ shifted my exposure to about 3 seconds, ie a factor of 20 down from a 60 second exposure goal, hence I still needed to capture 20 images: still a lot better than some 18,000 images, ie 60/(1/300).

Rather than try to do this by hand, I decided to write a simple Lua script to do all the hard work for me. In addition, I decided to make use of the Magic Lantern Full Resolution Silent Picture (FRSP) feature, that directly reads the imaging sensor without (sic) any shutter actuation. The downside of FRSP is that you need to limit the exposure time to between about 0.1s to 15s; which for my LE use was fine. In my script, I coded this to 0.25s to 14s.

To run the script, all you need to do is to compose, set your exposure and ensue your shutter speed is between the limits above (the script will warn you if you don’t satisfy the FRSP limits). In the test example below (shot in my garden this morning), I used my ND1000 on my 24-105mm at 24mm, which reduced the exposure to 3.2s at my selected F/10 aperture.

To run the script, I simply went into Live View, turned on the script (it’s in the ML Shoot menu), selected bookends (which places a dark frame at the beginning and end of the LE bracket set to help differentiate bracket sets in post), set a 60s LE exposure request and a 2 second delay.

The script then automatically captured 22 DNGs (20 LE brackets + 2 bookends), silently and without any shutter actuation.

I then ingested the DNGs into Lightroom and things looked like this:


I then adjusted the first LE image to my liking and synced the other 19 to this first image. I then used the LR/Enfuse plugin to process the 20 images, making sure that contrast weight was set to maximum and exposure weight to minimum. I then tweaked the post processed image in Lightroom.

For comparison, here is one of the 3.2s base images, clearly showing that at 3.2s there was little (LE) impact in the sky:



And here is the 60s simulated (Enfused) image, showing the LE effect in the sky (including a sensor/lens spot I should have dealt with!):



Finally, some may be saying why bother. Well apart from the LE simulation for artistic reasons, the attached script will also generate a fixed exposure bracket set (without shutter action) and this could be useful for the following situations:
  • Eliminating people from a scene (as long as they are moving) 
  • Super-resolution processing, eg doubling the resolution for large prints 
  • Increasing dynamic range (or S/N of the image), eg 16 images will reduce the ‘dark end’ noise by 2Ev.
For Canon users, that wish to play around with Shutterless LE bracketing, here is the Lua script.

Enjoy!

--[[
LE simulation using shutterless, Full Res Silent Picture bracketing.
Creates (same exposure) brackets for post processing a simulated LE exposure, eg via PS-CC mean smart filter stack
User must re-select FRSP mode, ie DNG or MLV and Dual-ISO if required
Base exposure must be between 0.25-14 secs
Finally, because of my 'work arounds' for triggering the intervalomter function in Lua, the LV will flash on and off a few times
Version 0.5
*******************************************************************************************************
*                                                                                  *
* If you reference this script, please consider acknowledging me: http://photography.grayheron.net/   *
*                                                                                  *
*******************************************************************************************************
--]]

function my_shoot()
    -- Grab a/some timelapse image(s)
    lv.pause()  -- switch off LV, if on, but keep shutter open
    menu.open()
    menu.close()
    repeat -- hang around until finished
        msleep (300)
    until interval.running == 0 -- when intervalometer has finished
end

function check_bookend()
if keymenu.submenu["Bookends?"].value == "yes"
    then
        lv.pause()  -- switch off LV, if on, but keep shutter open
        local tv = camera.shutter.ms
        local av = camera.aperture.value
        menu.set("Expo","Expo. Override",1)
        camera.shutter.value = 0.3
        camera.aperture.value = 20
        menu.set("Intervalometer","Start after",0)
        menu.set("Shoot","Intervalometer",1)
        menu.set("Intervalometer","Take Pics...",0)
        menu.set("Intervalometer","Start trigger",0)
        menu.set("Intervalometer","Stop after",1)
        menu.set("Shoot","Silent Picture",1)
        menu.set("Silent Picture","Silent Mode",5)
        my_shoot()
        camera.shutter.ms = tv
        camera.aperture.value = av
    end
end

function go() -- and run the script
    if camera.shutter.value < 0.25 or camera.shutter.value > 14 then -- not fit for FRSP use
        -- Set to a 'safe' condition before exiting
        menu.close()
        menu.set("Shoot","Intervalometer",0)
        menu.set("Shoot","Silent Picture",0)
        menu.set("Intervalometer","Start trigger",1)
        beep (3, 200 , 500)  -- display warning message
        display.notify_box("Adjust your shutter time: 0.25-14 secs", 5000)
    else -- alright to use FRSP
        lv.start()  -- just in case
        check_bookend()
        local LE_brackets = math.ceil(keymenu.submenu["LE Time?"].value/camera.shutter.value)
        local delay = tonumber(keymenu.submenu["Delay"].value)
        if keymenu.submenu["Bookends?"].value == "yes" then delay = 0 end
    -- Ensure Intervalometer and FRSP menus are set correctly
        menu.set("Shoot","Intervalometer",1)
        menu.set("Intervalometer","Take Pics...",0)
        menu.set("Intervalometer","Start trigger",0)
        menu.set("Intervalometer","Start after",delay)
        menu.set("Intervalometer","Stop after",LE_brackets)
        menu.set("Intervalometer","Manual FocusRamp",0)
        menu.set("Shoot","Silent Picture",1)
        menu.set("Silent Picture","Silent Mode",5)
        menu.set("Expo","Expo. Override",1)
    -- trigger intervalometer via ML menu close
        my_shoot()
        msleep(100)
        check_bookend()
        lv.resume() -- switch LV back on, from using intervalometer, to signify end of bracketing
    -- Set Intervalometer and FRSP to a 'safe' condition before exiting
        menu.set("Shoot","Intervalometer",0)
        menu.set("Shoot","Silent Picture",0)
        menu.set("Intervalometer","Start trigger",1)
        display.notify_box("LE sim script finished", 5000)
        beep(3)
    end
end

keymenu = menu.new
{
    parent = "Shoot",
    name = "LE Simulator",
    help = "Only uses FRSP",
    depends_on = DEPENDS_ON.LIVEVIEW,
    submenu =
    {
        {
            name = "Run Script",
            help = "Does what it says after pressing SET",
            depends_on = DEPENDS_ON.LIVEVIEW,
            select = function(this) task.create(go) end,
        },
        {
            name = "LE Time?",
            help = "Simulated LE time in seconds",
            min = 1,
           max = 600,
            value = 1
        },
        {
            name = "Delay",
            help = "Delays script start by stated number of secs",
            choices = {"2","5","0"},
        },{
            name = "Bookends?",
            help = "Places a dark frame at start and end of focus bracket set",
            choices = {"no","yes"},
        }
    }
}


No comments:

Post a Comment