Copy link to clipboard
Copied
Hi everyone, I'm trying to learn basics of plugin development in After Effects, trying to create a simple text, or rather draw pixels on screen, but not sure how to do that. I was trying to implement drawbot, but to many things I do not understand 🙂 If someone could give a simple example of drawing sample text on screen, that would be awesome. I couldn't find an example / sample project in sdk. Thanks a lot in advance!
Copy link to clipboard
Copied
well, that depends on what you mean by "draw pixels on screen". i can think of 2 meanings:
1. draw into the effect's render buffer. that buffer is used by a layer when rendering a comp's result.
2. drawing a UI on top of the comp, or in the ECW. such pixels are not used in the comp's result and are just there to guide the user.
drawbot is used only for UI. the drawbot suites will only operate on a ui buffer handed to your plug-in by AE with a special drawing content. you can't use drawbot for rendering to a "normal" render buffer.
in the "CCU" sample project, you can see how to access render buffer pixels directly. you can then rasterize text using an os buffer and os api (such as gdiplus or quartz), and then copy the pixels onto the effect buffer. you can also use 3d party libraries to rasterze the text or do some drawing and then copy the pixels over to AE's render buffer.
Copy link to clipboard
Copied
ahaa, ok so drawbot is only for UI. I need to draw text in render buffer. So, is it neccessery to use 3rd party libraries for this, or sdk has a function for this? Thanks!
Copy link to clipboard
Copied
no, the SDK doesn't do that. i personally use gdiplus on windows and quartz on mac, but many develoipers use cairo and qt.
Copy link to clipboard
Copied
Yeah, I was trying to implement external libraries, but without any success. I worked before with raylib library with c++, and I have some familiarity, but when I tried implementing it in example skeleton project, I got a lof of errors which I couldn't fix so I kind of gave up. A simple example of how to implement this would be great. I couldn't find any resource online for this, and chatgpt is pretty useless regarding plugin development... Thanks for your reply!
Copy link to clipboard
Copied
here's a previous discussion here in the forum regarding the same issue. it has some code samples in it, though nothing complete to just copy paste. it does, however, contain a ton if information.
https://community.adobe.com/t5/after-effects-discussions/non-custom-ui-drawing/m-p/4603725