Author Topic: Regular and bulb exposures in the single bracketing sequence  (Read 4010 times)

argv[0]

  • New to the forum
  • *
  • Posts: 9
Regular and bulb exposures in the single bracketing sequence
« on: January 26, 2016, 05:55:19 PM »
I has confused with the following changeset:
Code: [Select]
$ hg log -v -r 3225af1b94b5
changeset:   9368:3225af1b94b5
branch:      unified
user:        a1ex <broscutamaker@gmail.com>
date:        Fri Jan 17 14:01:30 2014 +0000
files:       src/shoot.c
description:
minor fix for bulb bracketing at short exposure times

$ hg diff -r 466490e467b9 -r 3225af1b94b5 src/shoot.c
diff -r 466490e467b9 -r 3225af1b94b5 src/shoot.c
--- a/src/shoot.c       Fri Jan 17 15:32:04 2014 +0200
+++ b/src/shoot.c       Fri Jan 17 14:01:30 2014 +0000
@@ -5055,7 +5055,7 @@
 
 #ifdef CONFIG_BULB
         // then choose the best option (bulb for long exposures, regular for sh
-        if (msc >= 20000)
+        if (msc >= 20000 || is_bulb_mode())
         {
             bulb_take_pic(msc);
         }

The current code looks like:
Code: [Select]
#ifdef CONFIG_BULB
        // then choose the best option (bulb for long exposures, regular for short exposures)
        if (msc >= 20000 || is_bulb_mode())
        {
            bulb_take_pic(msc);
        }
        else
#endif
        {
            #if defined(CONFIG_5D2) || defined(CONFIG_50D)
            if (get_expsim() == 2) { set_expsim(1); msleep(300); } // can't set shutter slower than 1/30 in movie mode
            #endif
            ans = MIN(ans, hdr_set_rawshutter(rc));
            take_a_pic(AF_DONT_CHANGE);
        }
So, when the exposure bracketing sequence starts from regular shutter speed and some shoots in this sequence requires the exposure time longer than 20 s. (true for the "0 - + -- ++" or "0 + ++" sequence types), the bulb shutter speed will be available. But when the sequence starts from bulb shutter speed (exposure time is bulb and bulb timer is on), pictures may be taken only by bulb exposure time and never by regular. As a result, bulb and regular exposure times can't be used together for the "0 - --" sequence type in the same sequence. It's strange.

Which issue this patch fixes?
Just IMHO, " || is_bulb_mode()" is needlessly here.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Regular and bulb exposures in the single bracketing sequence
« Reply #1 on: January 26, 2016, 06:53:05 PM »
This one (linked from the parent commit): https://bitbucket.org/hudson/magic-lantern/issues/1802

In particular, try setting Advanced Bracketing to 2x2 EV, and bulb timer to 5 seconds, then try running it with and without this commit, on a camera with dedicated BULB mode (e.g. 60D). Start the bracketing from BULB mode (with a long half-shutter press).

On cameras without dedicated BULB mode (usually Rebel cameras), BULB is just a different exposure time setting on the M mode, so changing shutter speed (for bracketing purposes) will just work. On those cameras with a dedicated BULB mode, changing the exposure only affects the M mode, but since we are in BULB mode, bulb timer setting is not changed, so without this change, the result in the above scenario would be two 5-second images.

Of course, a different solution would be to switch to M if we are in BULB, on the "else" path, but I felt this one is easier to implement and does the job (since it's very unlikely to require exposures shorter than 1 second if one starts the bracketing from BULB mode).

BTW, nice to see others reviewing the code.

argv[0]

  • New to the forum
  • *
  • Posts: 9
Re: Regular and bulb exposures in the single bracketing sequence
« Reply #2 on: January 27, 2016, 10:14:20 AM »
OK. As I understand it, there are two ways to get the bulb timer operation. The first one is set the camera to "BULB" shooting mode. And the second is set the "M" mode and select a BULB shutter speed. It's right?
I have a 50D body. As far as I know, this camera does not have a dedicated "BULB" mode. I'm using the "M" mode to shoot long exposures. And this case, as I understand, advanced HDR bracketing is working properly using the bulb timer.
So, may be better to change the condition switching between regular and bulb shooting modes:
Code: [Select]
--- a/src/shoot.c
+++ b/src/shoot.c
@@ -5055,7 +5055,7 @@
 
 #ifdef CONFIG_BULB
         // then choose the best option (bulb for long exposures, regular for sh
-        if (msc >= 20000 || is_bulb_mode())
+        if (msc >= 20000 || shooting_mode == SHOOTMODE_BULB)
         {
             bulb_take_pic(msc);
         }

Or even:
Code: [Select]
--- a/src/shoot.c
+++ b/src/shoot.c
@@ -5055,7 +5055,11 @@
 
 #ifdef CONFIG_BULB
         // then choose the best option (bulb for long exposures, regular for sh
-        if (msc >= 20000 || is_bulb_mode())
+#ifdef CONFIG_SEPARATE_BULB_MODE
+        if (msc >= 20000 || shooting_mode == SHOOTMODE_BULB)
+#else
+        if (msc >= 20000)
+#endif
         {
             bulb_take_pic(msc);
         }

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Regular and bulb exposures in the single bracketing sequence
« Reply #3 on: January 27, 2016, 01:49:00 PM »
Yeah, both would work, but does my version have side effects on 50D?

Or, with your words: which issue your patch fixes?

argv[0]

  • New to the forum
  • *
  • Posts: 9
Re: Regular and bulb exposures in the single bracketing sequence
« Reply #4 on: January 27, 2016, 03:31:46 PM »
Some time ago I tried to shoot a wide dynamic range scene (about 21 EV as it was estimated) - deep shadow at foreground and middle distance, bright lights at background. So advanced bracketing was set to 5x3EV. Also there is many people and cars has passing thru a street at foreground. So an ND filter was used to increase exposure. Historically I use "0 - --" sequences because of long exposure can be easily estimated by shadows. As a result, bulb timer was set to 2m expecting the following sequence: 120,15,2,1/4,1/30. But really 120,15,2,1,1 sequence was gotten. I was confused. I tried to switch sequence type to "0 + ++", turn off bulb timer and set shutter speed to 1/30. The sequence was complete as expected: 1/30,1/4,2,16,128. I was confused again and have going a look at code. :)

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2218
Re: Regular and bulb exposures in the single bracketing sequence
« Reply #5 on: January 27, 2016, 07:04:23 PM »
For what it's worth I use the following workflow, which IMHO is the most robust approach:

  • Switch on Auto Bracketing and ML RAW Spotmeter (Ev mode)
  • Focus and Compose
  • Move the ML RAW (Ev) spotmeter to meter the darkest part where you wish to capture detail
  • Select the exposure to get the Ev value you wish to see at this point, eg I tend to go -3Ev, ie think zone system
  • Use Auto bracketing (1 or 2 Ev) to grab the remaining required frames
  • Process!

Using the above approach means you never need to carry a 1 deg spotmeter and you are guaranteed to get the best photons  :)

argv[0]

  • New to the forum
  • *
  • Posts: 9
Re: Regular and bulb exposures in the single bracketing sequence
« Reply #6 on: February 01, 2016, 11:45:36 AM »
garry23, Thank you for suggestion. But... Where can I find the "ML RAW Spotmeter"?

argv[0]

  • New to the forum
  • *
  • Posts: 9
Re: Regular and bulb exposures in the single bracketing sequence
« Reply #7 on: February 01, 2016, 11:46:48 AM »
a1ex, I have built and tested the ML with the following patch:
Code: [Select]
--- a/src/shoot.c Thu Jan 14 00:52:20 2016 +0200
+++ b/src/shoot.c Thu Jan 28 12:49:16 2016 +0300
@@ -4794,7 +4794,12 @@
 
 #ifdef CONFIG_BULB
         // then choose the best option (bulb for long exposures, regular for short exposures)
-        if (msc >= 20000 || is_bulb_mode())
+        //if (msc >= 20000 || is_bulb_mode())
+        if (msc >= 20000
+        #ifdef CONFIG_SEPARATE_BULB_MODE
+            || shooting_mode == SHOOTMODE_BULB
+        #endif
+            )
         {
             bulb_take_pic(msc);
         }
All advanced bracketing sequences works as expected on my 50D.

During the build process I have found some issues in makefiles:
1. MAKE macro defined unconditionally in the Makefile.top. As far as I know, we are shouldn't set MAKE macro, make do this itself.
2. In the modules/Makefile and modules/Makefile.modules MAKE macro not used to run subsequent make commands.
As a result, on the FreeBSD host build was broken because of make from base system (derived from pmake) is incompatible from GNU makefile syntax extensions (which ML makefiles uses). But GNU make from ports is named as gmake to avoid naming conflicts with base system make.
The following patches are fixed this:
Code: [Select]
--- a/Makefile.top Thu Jan 14 00:52:20 2016 +0200
+++ b/Makefile.top Thu Jan 28 12:49:16 2016 +0300
@@ -1,4 +1,4 @@
-MAKE=make
+MAKE?=make
 RM=rm
 MV=mv
 MKDIR=mkdir
--- a/modules/Makefile Thu Jan 14 00:52:20 2016 +0200
+++ b/modules/Makefile Thu Jan 28 12:49:16 2016 +0300
@@ -13,7 +13,7 @@
 MODULES_ALL_TARGETS_DELETE_IF_FAILED = $(call targets_rules, $(MODULES_ALL_TARGETS), delete_if_failed)
 
 all:
- @make --silent all_silent
+ @$(MAKE) --silent all_silent
 
 all_silent: $(MODULES_ALL_TARGETS_DELETE_IF_FAILED)
 
--- a/modules/Makefile.modules Thu Jan 14 00:52:20 2016 +0200
+++ b/modules/Makefile.modules Thu Jan 28 12:49:16 2016 +0300
@@ -21,13 +21,13 @@
 delete_if_failed:
  @echo ""
  @echo "Building module $(MODULE_NAME)..."
- @make all --no-print-directory || { \
+ @$(MAKE) all --no-print-directory || { \
  echo ""; \
  echo "********************************************************"; \
  echo "WARNING: module $(MODULE_NAME) failed to build, deleting"; \
  echo "********************************************************"; \
  echo ""; \
- make clean; \
+ $(MAKE) clean; \
  }
 
 -include $(MODULE_DEPS)

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2218
Re: Regular and bulb exposures in the single bracketing sequence
« Reply #8 on: February 02, 2016, 12:00:10 AM »
@argv[0]

The RAW spotmeter is under the Overlay menu.

I personally use the Ev option, which gives you the Ev offset from the overexposure point.

As a quick calibration, put the spot meter on a simple object, eg a grey card, and set the Canon exposure to 0Ev.

Read the ML Raw spotmeter and you will have a very narrow and 'accurate' spotmeter that is calibrated to your grey card. Now you can position an area of the image to any 'Ev zone', eg in my Auto Bracketing I set the spotmeter to about -3 to -4Ev on the darkest area I wish to see detail, ie positioning this area around 0Ev in Canon terms.

The ML auto bracketing handles the highlight captures.

Cheers

Garry