what about adding blending modes? #3480
Replies: 12 comments 8 replies
-
I mean it general it sounds like a nice idea but i am not sure how well that would go with the mobject system, because normally how the blend mode works is that it Acts on the last layer and the mobject rendering only has an order and not really a notion of layer which would result it somewhat undefined behavior, also i am unsure how well cairo would handle that. If you have a usecase and some more specific ideas on how to implement it we can think about it |
Beta Was this translation helpful? Give feedback.
-
I think that Manim order and layers can be placed in a 1-1 correspondence, if the set of mobjects used internally in Manim keeps the property of “totally ordered” set. When it turns into blending modes, that is how pixels are interpolated. A use case? Well, literally every program that deals with computer graphics have blending modes. |
Beta Was this translation helpful? Give feedback.
-
I would note back that Manim is not really a "graphics" program in that sense because it is not meant for editing images and so on. And we can also have 3D animations in the future which will probably interfere a lot with the idea of blending modes. So i agree most of the applications that deal with editing images has blending modes, but Manim is a 2D/3D Animation program which does not really go into that use case. Hope that explains the context a little and why i asked about a specific usecase. |
Beta Was this translation helpful? Give feedback.
-
Nope. Manin is indeed a
False. Send to Beck/Bring to front don't represent a limited space of usage in 2D context. They are widely used in 2D context. I also find it interesting that you close an opinionated issue on behalf of the whole community. |
Beta Was this translation helpful? Give feedback.
-
Regarding the use-case: I think there are plenty of use case, on top of my head I am thinking if you want to overlap something on level-surfaces, to show how quantization work and such, but also for aesthetic which IMHO is extremely important. Take for example these two examples (it is a frame Manim - Final Cut Pro). Regarding the implementation: I don't know, this should be a dev discussion I think. Regarding the send to back/bring to front: can't this feature be only available in 2D and disabled in 3D? Otherwise, in 3D the first thing that comes in my mind (it may all wrong, I am just writing it as it is coming in my mind) couldn't be to consider the normal vector coming out from the screen of your computer as layering reference? And then to consider send to back/bring to front wrt to such a normal vector? |
Beta Was this translation helpful? Give feedback.
-
Fine. I thought that adding blending modes along with send to back/bring to front was a sort of "low hanging fruit" but clearly is not due to that everything is 3D. For me we can drop the idea.
You mean through external programs? If so, yes, I agree. |
Beta Was this translation helpful? Give feedback.
-
And also xD I still have to disagree. So either give a clear definition on what a "graphics" program is, otherwise I will give you a ton of examples where this is not an existing functionality. Because arguably "graphics" programs are kind of all graphical applications if you claim Manim is one of them. So let's look at games, I do not really see any single game that includes blending modes for any reason, and those are pretty graphic I think. Then your argument becomes: No one claimed Manim is a game So sure let's go to the closest thing to Manim that exists in the open-source World which would be Blender
So please tell me if your definition of graphical program suits a program like Blender, because the general pipeline is basically what Manim does. Right it's because it is not just about being a "graphical" program. Because as per definition in the code Manim is a 3D Animation program which has a procedural way of creating Animations through code. Which is a "graphical" application but to say that every graphical application has blending modes is a pretty stubborn viewpoint. |
Beta Was this translation helpful? Give feedback.
-
Maybe understand the full scope of the problem first and help with finding a solution, and provide use cases for ideas, for example "I want to do this specific animation, but it is not possible because xyz is currently not possible in manim". Which would give a starting point for a problem. Which will be way more constructive in actually finding a solution to implement the feature that you want, and then help to find a solution if we state that it will be more difficult than you first had in mind. And as a last note, please do not use the most general category to describe a software and use arguments like "every other software has this" it will never result in a constructive discussion, because Manim is not every other software. |
Beta Was this translation helpful? Give feedback.
-
So if you find a good use case and provide maybe an example how to solve this/implement it in Manim then I reiterate I would be happy to implement it! |
Beta Was this translation helpful? Give feedback.
-
With this I am going to close. I already provided a use case. Anyhow, @behackl provided a definitive answer here:
Knowing that in Manim there is no distinction between 2D and 3D answers all the questions. It was enough to say it at the beginning. From the provided answers one can only understand that is a 2D/3D program, not that there is no distinction in the internal machinery.
Excuse me‚ why you need to Laugh Out Loud? Is it normal that a dev laugh out loud to a user? |
Beta Was this translation helpful? Give feedback.
-
@behackl I appreciate your effort to smooth things down and your interest in the topics I raised. However, I finally get clear answers and I don't feel we need further clarification on this topic. But if you really want to talk to me face to face then fine, ping me on discord (maybe not tonight because it is Saturday and I am going out). Having said that, I will gladly use Final Cut Pro for blending modes and Doodly for Whiteboard animations. You follow your roadmap. I will use Manim for what it has to offer. I may change tool if something that better fits my needs show up along the way but at the moment I don't see a valid alternative and I spent too much time in learning Manim so I will keep in using it but certainly without the same expectations as before. Sorry, but I am too old for going through all of this. :D P.S. |
Beta Was this translation helpful? Give feedback.
-
I think for the sake of Cairo at least, the changes sound possible. They'd likely happen somewhere in the camera.py between Lines 633 to 756 in 4e3cfd2 |
Beta Was this translation helpful? Give feedback.
-
Description of proposed feature
Given that you touched colours, I have a provoking thought: what about adding blending modes in the future?
At first glance the VMObject class shall be modified such that it takes an additional parameter "blending_mode=" that can take values in an enum {normal (default), add, multiply, screen, ...}.
Blending modes explained: https://www.youtube.com/watch?v=EOoMakEVh_s
Beta Was this translation helpful? Give feedback.
All reactions