Author Topic: Depth of field display  (Read 9332 times)

monograph

  • New to the forum
  • *
  • Posts: 12
Depth of field display
« on: March 15, 2015, 11:06:08 PM »
Depth of field calculation display above focus distance metering in bottom bar...

I just put the code for this thing online if anyone is interested or perhaps can make it better...   https://bitbucket.org/monograph/ml_tweaks/branch/ml_tweaks#diff merged into ML unified

It looks like this:





I am no expert at this, in fact I only learn from reading the Magic Lantern code itself. Perhaps this addition is not suited for all cameras - (screen resolutions?) I have a 5D3 to test on. Please give me pointers how to make things better (or to get the hell out! ;)

I have been using this DOF display professionally for a year now and it helps alot.

PS: a1ex perfected the code and merged it into ML, thanks a1ex  :D
5D3

arrinkiiii

  • Hero Member
  • *****
  • Posts: 1101
  • ML ADDICTED 7D
Re: Depth of field display
« Reply #1 on: March 16, 2015, 01:29:11 AM »

This is a good tool for video =)

Licaon_Kter

  • Hero Member
  • *****
  • Posts: 519
  • M
Re: Depth of field display
« Reply #2 on: March 28, 2015, 02:18:51 AM »
I merged this in my FRSP build (with those 3 tweaks by a1ex too), but there is an issue (at least on my M1):
1. Switch to movie mode ( non raw; crop mode or not, it works the same )
2. dof is displayed ok
3. start recording
4. dof is displayed ok while it AFs by itself
5. now select a focus point
6. *-hold to AF, during focus time dof is displayed ok
BUT, as soon as AF locks on, the dof display yields 0cm | 0cm while the original ML dof still shows an ok value

While recording, this can be repro from step 5 every time.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12390
  • Quarantined
Re: Depth of field display
« Reply #3 on: March 28, 2015, 07:52:10 AM »
If those numbers are 0, it means either focal length, aperture or focus distance are also 0. Which of them?

(in fullres code there's nothing touching these variables, so the bug is probably present in unified as well, right?)

the dof display yields 0cm | 0cm while the original ML dof still shows an ok value

This one is puzzling, as both codes are printing the same variable.

monograph

  • New to the forum
  • *
  • Posts: 12
Depth of field display
« Reply #4 on: March 28, 2015, 08:56:23 PM »
I tried this on 5D3 and got the 0cm | 0cm problem... It seems to happen when pressing the SET button WHEN recording (not only in AF mode)... so what is SET doing only in record mode (besides printing the canon overlay) ?  :o
5D3

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12390
  • Quarantined
Re: Depth of field display
« Reply #5 on: March 28, 2015, 09:10:47 PM »
I don't have a lens that reports focus distance and works on 5D3, so you get the same question:

If those numbers are 0, it means either focal length, aperture or focus distance are also 0. Which of them?

monograph

  • New to the forum
  • *
  • Posts: 12
Depth of field display
« Reply #6 on: March 28, 2015, 09:22:02 PM »
When recording RAW and pressing SET button (or SHUTTER button)  these things happen:
-The Canon graphic overlay appears
-DOF: 0 0
-Aperture info : disappearing!
-Shutter info : staying but unchangeable
-ISO info : staying but unchangeable

-The Focus Distance and Focal Length keep on working like normally...

(I did not get this problem with H264 recording)


Some more experiments:

Changed line 1133 in lens.c to:

lens_info.aperture = lens_info.raw_aperture = 1;

(from 0 value ... trying to track down the problematic zero in my amature-logical way).)

Resulted in a usable DOF info !!  and Aperture info not disapearing but unchangable... Canon graphic NOT appearing.... I have no clue about what this means, or how this code = code = ; works :o

PS:

Changed line 1133 in lens.c to:

lens_info.aperture = lens_info.raw_aperture;

same results as above... DOF Display working but the other infos "freezing up". It's now a total different problem than to begin with  :-\   How does this  = = 0; work ??   is it ok to skip it ?

5D3

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12390
  • Quarantined
Re: Depth of field display
« Reply #7 on: March 29, 2015, 12:43:51 PM »
Aperture disappearing: that's the hint I was looking for. This means I can attach the electronic board from my (now broken) 50/1.8 lens and troubleshoot it :P

"a = b = 5" means both a and b receive the value 5.

edit: pushed a fix.

monograph

  • New to the forum
  • *
  • Posts: 12
Re: Depth of field display
« Reply #8 on: March 30, 2015, 04:25:13 AM »
&& lens_info.dof_far.....  wow!  always learning some new trix here   :P
5D3

SpuTTer

  • New to the forum
  • *
  • Posts: 5
Re: Depth of field display
« Reply #9 on: May 08, 2015, 11:43:57 PM »
Would it be possible to add an option to display as Imperial for us USA folks? Maybe have an option of the current metric vs imperial in the Q menu settings.

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1981
Re: Depth of field display
« Reply #10 on: May 09, 2015, 12:21:34 AM »
Menu Prefs, lens info prefs.

SpuTTer

  • New to the forum
  • *
  • Posts: 5
Re: Depth of field display
« Reply #11 on: May 12, 2015, 12:14:01 AM »
Thank you!