jeertmans / manim-slides

Tool for live presentations using manim
https://manim-slides.eertmans.be
MIT License
443 stars 48 forks source link

[QUESTION] Comparison with manim-editor #65

Closed lucmos closed 1 year ago

lucmos commented 1 year ago

Hello!

Thank you for building this project! I saw that in the README there is a comparison with manim presentations.

I am interested in the differences between manim slides and manim editor. Could you please summarize them and the use cases of the two tools? Both of them seems manim-presentations follow up.

https://docs.editor.manim.community/en/stable/index.html

jeertmans commented 1 year ago

Hi, thank you for your interest @lucmos!

I have actually never used Manim Editor. I knew its existence, but I did its features. Furthermore, I just tried it a few minutes ago, and it seems like a very different tool.

Manim Slides does not aim to be an editor, but rather an extension that helps to automate the creation of slides.

Manim Editor seems to have a more attractive looking user interface, with fancy stuffs, but a lot of clicks have to be performed just to create a "presentation", in my opinion.

But, to be fair, I don't think I can really judge Manim Editor as I have barely used it.

I would gladly take some feedbacks from other users, to better build a comparison table.

lucmos commented 1 year ago

I see, thank you for your insights!

Personally, the most interesting feature of manim editor to me is the possibility to create a standalone presentation.

E.g. their example is hosted on GitHub Pages, and can be accessed from anywhere.

jeertmans commented 1 year ago

Being able to share a presentation online is indeed a nice feature!

lucmos commented 1 year ago

@jeertmans awesome work with the latest feature convert! I am really looking forward to its development and thinking to use this instead of manim editor :smile:

If that is not a problem for you, I would like to leave some feedback here (without opening too many issues). Please let me know if it is a problem.


I created two slides presentation from the Example scene to compare manim-editor and manim-slides. They are hosted on GitHub Pages, and allow to reproduce the behaviours described below.

Rendered with corresponding settings:

# Manim Slides
manim example-slides.py
manim-slides convert Example ./index.html

# Manim Editor
manim --save_sections example-editor.py  
manedit  # click on export

Fullscreen Mode

For some reason the proportions are not kept correctly when in full screen mode (F11) with Manim Slides (it may be because I have a 21:9 monitor?)

Editor: image

Slides: image

Smooth Transition

The slide transition in Manim Editor is smooth thanks to the "complete loop" mode. Basically it does not change slides immediately after the user input but it waits for the current animation cycle to complete.

Flashing background

With Manim Slides sometimes the background flashes, it is particularly noticeable when changing slides rapidly.

Framerate

I did not a find a way to measure it quantitatively, however, it seems to me that the loop animation on slides is less smooth. They both are rendered at 60fps with default settings.

First animation is skipped

On Manim Slides, the first time you open the web presentation there is a black screen. If you press the right arrow the first animation is skipped. If you go back and the forward it reproduces correctly.

Keybindings

This one is specific to Manim Slides. I did not find a way to configure/use the local keybindings on the web export. E.g. how can I reproduce the animation backward? (I think that is a super cool feature! It would be cool to have a "fast backward", to rapidly go back in the slides smoothly)

Page Numbers

Is there a way to hide slide numbers in the corner?


In general, I digged a bit into the manim internals and I am wondering whether it may make sense to exploit the new builtin "sections" feature, as manim-editor does... https://docs.manim.community/en/stable/tutorials/output_and_config.html#sections


Thank you again for implementing this feature!

jeertmans commented 1 year ago

Hi @lucmos, many thanks for your comprehensive feedback!

I will take time to read it in a few days, so an appropriate answer will follow ;)

Just to mention that Manim Editor does not seem to support IOS safari 😬 But I will give it a try on my computer.

D025DAB5-E67E-4F45-8FFE-8643A11AF865

lucmos commented 1 year ago

Awesome!

Yes, manim-editor has some rough edges... I am also not a fan of the UI (it would be somehow visible by the public in a live presentation, before going fullscreen). I really like having a slides-only html export!

jeertmans commented 1 year ago

Hi @lucmos, coming back to your feedback with a few answers:

Fullscreen Mode For some reason the proportions are not kept correctly when in full screen mode (F11) with Manim Slides (it may be because I have a 21:9 monitor?)

Well, as for most other answers, it depends on RevealJS's config. You should be able to circumvent this by specifying the width and height parameters using cwidth=... and cheight=... to force some ratio. Read more about that here.

You can list all supported config parameters with the CLI (see below). This list is most likely going to expand a lot in the near future.

➜  manim-slides convert --to=html --show-config
presentation_configs: []
assets_dir: '{basename}_assets'
background_color: 'black'
controls: 'false'
embedded: 'false'
fragments: 'false'
height: '100%'
loop: 'false'
progress: 'false'
reveal_version: '3.7.0'
reveal_theme: 'black'
shuffle: 'false'
title: 'Manim Slides'
width: '100%'

Smooth Transition The slide transition in Manim Editor is smooth thanks to the "complete loop" mode. Basically it does not change slides immediately after the user input, but it waits for the current animation cycle to complete.

Since Manim animations are played as background videos, I don't think RevealJS supports this. Maybe I might handle this by writing some JS script inside the generated HTML, but I would need some further investigations. Nonetheless, it's possible to add transitions, especially backgroundTransition, which I need to add to the config parameters (it's trivial).

Flashing background With Manim Slides sometimes the background flashes, it is particularly noticeable when changing slides rapidly.

Yes, but I think it's related to the internet connection. I am not sure how videos are cached and loaded, and I don't know if I can do much. But I agree that is unpleasant :/

Framerate I did not a find a way to measure it quantitatively, however, it seems to me that the loop animation on slides is less smooth. They both are rendered at 60fps with default settings.

Maybe, but I couldn't notice. I need further investigations on this too.

First animation is skipped On Manim Slides, the first time you open the web presentation there is a black screen. If you press the right arrow the first animation is skipped. If you go back and the forward it reproduces correctly.

I also encountered this bug, which occurs must (but not all) of the time. A trick was to add a dummy text section before any video, but I would love to find another fix.

Keybindings This one is specific to Manim Slides. I did not find a way to configure/use the local keybindings on the web export. E.g. how can I reproduce the animation backward? (I think that is a super cool feature! It would be cool to have a "fast backward", to rapidly go back in the slides smoothly)

I don't think the reverse-animation will be easily handled. That is not impossible, but that would need to edit some JavaScript that replaces the currently played animation with its reverse.

For keybindings, I could add a config parameter that adds new key bindings, see here.

Page Numbers Is there a way to hide slide numbers in the corner?

Yes, RevealJS has a built-in feature for that, which I need to add a config parameter for.

In general, I digged a bit into the manim internals and I am wondering whether it may make sense to exploit the new builtin "sections" feature, as manim-editor does... https://docs.manim.community/en/stable/tutorials/output_and_config.html#sections

I was already aware of this feature, and that it would make much sense to use it, especially to avoid concatenating animations per slide, as I do with convert. However, I am concerned about this feature not being available with ManimGL, which I try to keep support for.

In summary

This "export to HTML" was very rapidly developed, and has a lot to be improved. Since it uses HTML, CSS, and JS, there is no real limitation to what can be done. For the moment, I limited myself to using the basic RevealJS presentation, but I would gladly take any feedback, or receive help from the community to help me improve this tool!

A lot of what you have said here could actually be turned into separate issues, labelled as feature request, and be hopefully implemented in the future by me, or by any motivated contributor :D

Again, many thanks for your nice feedback!