Magic Lantern Forum

Developing Magic Lantern => Feature Requests => Topic started by: dfort on December 01, 2015, 11:09:05 PM

Title: Reassign button for White Balance
Post by: dfort on December 01, 2015, 11:09:05 PM
Recently I discovered the ML Auto adjust Kelvin + G/M (http://www.magiclantern.fm/forum/index.php?topic=11269.msg109585#msg109585) in a submenu. It would be so cool (and warm and magenta and green) to map a button for this like on the big boys' cinema cameras. Is this possible? Maybe with a lua script?

Thanks to Danne for pointing out this feature to me.
Title: Re: Reassign button for White Balance
Post by: Danne on December 02, 2015, 03:23:18 AM
It,s a hidden gem really. A shortcut to a custom white balance mode, not having to snap a picture change mode on camera, select picture etc.
What makes this even more interesting is that MLV format registers G/M B/A settings in metadata. This makes it useful in post if one could convert calculations from G/M B/A to AsShotNeutral values. I tried to some extent to make this work coming close but not being totally correct it,s decieving.

For instance. Having these values
G/M -9
-AsShotNeutral=0.8217730437 1 0.3426459946

Trying out
9x0.01=0.09
0.3426459946-0.09=0.2526459946
New AsShotNeutralvalue would be
-AsShotNeutral=0.8217730437 1 0.2526459946

This would compensate for tint reading. Can,t verify how correct this is.
Of course when B/A is change too to something like B/A 9 G/M -9 the calculations are much harder to accomplish.


Title: Reassign button for White Balance
Post by: DeafEyeJedi on December 02, 2015, 04:08:02 AM
Indeed, it is a hidden gem and I enjoy/love using this feature on my 5D3 (need to double check for my other cameras as well) since I'm not sure if it's possible to set "SET" button as the hot key for the custom WB to kick in prior to shooting.

However, as Danne pointed out earlier, this can be quite deceiving because when it comes to post and want to try to achieve as close to "AsShotNeutal" values and unfortunately it can be rather annoying to spend too much time doing so in post.

Thanks, Daniel, for starting this thread as I feel it will lead to good things... Usually around this time of the year is when the magic happens on this incredible Forum within this community!
Title: Re: Reassign button for White Balance
Post by: Audionut on December 03, 2015, 04:32:23 AM
As far as I know, being able to reassign buttons is no easy task.  Some buttons are readily available (and hence already used for things in ML), and I believe some buttons are simply not yet available for modification.

Since the usage of buttons has sort of just built up over the years, you can't exactly just start using some button without modification of the existing code for the usage of the button.

http://www.magiclantern.fm/forum/index.php?topic=7816.0
Title: Re: Reassign button for White Balance
Post by: dfort on December 03, 2015, 05:31:06 PM
Maybe move it out of the submenu? It should be more accessible.

That is something even I might be able to do.
Title: Re: Reassign button for White Balance
Post by: dfort on December 04, 2015, 12:00:59 AM
Well that was pretty easy:

(https://farm1.staticflickr.com/603/22875195543_843444194e_n.jpg)

I just made a second menu outside of the White Balance submenu item so it is easier to get to. I'll put it on my EOSM__working branch to share with other EOSM users who feel left out of the nightly builds party.
Title: Re: Reassign button for White Balance
Post by: a1ex on December 04, 2015, 12:34:58 AM
On the other cameras, this is implemented via the arrow key shortcuts - that is, you press some camera-specific shortcut key, then you press SET.

http://wiki.magiclantern.fm/userguide#arrow_key_shortcuts

I'm not sure what button can be used here - maybe a long press on some button may work, but you need a button that sends both press and unpress events (and, on most cameras, only SET and arrows would do that). Or maybe a double-click - which is also a bit tricky to implement, since you need to pass the single click to Canon firmware, but not the double click.

I would avoid moving this option in the main menu, for clutter reasons. If you use it often, you can place it into My Menu (Prefs -> Customize Menus).
Title: Re: Reassign button for White Balance
Post by: dfort on December 04, 2015, 01:01:08 AM
I'll play around with it some more and see what shortcut keys work for the EOS-M. For now this seemed like a good place and it is no more cluttered than the Canon menu.

(https://farm1.staticflickr.com/685/23421482371_7c2a9b9f3d_n.jpg)
Title: Re: Reassign button for White Balance
Post by: dfort on December 04, 2015, 04:36:47 AM
Customize Menus > doh!
Just tried it out an it does exactly what I wanted.

However now I think I found something even better if that is possible. The Play button lets you change the white balance but it only goes in one direction. As far as I know there is no button that takes you the other direction. Wouldn't it be better if the Play button invokes the "Auto adjust Kelvin + G/M" setting? Is that possible? Guess I'll have to do something a bit more challenging.
Title: Re: Reassign button for White Balance
Post by: dfort on December 04, 2015, 06:38:02 AM
Ok--tried something new. I updated the White Balance button assignment so it triggers "Auto adjust Kelvin + G/M" instead of incrementing the color temperature. Updated the pull request:

https://bitbucket.org/hudson/magic-lantern/pull-requests/673/auto-adjust-kelvin-g-m-tool-in-the-main/diff
Title: Re: Reassign button for White Balance
Post by: DeafEyeJedi on December 04, 2015, 09:05:38 AM
I like that concept actually...
Title: Re: Reassign button for White Balance
Post by: axelcine on December 04, 2015, 11:52:29 AM
Well done, dfort. Very good idea - I trim the WB all the time. A handy shortcut would be - magic.
Title: Re: Reassign button for White Balance
Post by: dfort on December 04, 2015, 08:28:07 PM
This is still a work in progress. Looks like this broke some functionality and brought up some issues with the menu backend. Keep an eye on this pull request for the latest updates.

https://bitbucket.org/hudson/magic-lantern/pull-requests/673/auto-adjust-kelvin-g-m-tool-in-the-main/diff
Title: Re: Reassign button for White Balance
Post by: Danne on December 05, 2015, 08:28:17 AM
+1 to such a button.
Anybody knows how canon calculates the G/M B/A numbers to CR2 wb metadata? I should check it out myself.
Title: Re: Reassign button for White Balance
Post by: eyeland on December 05, 2015, 05:19:00 PM
+1 from here as well
Canons implementation of wb controls has always been one of my main frustrations when it comes to DSLR video
Title: Re: Reassign button for White Balance
Post by: aschille84 on January 21, 2016, 01:08:26 PM
+1 to this
Would be a superquick way to set wb
Title: Re: Reassign button for White Balance
Post by: dfort on January 21, 2016, 05:52:08 PM
This is still on my wish list but there seems to be some issues with the way I'm trying to implement it and the way the ML menu settings are coded.
https://bitbucket.org/hudson/magic-lantern/pull-requests/673/auto-adjust-kelvin-g-m-tool-in-the-main/diff

In the meantime here's the next best thing. Make a custom menu.

Start out by going to the wrench menu and select "Customize Menus" the highlighting will change from blue to brown.

(https://farm2.staticflickr.com/1663/24154408619_0de2c21d2e_z.jpg)

While the highlighting is brown navigate to the White Balance submenu and select "Auto adjust Kelvin + G/M".


(https://farm2.staticflickr.com/1676/24522170285_da995a0007_z.jpg)

This will create a new star menu icon and in there you will find "Auto adjust Kelvin + G/M" without having to dig into the White Balance submenu in order to get to it.

(https://farm2.staticflickr.com/1572/24226609060_878f8d9a42_z.jpg)

Not quite a one button solution but much easier to access when you want to do a quick white balance.
Title: Re: Reassign button for White Balance
Post by: aschille84 on January 21, 2016, 06:53:02 PM
Thats a great tip @dfort. Ill set the shortcut up next time I use the camera.
Title: Re: Reassign button for White Balance
Post by: axelcine on January 21, 2016, 08:01:38 PM
ML is filled with clever possibilities. I set up ML My Menu the first day I had my 5d3's, and of course the wb adjust got a prominent place. But whenever I select ML, the menus pop up somewhere else than in My Menu, so I have to navigate a bit with the joystick. Not a very big problem, but...

I have set up My Menu in the Canon menu system as well, and the Canon-version can be set as default so it pops up every time. Would it be possible to read the associated flag or register, and - if set - the ML version of My Menu would also take priority and pop up right away all the time as first menu choice? That way the ML My Menu could reuse a Canon Menu feature and avoid having to get a register or flag of its own.

Then wb adjust would be right under your thumb every time.
Title: Re: Reassign button for White Balance
Post by: goldenchild9to5 on January 22, 2016, 07:24:59 AM
Always something new and useful in Magic Lantern  :D Great job Team..