Skip to main content
Known Participant
July 11, 2023
Question

Turn a keyed out object into a regular mask.

  • July 11, 2023
  • 1 reply
  • 2871 views

Hello to all of the nice fellows of this community, i’m trying to figure out whether it’s possible to automatically turn a keyed out object into a regular mask with all of the properties of a regular mask and the mask path for the keyed out object in ” after effects”.

 

Because, for example even when I save my keyed out object without background as “rgb+afpha” and when importing it back to “after effects” and adding the mask, the mask covers the whole composition size and not the keyed object, even though there is no background under that object. 

 

I’ve been searching for this for a long time, but unfortunately was not able to find any answers whether it’s possible or not, nor any plug-ins that would specifically serve that function of automatically turning a keyed out object into a regular mask.

 

Please if you have any idea how it can be done, please share, since unfortunately I have no clue =(

This topic has been closed for replies.

1 reply

Community Expert
July 11, 2023

If you create a high-quality key or matte, you can have a lot more subtlety than you can ever achieve with a mask. Fine details like hair blowing in the wind are impossible to preserve with the Mask tool in After Effects. 

 

If you have source footage with an Alpha Chanel, you can use Set Matte or Track Matte to create transparency on other layers. If you are only trying to create transparency, there is no need for a mask.

 

If you want to create a mask to use as a control for an effect like Stroke or Video Copilot's Saber plugin, then the best option would be to use the Alpha Channel on the layer and run Layer/Autotrace and adjust the settings to get the cleanest mask you can get. 

Known Participant
July 12, 2023

Hi, so I would rather want to have some of my objects in the form of mask mainly due to the “mask path” properties ( to be able to copy the mask to the other layers, and to be able to attach other objects to the mask )

 

For example: I have a blue hat upon my actor, and I want to attach some design to this hat, or stick some other object to it.  Normally I could trace the mask around that hat and then stick the object or the design to it with the mask path. But here I realize that the hat is blue and can be keyed-“masked by its color”, so I remove the blue color with the “keylight”, then I use “fill effect” to turn everything that surrounds the counter of the hat into green, then export it as normal mp4 vid, and import it back, then I eliminate the green color that surrounds the counter of the hat that now is not transparent after importing it back as mp4 file.

Thereby now I have a clear counter of the hat without background. If only I was able to turn it into a regular mask, I would copy the mask and apply it to my original footage, thus having the mask counter following the hat with the mask path I would be able to attach other objects or designs to the masked area making it follow the mask path.

Community Expert
July 12, 2023

You can use a keyed layer as a track matte—no need for the mask. You can motion-track any surface using Mocha AE and stick any graphic to that surface. Mocha Pro and LockDown even allow you to track surfaces and mesh warp layers to those surfaces so that Logos look like they are part of a wrinkled shirt or that they bend around someone's arm like a tattoo. 

 

I think you are way overcomplicating your workflow. I do this kind of thing all the time. If you need a vector path, the track matte layer can be used to generate a very clean mask or vector path that can be used for that purpose. I also do that all the time. 

 

If you want to cut out another layer with a keyed layer, then a track matte or the Set Matte effect is the most efficient way to do that. If you want to generate a mask from a keyed layer, use AutoTrace/Alpha Channel and adjust the settings so you don't end up with a bunch of masks, then use those masks for motion paths or effects that use paths. If you have a surface that you want to key and need to capture the motion, ensure there is sufficient detail in the Surface and use Mocha AE to track the surface. You can just position data if you choose Translation in Mocha AE or add rotation, scale, shear, and perspective. If you need to attach something to a curved or changing surface, like an actor's shirt, or to put a tattoo on an actor's arm, use Lockdown or invest in Mocha Pro. 

 

Just replacing an animated character's blue hat with another layer doesn't require a mask, but if the hat is moving, it requires position data from the had that you can get from Mocha AE or maybe even from the Hat layer's position property. 

 

Attaching layers to a mask requires using the Create Nulls from Paths/Nulls follow Points script, then picking the nulls you want to use or averaging the position of multiple nulls. A path around a character's hat could have a couple of dozen points, and your comp could get very complicated very quickly.  

 

If you can post a screenshot of the specific timeline you are having problems with and precisely explain the design goals, we can probably help you simplify your workflow.