Skip to main content
MikoDust
Inspiring
December 24, 2015
Answered

How to draw simple forms in PF_EFFECTWORLD / PF_LAYERDEF

  • December 24, 2015
  • 2 replies
  • 1141 views

Hi, AE community!

Maybe my question is a little bit strange, but I'll try

Is there (in SDK) a methods to create visual forms like circle or oval, line, maybe something like a point with color and feather?

What I want to get:

Read data (color, position) from source layer/composition and create small forms with the same brightness and the same position in new world, then blend it with output.

Available solutions I see:

1. Using suites, like a

Suites.FillMatteSuite2()->fill()

      with a circle form in arguments. Fill() receive a PF_Rect, I know, but maybe it have a similar solution not declared in SDK_Guide?

2. Using DrawBot with arcs or similar paths with fill.

    I found different practices in examples "ColorGrid" and "CCU", but using DrawBot confuses me, because in my project used flag PF_OutFlag_NON_PARAM_VARY and I must call Render function every time to calculate particles position and move them. With DrawBot (as I understand from Guide) I must use DrawBot only in Draw Event. Or maybe this is whole wrong way and DrawBot don't created for tasks like my.

3. Using iterate suites.

    In example projects I found complex loops with iterate input world and draw pixels in special for circle area (If I understood it). In other words, I can create array with (special for my task) pixel coordinate system, create points for particles in this array, then loop over this array and move to the same in output world. Ok, if this right way, then I must use math for calculate ovals, or circles, then calculate feathers or aliasing for this forms. The problem clearly requires computing power

Maybe all this solutions is wrong and I can use another way to solve my task? Maybe there are some functions to draw different forms and I missed them in SDK Guide? I'm afraid to reinvent a wheel, because so far obtained only square

Anyway, thanks for any advise or way to solve my problem!

This topic has been closed for replies.
Correct answer MikoDust

Well, I found answers on my questions. If anyone does need my help, please, write them in this thread.

2 replies

Inspiring
March 28, 2016

You'll need to write your own routines for drawing shapes in a PF_EffectWorld. Drawbot is only for custom UI.

That said, you don't need to use OpenGL; I have used a combination of my own math routines for simple stuff, and OS-specific calls (to GDI+ on Windows and Quartz on Mac) to draw nicer anti-aliased shapes. The latter is a bit trickier to set up, but if you search back through the archives on here you should find some of my posts on the subject!

MikoDust
MikoDustAuthor
Inspiring
April 3, 2016

Christian Lett, thank you for the solution and explanation! I found way with crossplatform C++ library Cairo. Anyway, I'll necessarily find your posts!

With warm,
Mike.

MikoDust
MikoDustAuthor
Inspiring
January 5, 2016

Ok.

Finally I got some answers from Google and books.

First and second ways to solve my task are wrong. I need OpenGL (because at this moment I don't know how to draw without this library in AE SDK with C++) and should draw with iterations in EffectWorld.

I will keep reporting from the scene for such a noobs like me

MikoDust
MikoDustAuthorCorrect answer
Inspiring
February 22, 2016

Well, I found answers on my questions. If anyone does need my help, please, write them in this thread.