Skip to main content
marks59391491
Participating Frequently
February 5, 2016
Answered

Convert a shape path to a mask path

  • February 5, 2016
  • 6 replies
  • 205075 views

This is a question which has been asked before, but as far as I can see, hasn't been answered satisfactorily.

So i have a rectangle that I have drawn in a shape layer, and I want to stroke this using the stroke effect, as I need to scale the shape and I've found that the standard stroke within a shape layer scales when you transform the layer

But, with it being a shape path, and a parametric shape path at that, I can't copy/paste that shape as a mask.

At this point, @Todd_Kopriva  

usually pops up to copy/paste the following:



"command for converting a parametric shape layer path to a Bezier path:

You can convert a parametric path to a Bezier path after the parametric path has already been created by context-clicking (right-clicking or Control-clicking on Mac OS) the property group for the parametric path (e.g., Rectangle Path 1) and choosing the Convert To Bezier Path command from the context menu. If the parametric path is animated (keyframed), the converted Bezier path is a static path based on the parametric path at the current time; keyframes are lost."

Which does indeed convert the path, as far as I can see, but unfortunately that does not seem to help me move that path into a mask layers

Any ideas?


PS does anyone else have a really weird issue with this forum where you'll be writing a response and suddenly find your karat/cursor has jumped up a couple of lines and you've type half a response at the end of a previous line?

Correct answer Rick Gerard

I've gone through this dozens of times on this forum. To guarantee success you need to set a keyframe. Here goes:

  1. Select your Shape (Rectangle 1) and right click and select convert to Bezier Path
  2. Open the Rectangle 1 path and set a keyframe
  3. Copy
  4. Select the layer that you want to add a mask to
  5. Choose the pen tool
  6. Click anywhere on the layer to set the first vertex
  7. If you are attempting to put a mask on a shape layer you must reset the Pen Tool to create a mask instead of a new shape before you set the first vertex
  8. Paste

That's it. Works every time. The only problem is that the layer you are adding the mask to must be at the default transformation position and the shape layer you copied from must also be at the default transformations. Do that and everything works every time.

6 replies

BasjanB
Participant
March 27, 2025

You can also just go draw the path you want in Illustrator and copy it from Illustrator directly onto your After Effects layer as a mask.

Participant
January 23, 2020

An easier way may be to use the pick whip. After converting to Bezier Path, Go to Layer > New Mask on the layer where you want your shape mask to go. Then, use the pic whip from this new mask and link it to the path (the converted path) from your shape layer. You don't need to set any key frames. But if you did have an animated shape, it will link to the information too.

Participant
December 15, 2022

I have a question that expands on this one.. i want to have a shape path that has a wiggle on it and transform THAT into a mask on solid. Any ideas? 

MyerPj
Community Expert
Community Expert
October 3, 2018

Necro or not, I followed the instruction from Rick Gerard​ as I often do, and ended up with a rectangle with a stroke effect added and when I use the transform controls of the Shape layer, I can move and resize the rectangle and the mask moves with it and the stroke stays the same width which is what I was expecting.

However, I can't seem to grab any corners of the rectangle and/or mask get the rectangle shape along with the stroke to move together? What part am I missing? Do I then need to only work on the effects controls: IE I can't click and move it around?

tia

Community Expert
October 4, 2018

Try using the pen tool and the Alt/Option and Ctrl/Cmnd key as modifiers. You just have to get the right tool up so you can select one point.

Inspiring
October 3, 2018

I know I'm just reviving a necro post here, but figured I'd post in the hopes of saving some other poor soul from this hassle.

The redefinery scripts have a ShapesToMask script that works like a charm. I'm not going to name names, here, but some people might even say that it handles the conversion exactly the way After Effects should have been doing it for the past, say, decade or so.

The rd: scripts are free for everyone, though they encourage an in-kind donation to charity, if you feel so inclined.

link:

redefinery.com: rd: scripts

trashcaneron
Inspiring
January 9, 2020

Good ProTip but - Used to use this all the time, in CC20 it renames every single mask "Path 1" which isn't great when you have a ton of masks. 

Known Participant
June 1, 2018

What do I right click on in step 1? Cannot find "convert to bezier path"

Participant
July 26, 2018

Your question is answered here

Where is the "Convert To Bezier Path" option?

Rick GerardCommunity ExpertCorrect answer
Community Expert
February 5, 2016

I've gone through this dozens of times on this forum. To guarantee success you need to set a keyframe. Here goes:

  1. Select your Shape (Rectangle 1) and right click and select convert to Bezier Path
  2. Open the Rectangle 1 path and set a keyframe
  3. Copy
  4. Select the layer that you want to add a mask to
  5. Choose the pen tool
  6. Click anywhere on the layer to set the first vertex
  7. If you are attempting to put a mask on a shape layer you must reset the Pen Tool to create a mask instead of a new shape before you set the first vertex
  8. Paste

That's it. Works every time. The only problem is that the layer you are adding the mask to must be at the default transformation position and the shape layer you copied from must also be at the default transformations. Do that and everything works every time.

marks59391491
Participating Frequently
February 5, 2016

YES!

Thankyou this has been driving me mad all afternoon - the keyframe bit is the one missing piece of the puzzle..

However, there is one last thing for me to solve before I have a complete solution to this, and that's that the pasted mask is offset from the original.

I'm pasting within the same shape layer, and trying to figure out why this offset is happening - give it a go with a fresh comp, draw a rectangle, convert the path to a bezier, create a keyframe, copy the keyframe, create a point with the pen tool to create a mask,then ctrl+v to paste it. Weirdly, when I just tried it, the offset was in a different direction/amount to when I was trying to do it in my actual project.

Also, if I create the mask layer and click off it, (ie I pake the maske before I click the keyframe) I find that when I paste the keyframe it creates a new group with the shape, rather than copying the path to the mask. This seems to be the same no matter whether I have the path or the mask component selected.

Community Expert
February 5, 2016

The mask is offset from the original because path are drawn on layers using layer space but pasted using comp space. Select the layer you are coping from and press the U key twice. If any of the Transform properties show up like scale, rotation, position.. then you have to reset them so the layer is centered. Then select the layer you are going to past to and do the same. If everything is at the default position, scale and rotation the paths will match. If they are not then the paths won't. Simple as that.