7 Replies Latest reply: Jun 27, 2012 4:01 AM by Adam Scoffield
torinovision Level 1 Level 1 (10 points)

When I apply a mask to an animated layer, is there anyway to keep the mask from moving with the animated layer?


Here's an example... I want the sun to rise over a simulated horizon so I place a rectangular mask on the sun which is slowly climbing into the sky.  My goal is for the mask to stay fixed with the horizon line to create the illusion of the sun rising, however the mask moves with the sun.  The only way I can keep the mask fixed on the horizon line is to use the keyframe record feature and reposition the mask on the horizon line frame by frame to keep it where I want.  This takes forever and there has to be a better solution.  If you know of one, please help.



iMac, Mac OS X (10.7.3)
  • 1. Re: Mask Issue
    Adam Scoffield Level 4 Level 4 (2,865 points)



    you need to construct your project differently.


    Dont mask the sun, mask the horizon.


    To make this work, you might have a background layer, which presumably is the land and sky. You then add a duplicate of this layer, and mask it to only show the land. To the viewer it looks like you only have the land a nd sky picture, but now you really have two layers. Now put your sun image inbetween these two layers. So when you animate the sun it will be hidden by the land only image but beabove the sky image.


    make sense?



  • 2. Re: Mask Issue
    torinovision Level 1 Level 1 (10 points)

    Thanks for the reply Adam.  Your solution for recrating an actual horizon makes perfect sense, however I'm not really trying to make a horizon, it was just an example and I should have been more specific.


    We can still use the horizion as an example, but let's imagine it more abstract.  Let's say I have a 2px wide line stretching across the frame horizontally that represents my horizon.  No body of land to hide the sun behind, just a 2px wide line going all the way across.  Then I have a big circle that represents my sun.  I want the sun to rise out of my 2px wide line.  Since there are no other layers, I want to avoid the sun showing beneath the 2px line so it appears to rise out from above the line.


    I'm not actually trying to pull this off, I just want to know if there's a way to prevent a mask moving with animated layer and I'm using this as an example.

  • 3. Re: Mask Issue
    Adam Scoffield Level 4 Level 4 (2,865 points)

    yes of course its possible. To take your new example: you might have a layer with your sun in it. You'd apply a mask to that layer that hides everything in that layer that corresponds to everytinhg bleow your 2px wide line. As you animate the sun direclty it moves out and away from the mask thus appearing to rise.



  • 4. Re: Mask Issue
    torinovision Level 1 Level 1 (10 points)

    Unfortunately, that's not how it works.  The mask moves with the object it's applied to.  If the object moves, so does the mask.

  • 5. Re: Mask Issue
    Jim Wanamaker Level 4 Level 4 (2,260 points)

    You need to put the sun in a group and then apply the mask to the group not the sun. Just make sure the mask layer is above the sun and in the same group then the mask will not follow the sun.

  • 6. Re: Mask Issue
    torinovision Level 1 Level 1 (10 points)

    Thanks Jim.  This works, but only on 2D groups.  I cannot apply a mask to a 3D group.  If you know a workaround, let me know.

  • 7. Re: Mask Issue
    Adam Scoffield Level 4 Level 4 (2,865 points)



    put the layer you want to mask into a group, make that a 2D group. Mask it how you see fit. Then drop that layer into a 3D group, so you can move it around in 3D space.