-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Roadmap
Problem: currently Manim's modules are very convoluted and the rendering logic is not really easy to understand.
Solution: Let's try to come up with a general interface for things. We'll start with basic concepts, and then move on from there. Once we have settled for a design that makes sense, we can start pushing the current implementation more in that direction. (Or rewrite parts from scratch, which might be easier in some cases.)
class Scene:
"""
A scene is Manim's basic canvas.
"""
# Attributes
camera # <- might be owned by the renderer
mobjects
renderer # <- might be owned by the camera
# Methods
class Mobject:
"""
Mobjects are "Manim objects", that is, objects that
can be added to Scenes (+ animated!)
"""
# Attributes
# Methods
class Camera(Mobject):
"""
A camera is a special mobject which is used to capture
the perspective of someone viewing a scene. The camera
talks to a renderer (or maybe the renderer talks to the
camera of a scene?).
The Camera works independently
of the actual renderer implementation being used.
"""
# Attributes
# Methods
class Renderer:
"""
Renderers are responsible for turning the information
relayed to them by a camera into data that can be
used for producing an image or an animation (or maybe
even more advanced types like SVGs?).
This has to be an abstract class,
which can't be instantiated.
It only serves as an interface for
the actual implementation using a specific rendering API—
like Vulkan or OpenGL. That way the rest of Manim doesn't "care"
which rendering implementation is being used
under the hood.
"""
# Attributes
# Methods
Jan 21 - ?
-
Can we create an abstraction for mobjects that can be understood by any renderer?
-
Where possible use the same logic / objects for all renderers and where not possible move that logic to the renderers
-
Define clear responsibilities for mobjects and renderers. E.g. what is the minimum mobjects should do and leave the rest to the renderers?
-
Refactoring the config included in manim 1.0?
-
Try to reduce the number of flags as it increases complexity. Some discussion on it here - https://github.com/ManimCommunity/manim/issues/2069
-
In opengl a lot of objects are created each frame. E.g. Mesh and ShaderWrapper objects are created for each mobject each frame. We should avoid this to improve performance
-
[] Create an abstract renderer (in progress)
-
[] Make scene agnostic to the renderer (in progress)
-
[] Create a mobject class that can be used by both renderers
-
[] Remove opengl_compatibility (likely will depend on a number of other tasks)