7 Replies Latest reply on Feb 8, 2016 7:36 AM by marks59391491

    Convert a shape path to a mask path

    marks59391491 Level 1

      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?

        • 1. Re: Convert a shape path to a mask path
          Rick Gerard Adobe Community Professional & MVP

          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.

          1 person found this helpful
          • 2. Re: Convert a shape path to a mask path
            marks59391491 Level 1

            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.

            • 3. Re: Convert a shape path to a mask path
              Rick Gerard Adobe Community Professional & MVP

              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.

              • 4. Re: Convert a shape path to a mask path
                marks59391491 Level 1

                Ah yep got it - I think what is possibly confusing is that the origin for a new shape is in the centre of the composition, rather than the centre of the shape, which seems a bit weird..

                 

                Thanks for the help

                • 5. Re: Convert a shape path to a mask path
                  Rick Gerard Adobe Community Professional & MVP

                  You can find everything that is not at the default values by selecting the layer and pressing the U key twice. Rectangle position is an important thing to check.

                  • 6. Re: Convert a shape path to a mask path
                    marks59391491 Level 1

                    Okay, like I say, the anchor point of the shape being at the centre of the comp regardless of where I've drawn the shape is what threw me.

                     

                    Luckily, it seems they've not long implemented a hand way of resetting the anchor point to the centre of a shape:

                     

                    favorite features in CC versions of After Effects: command for moving anchor point to center of content | After Effect…

                    • 7. Re: Convert a shape path to a mask path
                      marks59391491 Level 1

                      Hmmm actually that doesn't really solve what I'm trying to achieve here - If I use the above shortcut to move the origin to the center, the transform of the rectangle is not a 0,0.. This does not make sense to me..

                       

                       

                      So if I want to correct the transform of the path (in my mind, making a path on a shape should by default put it at 0,0 relative to the shape layer's position, I'd be grateful for an explanation of why it works this way), I need to change the transform of the path to 0,0 and then do the opposite transformation to the layer itself in order to move the path back to its original position... ...ugh...