Moving Core Renderer to a new Project #2784
Replies: 38 comments
-
While I can see this becoming a topic of hot debate, I for one support this idea. |
Beta Was this translation helpful? Give feedback.
-
Also, I commonly see: "Manim is not an X library, it's an animation library. With this setup, it can be anything without bogging down the whole package. |
Beta Was this translation helpful? Give feedback.
-
I find this idea interesting. If others agree, we would just have to determine very clearly what goes in the core and what goes in this repository. Other plugins can be more free-for-all. @naveen521kk what is your vision for this repository then? If much of it will be partitioned into different plugins, what goes into this "main" plugin? Are you thinking this will mainly be a library of common mobjects and perhaps other utility functions? If so we can call it manim-common, as it will probably be required by most other plugins. This will also allow for more granularity when it comes to required reviews. For example, manim-core can have 2 required reviews per PR, while other plugins may be more lenient. |
Beta Was this translation helpful? Give feedback.
-
Along with this, we can create an Offical Plugin library that has high standards and checks, and then the rest are free for all. |
Beta Was this translation helpful? Give feedback.
-
I'm generally opposed to this for a few reasons. If these can be satisfactorily taken care of, I'm a bit more open to this direction.
I think the way we currently do it is relatively smart. If something is worth being available as part of the library (either because it's simple, widely needed, would be widely used, etc.), then it goes in the library. If it's something that others could use but doesn't really fit the scope of manim's core library (like the rubikscube), then it belongs as a plugin. This also helps solve the problem I raise in point 3a. I could actually make a case that manim-onlinetex and manim-fonts belong in the core library because they serve a different type of purpose than manim-rubikscube. These are not my exhaustive thoughts on the topic, but rather what's come to mind at the moment. I must say, I do not foresee this being a particularly wise or practical change in the long run. And as others have said before regarding manim refactors, time spent on this is time that could have been spent making manim better for the end users, which I don't think this will accomplish. |
Beta Was this translation helpful? Give feedback.
-
1: If we do an official plugin library we can have a mini section in the main docs for each plugin. 2: If we have pip install manim grab all the main plugins this should not be an issue, but I see your point 3: I think the above could solve this issue. 4: Maybe the main plugin library could fix this? You do make some good points, and the above are just some suggested solutions. |
Beta Was this translation helpful? Give feedback.
-
@GameDungeon Those are highly dependent on people actually following what's prescribed in the docs, which we've seen not be particularly effective in the past. Currently, additions and changes to manim work because you have to get your PRs reviewed, approved, and merged. To your 2, if that's what pip installing manim does, then there's little to no point in doing this anyway. I'd also say that I'm not sure if this suggestion is coming out of what's actually best for manim or whether it's coming from a conflict between having manimpango and opengl support. |
Beta Was this translation helpful? Give feedback.
-
I do agree that in general this will require more maintenance, which is not our strong suit. |
Beta Was this translation helpful? Give feedback.
-
ok, I think this is likely to be rejected. But before we do, let's look at some other projects structured like this, and see how they work so well. |
Beta Was this translation helpful? Give feedback.
-
So, the core part of Manim should contain:
Essentially this isn't about splitting everything. The core idea behind this issue was to just bring out the "Core Manim" (things mentioned above) into a separate project and maintain it there, while this repository will have every other thing other than the "Core Manim", including geometry mobject, different Animations so on and so forth. This would help in making, "Core Manim" small and easily understandable.
As I already told you, this isn't about splitting everything into plugins, it seems fine to have "Core Manim" documentation separately which users won't need IMO.
Yes, this is just a developer intention of having "Core Manim" simple, as a user you won't need to care about this and as usual you can do
Sorry, for not being clear, this issue is essentially about moving the "Core Manim" to a new repository as a new project. There shouldn't be any installation issue because Manim should be depending on |
Beta Was this translation helpful? Give feedback.
-
Thanks for clarifying, I misunderstood at first. Some libraries have a module like |
Beta Was this translation helpful? Give feedback.
-
While that could work, I don't think that is what they were saying. I do like that idea though. |
Beta Was this translation helpful? Give feedback.
-
What I mean was to have "Core Manim" as a different project and different repository with more strict rules on reviews, it should have the module name as manim though. For example, have a look at jaraco.envs and jaraco.home, both have the same module name |
Beta Was this translation helpful? Give feedback.
-
I understood what you meant, I was just trying to offer an alternative that may cause less problems :) |
Beta Was this translation helpful? Give feedback.
-
Assuming I am not misunderstanding still about what all you meant with plugins and such. If manim would basically stay the same as it is now and just compartmentalized a bit more, then I prefer @leotrs's idea of modules to new repositories and packages and such. I think multiple repositories would make contributing more difficult. |
Beta Was this translation helpful? Give feedback.
-
Anything else that should be made into a plugin? I think sound should stay. |
Beta Was this translation helpful? Give feedback.
-
I also think jupyter support should stay. |
Beta Was this translation helpful? Give feedback.
-
I think the list from before is a good place to start. The plugins shouldn't be difficult to install or anything, and don't have to go into a different repo. Those features just won't be used by the vast majority of people who use manim. |
Beta Was this translation helpful? Give feedback.
-
I think we were discussing moving things into a new repo, right? Can you elaborate on what you meant by that? |
Beta Was this translation helpful? Give feedback.
-
They should go into a different repo eventually, but I think it'd cut down on friction if we don't focus on that from the start and instead just focus on isolating the code in a plugins directory at first. It's only a suggestion though, I don't have a really strong opinion either way. |
Beta Was this translation helpful? Give feedback.
-
How would that work with our current plugin setup? |
Beta Was this translation helpful? Give feedback.
-
Due to the turbulent-ness of the repository, we decided to put this on hold until OpenGL move is completed. |
Beta Was this translation helpful? Give feedback.
-
We should be specific in what we mean by completed. Does this mean that it should be used by default? |
Beta Was this translation helpful? Give feedback.
-
Until the render code is less volatile. A quote from @behackl "it is currently [not] the best moment to pursue these changes, given that there might be a lot of interface changes from the ongoing migration to OpenGL" |
Beta Was this translation helpful? Give feedback.
-
That's not a measurable goal since "less volatile" is subjective. If we can pin it down to switching the default or a certain level of test coverage there won't be any ambiguity as to when we should restart this. |
Beta Was this translation helpful? Give feedback.
-
I don't really have an objective goal. For now, we can call it, "When OpenGL is switched to the default." |
Beta Was this translation helpful? Give feedback.
-
I think the move to more OpenGL should be done with this refactoring in mind. I'm starting to touch the OpenGL code (I'm basically not going to make my next video without it) and it has brought up a bunch of questions for me, starting with "What is a Camera?" and "What is a Renderer?" and then moving on to Mobject, Animation, Scene, etc. If those are well-defined as we move to OpenGL, it will make the move to plugins a lot easier. |
Beta Was this translation helpful? Give feedback.
-
Discourse currently uses plugin architecture to provide additional optional features, although they have been experimenting with it for about 4 years now. They have a default set of plugins that are shipped with the software, but hundreds of community-supported ones (with some members forming companies around maintaining these plugins).
That's a good idea. The more sensitive sections of manim could be split up into their own repo so that they can have their own workflow and review process. It also filters out higher priority and lower priority PRs as the community version gains popularity. Meanwhile, we can adopt the plugin architecture internally for the rest of manim so that developers have an easier time navigating and testing specific sections/plugins for specific features. What I'm envisioning for manim is that certain features will expand beyond just math animations and form their own niches over time. Eventually we'll have a medium-sized collection of libraries related to physics, engineering, game development, music visualization (@jsonvillanueva), linguistics, and their sub-fields. Even within mathematics, there will be users only interested in proofs, while other users are only interested in graphing and modeling. If we allow these communities to form naturally over time, but have a stable plugin architecture by the time they form, then it would be a good idea to start experimenting now before OpenGL becomes a larger headache. |
Beta Was this translation helpful? Give feedback.
-
Sounds like something I said and I still believe this. But to address your earlier concerns (and a few others since I read through this as I wrote this):
The thing I'd like to avoid most is wasted potential/effort. This is much easier to avoid if this repo stays as a community maintained effort with good CI/workflows, but Manim absolutely needs to be extensible for the many custom Mobjects/Containers that exist in our own personal projects. Some plugins -- if they become widely useful -- should be able to be moved under the organization. See how
A lot needs to happen here (and some things at PyPI/warehouse) before this becomes a reality. In the meantime, I think as @leotrs and @eulertour mentioned in some manner, it'd make sense to start putting things in their appropriate modules/directories (e.g.
I agree with you. Manim shouldn't advertise itself with the slogan
This needs more discussion but I think that discussion should happen following @eulertour's talk on OpenGL (if that's still happening) -- or at least until a few more contributors/devs are familiar with OpenGL + Manim. Some things to consider in the switch to OpenGL, how does the core change if at all? Is the hacky Camera class still needed? I agree with @MrMallIronmaker that this switch to OpenGL should account for this refactor. In looking at Blender's modules (another open source OpenGL based application), I've found our Camera is both strange and lacking. It'd make more sense to think deeply about how OpenGL and Manim should interact; but whiles we're at it, why not take inspiration from Blender as far as what modules they include in what categories (of course, we should not aim to recreate Blender -- we must serve our own niche in animation). For instance, their Camera isn't under Core, it's under Rendering https://docs.blender.org/manual/en/2.93/render/cameras.html. In fact most things we'd consider Core in Manim aren't Core in Blender. Not to side-track this discussion but from click-contrib, there's a few useful extensions for Manim that would be helpful to look into: |
Beta Was this translation helpful? Give feedback.
-
The direction that the current manim structure seems to be heading is closely resembling a game engine, like Bevy, and other animation software. So, I would agree that Camera and rendering could be placed in |
Beta Was this translation helpful? Give feedback.
-
This was discussed in yesterday's meeting that the Manim Core should be small and easily understandable, and shouldn't contain complicated code. As in it should only contain Renderer, Scene, Camera, File Writer and basic Mobject structures.
My thoughts on this:
manim-core
and move all the Renderers, Camera, Scene and anything we consider important. Let it have the same module name,manim
and I have seen that this works. This repository will have a dependency on the other and published as a separate PyPI package.manim-core
would only have as much as it is useless without other parts of the library, with no other extra dependencies like ManimPango, NetworkX.manim
a collection of curated plugins by the community, while this doesn't affect the core library.Beta Was this translation helpful? Give feedback.
All reactions