18 Replies Latest reply: Sep 27, 2014 12:56 AM by ReisomNomad RSS

    Adding tracker to clone stamp

    RES6377 Community Member

      I'm new at this so please bear with me.

      I have a short clip a model with moles and blemishes

      on her face, which need to be removed.

      She is chewing and moving out of frame.

      The blemishes are moving up and down and to the left.

      I can brush out the blemishes in the first frame, but

      of course the cloned areas remain stationary.

      I can get a good tracker on the moles.

      Is there any simple way to add a tracker to a clone stamp?

        • 1. Re: Adding tracker to clone stamp
          Todd_Kopriva Adobe Employee

          See this video for an explanation of how to attach trackng data to a Clone Stamp stroke:

          https://www.video2brain.com/en/videos-1503.htm

           

          For simple blemishes, blurring often works well. See this video for a way that you can attach a blur (or other effect) to tracking data:

          https://www.video2brain.com/en/videos-1458.htm

          • 2. Re: Adding tracker to clone stamp
            RES6377 Community Member

            Thanks Todd!

            • 3. Re: Adding tracker to clone stamp
              JSS1138 CommunityMVP

              I'm curious how I would go about achieving this if the motion tracking point is nowhere near the Clone Stamp's source or target points.  Anyone have a clue?

              • 4. Re: Adding tracker to clone stamp
                Fuzzy Barsik Community Member

                You can exploit expressions to shift a Clone position.

                Moreover, you can track an area in Mocha, paste tracking data to a Null, parent Clone Scale to the Null Scale, Clone Rotation to the Null Rotation and adjust Clone position with something like the following:

                 

                deltaX = 329 - 312.1;

                deltaY = 830 - 787.5;

                x = thisComp.layer("Overexposed Area Master Control").position[0];

                y = thisComp.layer("Overexposed Area Master Control").position[1];

                [x-deltaX, y-deltaY];

                 

                where "Overexposed Area Master Control" is the name of the Null.

                • 5. Re: Adding tracker to clone stamp
                  JSS1138 CommunityMVP

                  Holy crap, there's no easier way to track the source and target of a Clone Stamp?

                  • 6. Re: Adding tracker to clone stamp
                    Fuzzy Barsik Community Member

                    Not sure I follow you...

                    • 7. Re: Adding tracker to clone stamp
                      JSS1138 CommunityMVP

                      This is tough to explain.

                       

                      There are some rock chucks on a flat-bed trailer the client wants removed from the shot.  Working from the first frame of the shot, I can easily remove the rocks using the Clone Stamp tool.  However, as the camera moves, the area I'm copying pixels from (Source), and the area I'm pasting them into (Target) also move within the frame.  I need to track that.

                       

                      Todd's method seems to apply the absolute position keyframes to the Clone Stamp, but that doesn't work as the tracked point is no where near the pixels I'm using for the Stamp.  What I need is the relative positional changes learned from tracking applied to the both the Source and Target of the Clone Stamp.  For example, if the second frame has the tracked point move 3 pixels up and 2 over, then I need the Stamp to move 3 up and 2 over, relative to their original positions on the first frame.

                       

                      I hope that makes sense.

                      • 8. Re: Adding tracker to clone stamp
                        Rick Gerard CommunityMVP

                        What I would try is stabilizing the shot by tracking one of the rocks on the bed so that the shot doesn't move very much. Then, while the shot is not moving around much, clone out the rocks. Once you're done, put the motion back in the shot. I've done this kind of thing many times and the procedure is sound. You may have to make the composition bigger to keep things in the active frame, but it can all be put back later.

                         

                        If I saw your shot I could tell you if this technique will work.

                        • 9. Re: Adding tracker to clone stamp
                          Fuzzy Barsik Community Member

                          Have a look at this shaky 30 second underwater shot with a lot of overexposed spots:

                           

                          First I tracked the footage in Mocha and applied tracking data to the Null.

                          Then I Clone Stamped overexposed spot in the first frame, keyframed Clone Time Shift so that it refers to the 1st frame troughout the whole composition, found appropriate delta between Clone and Null positions and applied the expressions above:

                          AE. Attaching Cone Stamp.jpg

                          Now Clone Stamp is properly following the overexposed spot, rotating and warping.

                          • 10. Re: Adding tracker to clone stamp
                            JSS1138 CommunityMVP

                            First...

                            Then...

                            Now...

                             

                            Like I said before...Holy crap, there's no easier way to apply tracking changes to the source and target of a Clone Stamp?

                            • 11. Re: Adding tracker to clone stamp
                              JSS1138 CommunityMVP
                              If I saw your sho

                               

                              First frame.

                               

                              Rigging Plank.Still001.png

                               

                               

                              Last frame.

                               

                              Rigging Plank.Still002.png

                               

                               

                              I need to apply the relative changes from the tracking data to the clones, not the absolute positions.

                              • 12. Re: Adding tracker to clone stamp
                                Fuzzy Barsik Community Member

                                Like I said: I do not understand what exactly causes difficulties to you.

                                • 13. Re: Adding tracker to clone stamp
                                  JSS1138 CommunityMVP

                                  Mocha, Nulls and scripts.

                                   

                                  I was looking for a way to do this using Close Stamp and Tracker alone.

                                  • 14. Re: Adding tracker to clone stamp
                                    Fuzzy Barsik Community Member

                                    It's up to you whether to accept a hand.

                                    • 15. Re: Adding tracker to clone stamp
                                      JSS1138 CommunityMVP

                                      Very true.

                                       

                                      We ended up going a different way.  The client wanted a title on this section as well, so we just used that to cover the rocks.

                                       

                                      Thanks for your insight.

                                      • 16. Re: Adding tracker to clone stamp
                                        4EYES Community Member

                                        How did you come up with the values for deltaX and deltaY?

                                        • 17. Re: Re: Adding tracker to clone stamp
                                          ReisomNomad Community Member

                                          Like I said: I do not understand what exactly causes difficulties to you.

                                          The difficulty is that while I have absolutely no doubt your answer is correct, to someone like me it sounds like gobbledygook. I feel like if I had the proficiency in AE to understand what that means I wouldn't be needing to come to a forum for the answer in the first place. It seems perfectly reasonable to expect that one could A)motion track a shot, B) attach tracking data to clone stamp, C) clone stamp moves according to motion track. And that should be it. I don't see why "nulls" and "deltas" and whatnot expressions have to do with it.

                                           

                                          If I motion track the shot and attach text to it, the text just moves with the track. Why should the clone stamp be any different?

                                           

                                          Just to be clear, your assistance is appreciated. But it seems your post is written with the assumption that any reader immediately understands the jargon.

                                          • 18. Re: Adding tracker to clone stamp
                                            ReisomNomad Community Member

                                            I have spent two days trying to find a solution to this exact same problem.

                                             

                                            What I did:

                                             

                                            1) I used the Clone Stamp tool to paint over the spot on the wall I wanted to remove.

                                             

                                            2) picked a more easily discernible point of reference for Tracking. In my case, I used a poster on the wall.

                                             

                                            3) As per the instructions here, https://www.video2brain.com/en/lessons/removing-an-object-with-clone-stamp, I pasted the Attach Point data from the Tracker into Clone -> Transform - > Position 

                                             

                                            However, that didn't work for me as the object I was painting was not the object I was tracking. The solution from the video was simply moving my cloned spot to the tracked object instead of leaving it where I wanted it. So...

                                             

                                            4)  I then manually adjusted the Anchor Point of the Clone back to the original spot I wanted to cover.

                                             

                                            I played footage and the cloned region successfully moved with the spot I was covering.

                                             

                                             

                                             

                                             

                                            This is what I was able to figure out. I'm not an advanced user. I only use After Effects every couple of months when I need to fix minor things in footage, so I've only learned to use what techniques I need for the job at hand. No doubt, experienced users may shake their heads at my simplistic fix. I'm sure my technique would be wholly inadequate for situations far more complex than fixing spots on a gray wall, which is why my eyeballs cross when reading suggestions that seem way more involved than one would expect for something as seemingly minor as this. It's just a spot! It should be super easy to remove, right? Well, that's what I was looking for and that's what I came up with. I hope it helps.