15 Replies Latest reply on Oct 4, 2014 12:24 AM by Rick Gerard

    Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!

    braxpark Level 1

      I have a video that I want to insert a picture of a lion at one point that does not move from the position (laying on one spot on the ground) even though the rest of the video is moving.  I started a 2nd composition - used the keylight feature to figure out how to get rid of the green screen.  I was able to resize it and place it at the point I want it to appear.  Problem is as the video backs up the lion moves with it and thus off the ground spot it is sitting.

       

      How do I position a stationary object in a video to stay at that point no matter where the angle is?  Is this possible?  I am a newbie and will need as specific instructions as you can give.

       

      Thanks in advance.

       

      Help!!

       

      Allison

        • 1. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
          Rick Gerard Adobe Community Professional & MVP

          You have to track the spot on the video where you want the lion to sit. The kind of tracking you choose depends on the shot. Point tracking or scale and rotation tracking, or Planar tracking with Mocha or Camera Tracking with AE's 3D camera tracker may be the right tool. There's no way to tell without seeing the shot or having a better description of the shot.

           

          Basically what you do is track the spot where the lion sits and then lock the lion to the track. 3D camera tracking tracks the camera movement and allows you to easily insert a 3D layer into the scene and lock it to a position in the shot. If your shot is suitable for this kind of tracking there are lots of tutorials on doing that. If the shot is not suitable for Camera Tracking then just tracking a point (some area of detail in the shot that doesn't change and is big enough to give the tracker something to work with) then you just apply the track to the shot of the lion or apply it to a null and then make the null the parent of the shot of the lion.

           

          Show us a few frames of the shot or describe it better and we can point you in the right direction.

          • 2. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
            braxpark Level 1

            Thanks so much for the quick reply.  It is a shot in a park and I want the lion to sit on the ground.  Maybe I made the lion shot wrong?  I started a composition and inserted a .jpg into it and took out the green screen.  I did the tracking and put the tracking 1 spot on the ground where the lion should sit.  And the lion was the #2 track Does that make sense?  It is not working??  Thanks all help appreciated.  Maybe I did not do the 3D right?

            • 3. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
              Rick Gerard Adobe Community Professional & MVP

              I still don't know anything about your shot. Is it a hand held shot in a park? If you have cut out the lion and the perspective matches the perspective of your background shot then run your track, make sure that it is a good track, then add a null to the composition and set the null as the target of the track. Make sure the null stays put in the scene in relation to the ground. Then position your lion shot, scale and rotate, and set the null as the parent of the lion. Except for color correction and fixing the edges you should be done.

              • 4. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
                braxpark Level 1

                It is a hand held shot from an Iphone.  I am so new I don't know all the terminology.  I will need to look up null.  I really appreciate your help.  Basically it is about a 20 second shot where my child does a magic wand towards the ground, a lion appears and we run.  The video is shot behind him and there is a small brick sidewalk that I want the lion to be on.  But since I hand held the camera it moves around and the camera moves as we run away the lion moves around and does not stay on the brick sidewalk.  I wish I could post a sample here but it wont let me.

                 

                Allison

                • 5. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
                  braxpark Level 1

                  Hello,

                   

                  I did the 3D Tracking and I created a solid and tried to insert my lion picture onto the solid.  It is not working.  What is the difference between create solid and null?  I can see that it will work if I can insert the lion but it shows up as a flat box.

                  • 6. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
                    Rick Gerard Adobe Community Professional & MVP

                    If you successfully inserted a solid into your 3D camera tracking and the solid sticks to the ground then you should be able to turn your image of the lion into a 3D layer and copy and paste the position of the solid to the position of the lion. Note one thing, the anchor point of the lion needs to be where you want the center of rotation for the lion to be. I'd put it at the bottom of the lion and then carefully adjust the position and rotation of the lion. Parenting would also work if you hold down Shift + Cmnd/Ctrl while you select the parent. This will move the child, the lion layer, to the same exact position, rotation and scale as the parent. Again, it is critical when you do 3D camera tracking that the layers you want to move into position are 3D layers.

                    • 7. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
                      braxpark Level 1

                      Thanks!  I got the lion in there and it pretty much is tracking right.  However at one point when my son runs in front of it his head is actually behind the lion.  I a have tried to adjust the layer but sending the main video composition backward does not work.  If I send the lion to the back you can't see it at all.  Any thoughts.  Thanks again.  I hope I learn this well enough to pay it forward to someone someday and help them out.

                       

                      Here is a link.  I uploaded on youtube.  420 3 - YouTube

                      • 8. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
                        ReisomNomad Level 1

                        The motion tracking of the lion works pretty well but I'm not seeing anything where your son runs in front of the lion. I assume you just left that part out of the YouTube clip?

                         

                        The reason it didn't work when you put the lion layer under the main layer is that the program doesn't "see" a boy, grass, and a lion. Just pixels of different colors and luminosities. Think of it as a photograph instead of a video. If you have a photo of your yard and you want to paste a cutout of a lion on top of it, it will work. Paste the entire photo on top of the cutout... and you see the whole picture and nothing of the cut out.

                         

                        Now say you wanted to paste the cutout of the lion into the photo but in the "background" while a boy is in the "foreground." What would you do with the lion cutout? You would further trim the lion down in the shape of the boy's head in the foreground so it appears to be behind him.

                         

                        That's exactly what you need to do with your video. Cut out the shape of your son's head from the lion using a Mask. The only difference is that it is animated instead of a still frame photograph. So this requires that your mask adjusts frame by frame so it only cuts out your son's shape exactly, each frame, to give the illusion that the boy is in the foreground and the lion is in the background.

                         

                        -- Choose the layer with the Lion photo (very important you are on correct layer)

                         

                        -- Use the Pen tool (G key) to create a polygon that covers the area of the lion that is obscuring your son's head. Once closed, the image will default to a cutout of just the area within the polygonal mask.

                         

                        -- If you haven't already, expand the Lion layer by hitting the triangle button. You already see a line that says Tracker, and a new line that says Masks. Expand that line as well.

                         

                        -- You will see a sub line that says Mask 1 along with a drop down box that by default is set to "Add" as well as an unchecked box that says Inverted. You have two choices here, both do the same thing. Either check the "Inverted" box, or click on "Add" and change it to "Subtract."

                         

                        --Either way, it should show the whole lion, minus the part that is supposed to be "covered" by your son's head. But you aren't done yet.

                         

                        -- Further expand Mask 1 and you will see more options. The only one you need to worry about for now is Mask Path.

                         

                        -- Click the Stopwatch button to create a Key Frame. Key Frames are what will allow the mask to animate along with your son's movements.

                         

                        -- Advance the video by one frame. You will see that the boy has moved but the mask has not. But if you click and drag one of the polygonal points from the mask, it will move and alter the shape of the mask. It will also create a new key frame. Be careful just to move one point and not accidentally select and move the entire mask. If you do that just hit Undo and try again. Adjust as many points as necessary to maintain the proper shape of the mask around his head.

                         

                        -- You must continue this process frame by frame for all the frames where you need to mask out part of the lion.

                         

                        -- There may be frames where, due to motion blur, there is not a hard edge of the boy's head to cut the mask on exactly. In this case, try to experiment with Mask Feather to try to blend the edge of the Mask within the motion blur of his head until it looks natural.

                         

                         

                         

                        That should solve your problem.

                        • 9. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
                          braxpark Level 1

                          Thank you.  Yes I did end up cutting out the last two seconds.  This was my first editing I have ever done.  I have never even used photoshop. I spent a lot of time on youtube watching "how to" videos.  So I have a big learning curve.  However, I am going to watch some of the other tutorials and do another mini for my older son.  I will also play around with the Mask for future reference.

                           

                          Thanks!

                           

                          Allison

                          • 10. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
                            Rick Gerard Adobe Community Professional & MVP

                            ReisomNomad gave you some good pointers but my workflow would be a little different, and I think simpler to do. Here it is in a nut shell. You generally want your compositing to follow what would happen in the real world. You want the lion between your actor and the background so that is what you need to do. Until you actor, the boy, moves in front of the lion you can't tell where he is because you are are creating an image on a flat screen. Because you have introduced 3D camera tracking and have made the lion a 3D layer, and done a fairly good job of blending the lion into the scene the biggest challenge is when the actor is blocked by the lion. Think about what the shot would be like if the lion was really in the scene. The actor would be in front of the lion so that's what you want to do in this case. To get the actor in front of the lion you need to remove him from the background. Let me go through the exact steps I would take.

                            1. Move down the timeline until you are 1 frame before the actor goes in front of the lion
                            2. Duplicate your footage layer and set an in point for the top copy
                            3. Move the top copy above the lion layer
                            4. Double click on the top copy of your footage and use the Rotobrush tool to mask out the actor. You only need to create a mask where the boy passes in front of the lion.
                            5. When the roto is complete refine the edges and do what ever is necessary to get the actor to blend in with the lion so it looks real

                            The advantage of doing this is first, you have now arranged the foreground(actor) middle ground (lion) and background of your image in the same way they would be in real life. This makes compositing, adding light wrap, blending or hiding the edges of the foreground and basically everything else easier. Second, you have a perfect visual reference to use to create and refine your matte. Third, you are not wasting any effort masking parts of the shot that are not necessary to complete the effect.

                             

                            Always think in layers.  Always try and imitate real life. Don't spend any time doing hand work on things that you don't have to. I gave a very similar project to a bunch of students and most of them spent about an hour completely cutting out the actor's entire body for the entire length of the shot, one tried to fill in the background, and only 2 of the 24 students masked only the actors upper body and head for the 30 frames where his upper body and head needed to pass in front of the street lamp we added to the scene. Two were done in about 15 minutes. The rest were just getting started.

                            • 11. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
                              braxpark Level 1

                              I don't yet know how to do the most simple things yet - I could not pull out frame by frame in after effects.  I also tried to pull out a section of the video and replace it but I don't really know the basic commands.  You can tell your students that this project took me about 12 hours!  A combo of watching "how to" and inserting the effects one by one.  I am saving your suggestions and I am going to try to learn this at home practicing the steps with some tutorials.  I wish there was a class I could take locally!  Now I have to decide whether I will be able to continue on before my free 30 day trial is up

                               

                              Thanks again - Everyone on here is very helpful!

                              • 12. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
                                Szalam Adobe Community Professional & MVP

                                braxpark wrote:

                                  I wish there was a class I could take locally!

                                There is (sort of)!

                                Getting started with After Effects

                                • 13. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
                                  ReisomNomad Level 1

                                  Ultimately Rick has probably forgotten more about this program than I will ever learn so anything he says is probably correct.

                                   

                                  But just to get you started on the idea of masking layers, watch this quick video on making lightsaber effects. The part that is relevant to this discussion starts at 8:00 minutes in. Granted, it is an older version of AE but I think it still applies. Very easy to do once someone shows you what to click on.

                                   

                                   

                                  I'm not a special effects guy. I'm a cinematographer who sometimes has to dabble in AE for projects I work on. Many times I have used Video Copilot tutorials to help me learn a specific technique I need at that moment (which I quickly forget as I move on to other projects ) Even if it is a tutorial on a guy being blown up by lightning, but I just need the part about replacing the sky, it is helpful.

                                   

                                  (and earlier I wasn't even talking about Photoshop. I was referring to a real photo and scissors in an attempt to make it a more "real world" example. Sorry about any confusion)

                                  • 14. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
                                    ReisomNomad Level 1

                                    Oh my god rotobrush is the bomb.


                                    I had no idea what that even was until reading Rick's suggestion above. My original technique absolutely works but it is the hard way for sure. It is basically doing everything manually. Rotobrush kinda does the same thing but lets the computer do most of the work. And I found a video that shows exactly what you need to do braxpark. You literally do not need to know anything at all about After Effects to accomplish it. Just copy what the video does and you will get there.

                                     

                                    https://www.youtube.com/watch?v=IHz_UvZ5_8g

                                     

                                    Kudos to Rick for the tip. I'm in the middle of my own project that hit a roadblock and I think this will help me get moving again.

                                    • 15. Re: Layering? Tracking?  Not sure how to insert a pic into a video that does not move - help!
                                      Rick Gerard Adobe Community Professional & MVP

                                      I think you'll find the tutorials on Adobe TV much better at giving you a better workflow. The YouTube video ReisomNomad posted has some good points but leaves out some key features that may open you up to some problems.

                                      Start here:

                                      Using the Roto Brush | Learn After Effects CC | Adobe TV