ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Overlaying an image exactly on top of identical image

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Guy Manzur
Overlaying an image exactly on top of identical image
on Dec 12, 2016 at 3:11:07 pm

Hi
I'm trying to do the following - I have a static image that appears in video clip, and I also have that image as a separate independent file.
(For example - a video of a kitchen with a specific cup, and I have that exact cup in an image file).
The camera in the video is STILL, and it's a 2D animation.
I want to be able to place the image EXACLTY on top of the identical image that appears on the video (but again - the object in the video is STILL through the entire time).
I need to do it multiple times, so doing it manually is not an option.

Is there any way I can use to track motion or something like that, to make it easier?
I've tried doing the following:
Let's call the video Layer 1, and the image file Layer 2.
I've put both in a comp, and used track motion for 1 frame, to identify the offset (which was random) between Layer 2 and it's appearance in the video in Layer 1.
It does find this offest (position and scale), but I do not know how to "reverse" it in order to place Layer 2 exactly on top of that object in Layer 1.

Any ideas?

Thank you


Return to posts index

Dave LaRonde
Re: Overlaying an image exactly on top of identical image
on Dec 12, 2016 at 5:35:18 pm

[Guy Manzur] "I need to do it multiple times, so doing it manually is not an option."

I'm afraid you'll HAVE to make it an option. This is all manual placement. There's nothing in common between the still image and the animation that can help.
Sure, they look the same, but AE doesn't know that.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Guy Manzur
Re: Overlaying an image exactly on top of identical image
on Dec 12, 2016 at 6:57:40 pm

I am sure we can take advantage of the fact AE knows to search for a specific point when using "track motion".
I already was able to track the movement between the image that's in the video to the independent image file that I randomally placed on screen.
I just don't know how to inverse that movement onto layer 2, in order to position it on top of the video.

Do you get my point?


Return to posts index


Dave LaRonde
Re: Overlaying an image exactly on top of identical image
on Dec 12, 2016 at 7:03:31 pm

Sorry, I'm confused. Why are you tracking anything? I thought this was a static shot, and things in the shot are moving.

You place your images in the shot once and you're done, correct?

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Guy Manzur
Re: Overlaying an image exactly on top of identical image
on Dec 12, 2016 at 8:00:51 pm

I meant tracking the offset between the first layer and the second layer.
I've recorded an example:






You can see I found the movement between the first layer and second one, and I know we can somehow use this movement as an offset/difference in order to move the second layer back onto the first layer.

Makes sense?


Return to posts index

Dave LaRonde
Re: Overlaying an image exactly on top of identical image
on Dec 12, 2016 at 11:37:09 pm

I fail to see why you think tracking is going to help you.

You wrote the following: "I want to be able to place the image EXACTLY on top of the identical image that appears on the video (but again - the object in the video is STILL through the entire time)."

This is manual placement, pure and simple. No tracking data will make it easier.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index


Guy Manzur
Re: Overlaying an image exactly on top of identical image
on Dec 12, 2016 at 11:41:56 pm

Dave, did you watch the demo?
Manual placement is never 100% exact.
The tracking data will help me calculate the exact offset between the layers (which is a "1 frame movement").
Using this offset I can calculate what's the exact distance and scale between the layers.
I just need to know how to use this info in a reversed manner.
If this still isn't clear, then I'm not sure how else to explain it :(


Return to posts index

Dave LaRonde
Re: Overlaying an image exactly on top of identical image
on Dec 12, 2016 at 11:49:54 pm

[Guy Manzur] "Manual placement is never 100% exact."

Baloney. I can match up two exact images in less than a minute. Get your chops up to speed.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Dave LaRonde
Re: Or you can do this
on Dec 13, 2016 at 1:05:23 am
Last Edited By Dave LaRonde on Dec 13, 2016 at 1:08:51 am

Since that recording looks like it's from an Illustrator document imported ito AE, just do it in Illustrator.

Duplicate the objects in question. Don't move them. Place them on their own Illustrator layer. Boom. Done.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index


Guy Manzur
Re: Or you can do this
on Dec 13, 2016 at 7:31:32 am

No Dave, this was just an example.
On the real issue, I have an animated video and I want to overlay identical objects from AE on top of it.


Return to posts index

Tero Ahlfors
Re: Or you can do this
on Dec 13, 2016 at 9:13:36 am

Put the top layer on difference blending mode and change the position/scale/whatever until you get a black image. When it's black there's no difference between the layers.


Return to posts index

Guy Manzur
Re: Or you can do this
on Dec 13, 2016 at 9:16:52 am

It's never perfectly black, it can take about 3-5 minutes to achieve 95% match, and if I need to do it 10 times for a project - that's a lot of time.
I'll see what I can do with the motion track..


Return to posts index


Guy Manzur
Re: Or you can do this
on Dec 13, 2016 at 3:18:09 pm

As I thought, it is indeed possible using motion tracking.
I figured it out with a quick, precise and easy method.
Here it is:






Return to posts index

Blaise Douros
Re: Overlaying an image exactly on top of identical image
on Dec 13, 2016 at 12:18:44 am

Dave is terse, but correct. There is NO solution that allows AE to automagically identify an image as being similar or identical to an onscreen object, and correcting the position, scaling, etc to match. That's a job for advanced computer vision and machine learning specialists working with huge supercomputers on custom software, and After Effects just can't do it.

So, as Dave says, either prepare to do some manual work (and get used to it, there's a lot of that in this business!) or perhaps if you can explain what exactly you're trying to accomplish, we can find a better way to help you.

Personally, I don't really understand why you're trying to replace a still object with a 2D image of the same still object.


Return to posts index

Roei Tzoref
Re: Overlaying an image exactly on top of identical image
on Dec 13, 2016 at 9:21:29 am

maybe this same thread topic in Adobe forums will give the contributes more information as to what Op is trying to accomplish:
https://forums.adobe.com/message/9188303

Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index


Dave LaRonde
Re: Overlaying an image exactly on top of identical image
on Dec 13, 2016 at 3:33:11 pm

Thanks for the link, Roei. Now I understand. The OP is in denial that an automated solution does not exist, and that further advice against what he believes to be true is fruitless. I no longer have to waste my time.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Guy Manzur
Re: Overlaying an image exactly on top of identical image
on Dec 13, 2016 at 3:48:32 pm

I wonder if you saw the youtube link I just uploaded minutes ago, proving my theory was correct :)


Return to posts index

Daniel Waldron
Re: Overlaying an image exactly on top of identical image
on Dec 13, 2016 at 3:21:04 pm

Sorry, but I'm also a little confused on this whole problem. Why do you need to place the exact copy of a still image on top of the animated one. Could you not simply freeze frame the animation where you need to?

Unfortunately I don't think the motion tracker is designed to work the way you are attempting to use it.


Return to posts index

Guy Manzur
Re: Overlaying an image exactly on top of identical image
on Dec 13, 2016 at 3:24:06 pm

I need the oposite - I want to place an animated object on top of a static object that appears in a video.
Anyway, I don't think it really really matters why it's needed.

As you can see above, I just replied with a link to a video of the solution, which I figured out myself, using the motion track.






Return to posts index

Daniel Waldron
Re: Overlaying an image exactly on top of identical image
on Dec 13, 2016 at 3:50:54 pm

I see. Very interesting. Glad it worked for you!


Return to posts index

Roei Tzoref
Re: Overlaying an image exactly on top of identical image
on Dec 15, 2016 at 10:12:01 am

[Guy Manzur] "As you can see above, I just replied with a link to a video of the solution, which I figured out myself, using the motion track."

thanks for hanging in there and now I see what you mean: by placing the two identical images side by side in a precomp and tracking it, you fool the tracker to think it has shifted and it moves the attach point to the new place. then you can use this information to a null

it looks you can spend about 2 minutes in this method of placing one image over the other including all the setup required. ... how long would it take you to do this manually? taking the image you want to place, setting it's anchor point to on of the eyes, placing it on top of the other one and scaling it back using opacity or difference mode - a close competition I Imagine.

Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index

Guy Manzur
Re: Overlaying an image exactly on top of identical image
on Dec 15, 2016 at 10:14:54 am

It would've take about the same time to achieve 95% match, not 100% like in this method :)


Return to posts index

Roei Tzoref
Re: Overlaying an image exactly on top of identical image
on Dec 15, 2016 at 10:57:42 am

o.k since you are the one doing this all the time, you know best what works for your needs. glad it worked out, and guess we all learned something. I would also update the Adobe forums thread and post the YouTube link in a response and mark it as a correct answer, maybe this could be useful for other users too.

Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index

Darby Edelen
Re: Overlaying an image exactly on top of identical image
on Dec 20, 2016 at 10:02:09 pm

Have you checked it using the difference blend mode? I doubt it's 100%. Maybe better than 95% but given the nature of sub-pixel interpolation I dare say it's nearly impossible to have a 100% match using a corner pin.

Darby Edelen


Return to posts index

Roei Tzoref
Re: Overlaying an image exactly on top of identical image
on Dec 21, 2016 at 5:01:49 am

Op argues that through his creative method he can get 100% accuracy and faster than manually placing it through the use of difference. He uses regular transform tracking to fool Ae that the image as shifted in order to apply the data to a null and attach the new image so it will be placed exactly over the original. This is demonstrated in the video. Pretty cool but I think the difference method is faster for me. Maybe a competition is in order :)

Roei Tzoref
After Effects Artist & Instructor
♫ Ae Blues Tutorials


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]