ManimCommunity / manim_editor

Web Presenter for Mathematical Animations using Manim.
https://docs.editor.manim.community
MIT License
257 stars 12 forks source link

Can presentations combine sections rendered with both Cairo and OpenGL? #89

Closed dabnciencias closed 1 year ago

dabnciencias commented 1 year ago

Excuse me for asking here, but I didn't find any other way to contact you.

I'm creating a presentation which makes use of the MovingCamera class in some slides and the tikz LaTeX package in others. Unfortunately, arrows drawn with tikz are missing their straight lines when rendered with Cairo, whereas they are rendered perfectly fine with OpenGL. On the other hand, MovingCamera does not work correctly when rendered with OpenGL, since this function has not yet been implemented.

Is it possible to create a Manim Editor Project in such a way that some "slides" (sections, really) are rendered in Cairo and others are rendered in OpenGL? If possible, how could I go about rendering and ordering said sections?

Thanks in advance for your response.

christopher-besch commented 1 year ago

This is the preferred way of asking anything about the Manim Editor. Any answer I give might also help others in a similar situation. So thanks for opening this issue! If you want to contact me about something that shouldn't end up on the web, write at mail@chris-besch.com.

But now to your question: What you should be able to do is create two Python scripts, one rendered using Cairo, the other with OpenGL. Your media directory will now contain all video fragments in some complicated looking folder structure. The Manim Editor doesn't care about that structure, it just looks for the json files produced by Manim. On the project creation screen of the Manim Editor you should find all sections now. In these docs you can actually see this being performed in action. Look for the paths where the different sections where found. In this case Manim was being run with two different quality settings.

I hope this helps. In any case, tell me if this solves your issue. Have a nice one!

dabnciencias commented 1 year ago

Understood... I'm so relieved that the Manim Editor works in the way you've just described.

So, just for future reference, to solve this I'll personally try isolating all the sections which use tikz arrows in a another file, which I will render using OpenGL in the same directory where I rendered my original file (using Cairo), and then I'll just order all the sections in the project creation screen.

Thank you very much for the quick response!