8 Replies Latest reply on Jun 21, 2010 6:34 AM by TomBradyRules

    Help With Mask Keyframes

    R-Cole Level 1

      I am working on a comp (footage recorded 720PN to P2 Card in AE CS4) in which a woman is walking across a room carrying a case. I want the room to be black and white and her and the case to be color. So I start with 2 copies of the same clip; the bottom one has the saturation adjusted for B&W, and the top one has a mask to keep the subjects in color. I am going frame by frame and adjusting the shape using the little blocks (vertex?) to outline the parts I want to be in color. I should also state that this clip is playing at half the speed it was recorded for slow mo.

       

      My problem is that I went through 20 or 25 frames making the adjustments to the roughly 40 vertex markers per frame that are drawing the outline and I went back to preview it and some of the vertex have moved from their original position.

       

      What am I doing that would cause a keyframe that was already drawn out to move? I have even corrected them, moved on, then gone back and some have moved a second time. Are the vertex somehow reacting to what I do in future frames?

       

      Also, did I do this the hard way by duplicating the number of frames by playing at 50% speed before masking? Should I have masked at normal speed and applied the same time adjustment after?

       

      And what is this method called so I can do a proper search in the future?


      Thanks for any help. Let me know if I missed any vital details.

       

      Cole

        • 1. Re: Help With Mask Keyframes
          Todd_Kopriva Level 8

          What you're describing is called 'rotoscoping'.

           

          Here's a page with some tips and links to tutorials and additional information about rotoscoping:

          "Rotoscoping introduction and resources"

           

          Regarding movement of mask vertices: Mask shapes, like other properties are interpolated between keyframes. Could it be that this is what you're seeing?

           

          I recommend checking out the rotoscoping tutorials on the page that I linked to, especially the ones from Sean Kennedy.

          1 person found this helpful
          • 2. Re: Help With Mask Keyframes
            DerekTS89

            You need to rotoscope each object that you want a different color and then once you have them cut out put the generate Fill effect on each object so you can change them to whichever colors you like.

            • 3. Re: Help With Mask Keyframes
              R-Cole Level 1

              Todd- Thanks for the reply. I will check out that page for sure.

               

              Derek. I am only designating one mask on my top clip (the woman is carrying the case) and there is no color change since I want the masked objects to be in color. The bottom clip was shot in color but the saturation is at -100% for the B&W. My issue isn't really with colors though. The little blocks that you mark to designate the mask shape keep moving. For example I outlined my subject from frames 3 through 27. Before beginning frame 28 I went back and looked and some of the blocks have moved. So I put them in the correct position to outline my subject again and continue on frames 28 through 54. I go back and some of the blocks have moved again. Mind you it isn't many (no more than 5 or 6 per frame) and it isn't every frame. I am trying to understand why previous frames have blocks that are moving when I am not even on that frame. It seems as though adjusting some of the later frames are effecting the previous frames.

               

              I am still curious if I should have done the mask to the clip in real time and then added the slow motion.

               

              Thanks again for the input.


              Cole

              • 4. Re: Help With Mask Keyframes
                TimeRemapper Level 4

                Hi Cole,

                 

                As Todd mentioned earlier, this may be "interpolation" that you're seeing. Did you set a keyframe for the mask shape (the mask shape includes the position of all the verticies in the mask) on every frame between frames 3 and 27, or did you say, set one on frame 3, another on frame 4, and then one on frame 8. If you didn't set a key on every frame, then AE will interpolate the change between the two keyframes and move the verticies automatically based on the two keys surrounding the un-keyed time (note that there are ways to change the keyframe interpolation). Another thing that may have happened if the above is not the case, is, if you're not careful when selecting and moving your verticies, you may inadvertently select an edge (the line connecting the two verticies) and move it instead of an individual vertex. If you do move the edge, it will move both verticies that are associated with it. Making sure you select the vertex and not the edge can sometimes be tricky, depending on the quality of your eyesight and the zoom factor of the window. I find that changing the mask color to one that stands out strongly helps roto work in general.

                • 5. Re: Help With Mask Keyframes
                  R-Cole Level 1

                  Hi TIme,

                  I am setting keyframes on every frame. Since I cut the running time in half using slow motion every frame is duplicated. So I place the vertex markers to outline my subject which seta a keyframe, I page down to advance a frame and it is a duplicate of the last so I click the keyframe button to mark the mask in that position. I page down again and the frame shifts, I readjust all of my 40 vertex markers which sets its own keyframe, page down click the keyframe button for that duplicate frame and so on and so on. Every frame has the markers in the right spot. I will continue on for several frames and when I go to review the frames I have already done some of the vertex markers have shifted.

                   

                  I have since given up on outlining the woman and have decided to just outline the logo on her case which is a basic rectangle. I now only have to adjsut four vertex markers per frame. It is doing it with this mask as well. I just went to review the clip and the top right vertex marker is still there but the line goes straight from the top left to the bottom right making a triangle where there was a rectangle. The vertex that belongs in the top right of the rectangle has relocated itself to the middle of the line between top left and bottom right.

                   

                  As for moving the edges I have done that on occasion but on purpose. When I have finished a particular frame and moved on there shouldn't be any reason that those vertex markers should move, right? The movement is happening after I finish a frame and move on the another.

                   

                  Thanks again for all of your help. I will keep trying and hopefully get what I need.

                   

                  Cole

                  • 6. Re: Help With Mask Keyframes
                    R-Cole Level 1

                    I think I may have figured out what is happening. Tell me if this sounds right.

                     

                    Say the first frame requires 4 points to create a square mask. The next frame the image moves but a four point mask is no longer specific enough so I add 4 more. I adjust these 8 points for a few frames and now it is ok to get away with 4, so I delete the 4 needed to make it a square again. But now the frames prior to this only show 4 points instead of 8 so they are no longer accurate?

                     

                    Does the number of vertex have to remain consistent throughout the entire clip? It seems a pain to move around 20 points when 5 will do. Would splitting the clip at the poionts when I need to lose or add points solve any of this or do I jsut suck it up and move the extra points?

                     

                    Thanks,
                    Cole

                    • 7. Re: Help With Mask Keyframes
                      Todd_Kopriva Level 8

                      When rotoscoping, you really want to keep the number of vertices for a given mask constant. If an object changes shape or is complex, consider using multiple simple masks. For example, have one for the forearm, one for the upper arm, et cetera when rotoscoping a person. That way, you don't have to animate the shape of each mask much beyond scale and rotation and position. These tips are in the resources that I point to here.

                       

                      I also very strongly recommend Pete O'Connell's DVD on this subject.

                       

                      BTW, the Roto Brush tool was created to make a lot of this moot.

                      1 person found this helpful
                      • 8. Re: Help With Mask Keyframes
                        TomBradyRules Level 1

                        you have to click the stop watch next to the "mask shape" for that layer. Also, they might have shifted because you accidentally clicked on the screen and moved the entire mask. If you do that, and just move the mask into position THAT way, it will move all of the other frames the same amount, so be sure to just move it vertex be vertex. otherwise it's shifting the masks entire anchor position on the screen.