Skip to content

Manim addons and customizability #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
PgBiel opened this issue May 21, 2020 · 5 comments · Fixed by #784
Closed

Manim addons and customizability #42

PgBiel opened this issue May 21, 2020 · 5 comments · Fixed by #784
Labels
enhancement Additions and improvements in general new feature Enhancement specifically adding a new feature (feature request should be used for issues instead)

Comments

@PgBiel
Copy link
Member

PgBiel commented May 21, 2020

@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 Fix the installation of or completely replace cairo #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 Replace miktex with pylatex #23, Make sure that having a LaTeX distribution is optional #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?

@PgBiel PgBiel added the enhancement Additions and improvements in general label May 21, 2020
@yoshiask
Copy link
Contributor

@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.

@eulertour
Copy link
Member

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...

@PgBiel
Copy link
Member Author

PgBiel commented 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.

Sure; the render_shape() idea was simply an example so people understand the main idea behind it. Of course there is much more potential here. We'll need to discuss this in detail

I also think we should add a realtime renderer to the base repo, since the one with cairo is really slow.

We should discuss more about this, yes

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...

Well, the renderer should optimally only receive and work with the data it needs... We might need to restrict its freedom in order to get this right.

@PgBiel PgBiel added the new feature Enhancement specifically adding a new feature (feature request should be used for issues instead) label May 21, 2020
@leotrs
Copy link
Contributor

leotrs commented Oct 8, 2020

What is the latest when it comes to add-ons? I kinda sorta remember @yoshiask saying he will come back to this when manim CE stabilizes a bit. If so, I suggest we close this issue until such a time.

@naveen521kk
Copy link
Member

Something to document here I found some doc on how plugins work.
https://packaging.python.org/guides/creating-and-discovering-plugins/

This was referenced Nov 29, 2020
vikingout pushed a commit to vikingout/manimCommunity that referenced this issue May 17, 2025
Update possible_words to reflect changes by NYT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Additions and improvements in general new feature Enhancement specifically adding a new feature (feature request should be used for issues instead)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants