Create Masks from Edges

What type of scripts do you need?

Moderator: byronnash

Post Reply
Jonas
Posts: 10
Joined: August 12th, 2008, 11:40 am

Here's a challenge (I think)!

Is it even possible to have AE create animated masks that are generated by visible edges?

I'll try to clarify. I'm using the Reshape effect in AE to warp certain elements in a shot to new positions. Reshape uses two masks and animates the shape of the pixels within them from mask A to mask B. Basically, I have to roto every element I want to shift.

I have Mocha and would like to let it do most of the roto work for me. The problem is, Mocha won't export animated masks to AE, just black & white mattes but I need animated masks to use with Reshape.

...So, can you write a script that would "see" the black & white edges of a matte and create an animated mask shape that follows it?

Either way, thanks for reading!

Chris
hype
Posts: 94
Joined: November 27th, 2006, 11:08 pm
Location: Los Angeles, CA
Contact:

use AutoTrace on the mattes, then use the masks it generates for your Reshape. If you haven't used AutoTrace, check it out in the manual. Its pretty cool.
if it's not fun, what's the point?
http://www.mackdadd.com
Jonas
Posts: 10
Joined: August 12th, 2008, 11:40 am

Aaaahhhhh! Never played with that. Thanks for the pointer. I will become the AutoTrace expert!

Thanks!

Chris
Jonas
Posts: 10
Joined: August 12th, 2008, 11:40 am

Autotrace works great! Now I have one other challenge that I'm not sure is solveable. For my effect, I need to duplicate the Mask that autotrace created and shift it to the left or right a few pixels. I've highlited all Mask Shape keyframes and moved the mask but it only moves it on the current keyframe.

Can a script be created to offset a mask that has keyframes on every frame?

Thanks, Chris
hype
Posts: 94
Joined: November 27th, 2006, 11:08 pm
Location: Los Angeles, CA
Contact:

this is actually a feature I'd love to see implemented into TrackerViz!

you could move the mask onto a solid and use that solid as a track matte. then simply nudge the solid a couple pixels in whatever direction you want.
if it's not fun, what's the point?
http://www.mackdadd.com
Jonas
Posts: 10
Joined: August 12th, 2008, 11:40 am

That would work except I'm using the two masks with the "Reshape Effect". Both masks must reside on the layer you're warping. I'm faking 3D (3D Glasses effect) with old 2D footage. Duplicating a shot & Warping certian elements to the left or right to create the other eye's view. It works, it's just very tedious!

C
Post Reply