question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Manim addons and customizability

See original GitHub issue

@yoshiask had developed an initial structure for what seemed to be support for using addons (i.e., extra functionalities from 3rd-party libs) in manim (see his pull request at the 3b1b repo and his .pptx export extension). This idea has a lot of potential and can be generalized for many functionalities needed by manim.

First, we should implement an API like the one suggested by @yoshiask, which would allow the usage of custom options, classes and functions that interact with manim’s inner structures. An example of project that could benefit from this is chanim.

Second, we should generalize this API for multiple functionalities, and allow for more customizability in manim, generally speaking. For example:

  • We should allow the user to pick how the video should be rendered, i.e. which rendering method should be used (this is a matter to be discussed by itself!) - @eulertour’s manim web port could benefit from this. For instance, the user could pick between rendering in the browser (using @eulertour’s tool) or with cairo, which would leverage the latter from being a required dependency (see #14).

    • This will require, of course, developing an interface that abstracts rendering away. E.g.: To render a shape, we just call render_shape(...data...), a function that tells the renderer to do this, which can then interpret this message as it wishes.

    • Note that anyone would be able to create any renderer compatible with manim that they wish.

  • We can also, similarly, allow the user to choose how to render LaTeX (see #23, #24). They can delegate it to an online website, should someone create an extension for this, or simply use the available installation (the default behavior). We would do this, also similarly, by abstracting away the rendering processes with an appropriate interface.

Note that the use of dataclasses (see #7) and proper organization/typings would immensely aid us here.

Comments? Suggestions?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
eulertourcommented, May 21, 2020

Most of that makes sense, although a render_frame() function will probably make more sense than a render_shape() one since it allows the renderer for more freedom over how to process each frame. I also think we should add a realtime renderer to the base repo, since the one with cairo is really slow.

Other than that it seems like we’ll basically have to allow users to overwrite any function they want, which seems like it could be tricky to get right…

1reaction
yoshiaskcommented, May 21, 2020

@eulertour and I were discussing the extensibility and modularity of rendering. I think that we could make the actual rendering parts as add-ons, since we want people to be able to add new rendering backends on their own.

Read more comments on GitHub >

github_iconTop Results From Across the Web

A deep dive into Manim's internals
Author: Benjamin Hackl Introduction: Manim can be a wonderful library, if it behaves the ... In the order they are called, these customizable...
Read more >
AddonPanel Manager - Blender Market
Easily view multiple panels at once and work more efficiently using the grouping panels feature. Easy access to all your addons right next...
Read more >
Manim – Objects, Animations and Plugins - slama.dev
This part of the series covers creating custom objects and animations, and also showcases some interesting community-made plugins.
Read more >
README.md - 3b1b/manim - Sourcegraph
Manim is an engine for precise programmatic animations, designed for ... To add your customization, you can either edit this file, or add...
Read more >
manim/utils.py at main - GitHub
The library-wide config file determines manim's default behavior. The ... single source of truth for all of the library's customizable behavior.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found