Magic Lantern Forum

General Discussion => Forum and Website => Topic started by: a1ex on March 19, 2018, 12:25:53 AM

Title: Menu screenshots on the homepage
Post by: a1ex on March 19, 2018, 12:25:53 AM
Quote from: dmilligan on April 11, 2015, 06:37:29 PM
[...] photos on the homepage do not necessarily reflect the latest development.

Solved. Sorry it took so long - have fun browsing the menus on the home page :)

(https://a1ex.magiclantern.fm/bleeding-edge/homepage.jpg) (https://www.magiclantern.fm)

Now the screenshots can be auto-updated every time a new build arrives.




Under the hood:
- a script that navigates the entire ML menu and saves screenshots (it runs on Jenkins, here's a GIF (https://builds.magiclantern.fm/jenkins/view/QEMU/job/QEMU-menu-screenshots/lastSuccessfulBuild/artifact/qemu-eos/menu-screenshots/5D3.gif))
  - the following modes are simulated: photo, photo LiveView, movie
  - for each top-level ML menu option: you can toggle the option (SET), navigate the submenu (Q) or do both
  - nothing can be changed in submenus (yet)
  - anything you have changed is discarded as soon as you go away from that menu item (to keep the number of screenshots manageable)
  - extras: Canon menu, Q menus (just navigation, without changing any option)
  - result: some pre-rendered screenshots (about 3000 images at the time of writing)
- some hardcoded navigation logic (that runs on the server)
  - simulation state is completely given by the key sequence you see in the URL
  - screenshots are served as static images like this (https://direct.magiclantern.fm/nav/5D3/ph-q.png) (will be cached by your browser)
  - each screenshot has about 10K (LiveView screenshots are larger)
  - URL grows with each click (but you can start over from the power button)
- front-end (interpreted by the browser)
  - button overlays (the red circles) are SVG elements on top of the camera image
  - works with or without JS (looks nicer with JS, e.g. flips the movie button, LED activity, nicer transitions)
  - LED shows network activity (querying the next state, loading a screenshot)
  - keyboard works too if JS is enabled (same buttons as in QEMU); ESC to disable keybindings, ENTER to re-enable
  - browser back button works too
Title: Re: Menu screenshots on the homepage
Post by: Walter Schulz on March 19, 2018, 12:42:06 AM
Yes!
Didn't dare to ask for something like that. But you started it ...  si on lui donne le petit doigt, il prend le bras  .... how about switching between different cam models?
Title: Re: Menu screenshots on the homepage
Post by: a1ex on March 19, 2018, 12:46:30 AM
That works, although each model needs some manual tuning (finding a suitable image, positioning buttons on top of it, working around model-specific quirks in the emulation...)

The old buttons (left/right) could be used for that. Adding this simulation to the download page, for each build, should be also useful (alongside with screenshot diffs (http://direct.magiclantern.fm/forum/index.php?topic=12396.0) to make it easier to identify the changes).
Title: Re: Menu screenshots on the homepage
Post by: Walter Schulz on March 19, 2018, 10:35:38 AM
Suggestion: Add something to point users to trashcan button after loading page/restarting simulation.

Try breaking the simulation? Does
- Switch to movie mode or enable LiveView in photo mode
- Press play button -> No image screen
- Press play button again -> Canon screen
count?
Title: Re: Menu screenshots on the homepage
Post by: a1ex on March 19, 2018, 10:37:39 AM
Yeah, that counts, good catch.
Title: Re: Menu screenshots on the homepage
Post by: Walter Schulz on March 19, 2018, 09:26:42 PM
That is a good one, QEMU rules!
Focus tab -> Read lens info!
Debug tab -> Lens info
:P
Title: Re: Menu screenshots on the homepage
Post by: a1ex on March 19, 2018, 09:30:12 PM
Lens info looks OK to me (matches the actual camera screen).

I had that lens (http://photography-on-the.net/forum/showthread.php?t=1410220) mounted when getting the startup log for emulation.
Title: Re: Menu screenshots on the homepage
Post by: Walter Schulz on March 19, 2018, 09:32:20 PM
You got me!

Better go preparing myself for April, 1st ...
Title: Re: Menu screenshots on the homepage
Post by: g3gg0 on March 20, 2018, 12:14:55 AM
Quote from: Walter Schulz on March 19, 2018, 09:32:20 PM
Better go preparing myself for April, 1st ...

"x86 emulation on Canon DSLRs..."
...oh wait.

what now?
booting windows 10? ;)
Title: Re: Menu screenshots on the homepage
Post by: Walter Schulz on March 24, 2018, 05:35:06 PM
Minor issue:
1) Startup/restart simulation
2) Press trashcan button -> ML startup screen appears telling to press any key to enter ML settings
3) Press Liveview or Q button -> ML menu shows up in simulation. Real world cam doesn't leave this screen with these buttons.
Title: Re: Menu screenshots on the homepage
Post by: a1ex on March 24, 2018, 05:53:59 PM
That sounds like a bug that needs to be fixed in ML, rather than in the simulation. The navigation logic in the simulation is hardcoded from scratch (without reusing ML or Canon code), and it's just an approximation.

Found another one: double-clicking the power button twice causes the delete button (the red circle around it) to disappear (it can no longer be clicked, but works from the keyboard). Refreshing the page after ~ 10 minutes should fix it (I hope).