ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Access Mask Interpolation in script ?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Steve Sierra
Access Mask Interpolation in script ?
on Apr 7, 2017 at 8:24:56 pm


Is it possible to access, change the settings and apply the built in" Mask Interpolation" on a mask via script ?

Thanks !;)

Return to posts index

Dan Ebberts
Re: Access Mask Interpolation in script ?
on Apr 8, 2017 at 12:05:12 am

As far as I know, there's no way to do that with scripting.


Return to posts index

Steve Sierra
Re: Access Mask Interpolation in script ?
on Apr 8, 2017 at 12:50:30 pm

Thank you Dan !
I'll have to do it by hand, unless I can find a way to imitate it...

Let's say we have a mask interpolating between two different keyframes A and B.

here's what I'm thinking :

first :
- if both keyframes don't have the same number of verticies, add verticies where needed.
- if it isn't possible, use (A+ 1 frame) as (A) or (B- 1 frame) as (B)

then :
- set keys at every frame
- gather vertices order and position info at every frame
- compare every vertice's x and y position compared to the previous and next vertex at frames A and B (verticies V1-V2-V3)
- if the verticies are in the same x and y "order"(xV1A&& xV1B&& yV1A&& yV1B - if they are end up at B in another order in one dimension only (x or y), let them interpolate normally
- if they are in another order in both dimensions, have them change orders at the same time (middle of interpolation ?) and at a certain distance from one another (in the same order as when at A)

I can think of one or two complications... like how to manage the multiple roles of every vertice, beeing himself, the next's previous and the previouse's next at the same time.
What do you think ?
I think I can manage the beginning, but I still haven't figured out how to do the last part.
Thanks in advance for any help 😉


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved