ManimCommunity/manim

Experimental Progress Tracker

Open

#3817 opened on Jun 22, 2024

View on GitHub
 (0 comments) (15 reactions) (2 assignees)Python (17,820 stars) (1,378 forks)batch import
breaking changeshelp wantedopenglrefactortracking

Description

Experimental Progress Tracking

Tracker issue for rewriting the core of Manim

Currently working on:

If you're interested in helping out, try running pytest, choosing a test that fails, and fix the test!

Before merging into Main

Essentially, what needs to be done in #3112

  • Restructure the render loop to use Manager (#3785)
  • Merge main into experimental (#3815)
  • Functioning FileWriter (#3821)
  • Sections (#3883)
  • Skipping to animation number
  • Fix all Animations
  • Scene subclasses
  • ThreeDScene (#4059)
  • Animation of Camera (#4059)
  • Clean up the code
  • Instanced Rendering (#3816)
  • ImageMobject
  • PMobject (is this even used?)
  • Get all tests working

Nice to have

The following would be nice to have, but could also be implemented in follow-up PRs to reduce the diff.

  • Rewrite VMobject to be renderer agnostic
  • Double pass rendering to decouple Scene and Manager
  • Audio support

Follow-Ups

  • Caching
  • Plugin Hooks

Timeline Goals

  • v0.20.0: Experimental should have most tests passing
  • v0.21.0: Experimental should be released, and the follow-ups should be in the process of being implemented.

But... Why?

Motivation

The current Manim codebase is very entangled.

Additionally, the current implementation of renderers (OpenGL mainly, but Cairo as well) in Manim is unmaintainable. The OpenGLMobject contains shaders inside itself! This means in the future if we ever want to allow more types of renderers (e.g. Metal for MacBooks), we'd have to create a third base Mobject, and a new Camera, which is just stupid. Instead, *Mobjects should be renderer independent, and all the renderer specific stuff should be inside a class implementing the RendererProtocol.

New Structure

image Here you can see every class has its own responsibilities. The Camera is responsible for the FOV, the Scene for orchestrating animations, Mobjects have no dependency with the renderer, and the Renderer only cares about a SceneState, not the actual Scene.

Contributor guide