Highlighted

Tracking a Shape

New Here ,
Aug 06, 2020

Copy link to clipboard

Copied

Hi There-

I have a google map that is animated. I want to draw a path with a shape layer on the road that will simulate traffic flow. I'm stuck on how to get that path that I have drawn to track on the map. How can I accomplish this? Is there a way to stick my drawn line (shape) to the map so it tracks with it?

 

Thank you!

TOPICS
How to

Views

46

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Tracking a Shape

New Here ,
Aug 06, 2020

Copy link to clipboard

Copied

Hi There-

I have a google map that is animated. I want to draw a path with a shape layer on the road that will simulate traffic flow. I'm stuck on how to get that path that I have drawn to track on the map. How can I accomplish this? Is there a way to stick my drawn line (shape) to the map so it tracks with it?

 

Thank you!

TOPICS
How to

Views

47

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Aug 06, 2020 0
Adobe Community Professional ,
Aug 06, 2020

Copy link to clipboard

Copied

I am guessing you animated the google map somehow. It would help to know how that was done. If the animated google map is a video then you can either motion stabilize the map so the part with the road doesn't move, then add the path on the road, then add a null and use an expression to tie the position property of the null to the anchor point of the motion stabilized video. Then if you parent both the stabilized video and the path to the null the motion will be put back in the shot and added to the path. I do that kind of stuff all the time.

 

If you just animated screenshots of Google Maps and pre-composed them, then you can. simply put your path in the pre-com.

 

If you used google earth to fly over the map then you use other techniques. Without your workflow details to this point and some more information about how the comp is set up, it is just about impossible to suggest the most efficient workflow. The only thing I am pretty sure of is that Camera Tracking is probably not going to be a tool you would use for this project. 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 06, 2020 0
New Here ,
Aug 06, 2020

Copy link to clipboard

Copied

Here is what the map looks like... https://vimeo.com/445416256/be06f67daa

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 06, 2020 0
Adobe Community Professional ,
Aug 06, 2020

Copy link to clipboard

Copied

I would open the Motion Tracking workspace, go to the first frame, choose "Stabilize Motion" with position rotation and scale, then pick two points on the roadway you want to use for the path. Here are the two points I choose using a copy of your footage. Track and apply.

Screenshot_2020-08-06 21.07.11_0Siyst.png

Then I would return to the comp panel and add two empty shape layers and a null. Rename the footage layer stabilized and then move to the first frame of the comp. At this point, the roadway should not move, but the video will look a little odd.

 

The next step is to add this animation preset to the Null. The preset will tie the position of the null to the anchor point of the stabilized footage, tie an inverse scale of the footage to the null, and reverse the rotation. The position expression is easy, the rotation expression is just a - sign before the rotation value of the stabilized footage layer, the scale expression is a little more complicated. When that is all done and you are at the first frame of the comp parent all 3 layers to the null. Now move to the last frame so you can see the entire shot, draw your path on the layer just above the map that follows your roadway. Name the layer Path. Name the shape layer above Track matte (I forgot) and set it to an Alpha Inverted track matte. Now draw some shape layers over the bridges on the roadway. That's it. Your comp would look something like this:

Screenshot_2020-08-06 21.08.11_3d4iq6.png

Here are the expressions:

 

// for null position
thisComp.layer("stabilized").transform.anchorPoint

// for null scale
x = value[0];
y = value[1];
tx = thisComp.layer("stabilized").transform.scale[0];
ty = thisComp.layer("stabilized").transform.scale[1];
nx = x/tx*x;
ny = y/ty*y;
[nx, ny]

// for null rotation
- thisComp.layer("stabilized").rotation

 

 If the track is good you should not need any keyframes for the track matte or the path. If you can find points on the roadway that needs the path everything should work out just fine. If you have to use other points then you may need a couple of keyframes. It took me about 15 minutes to get this to work.

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 06, 2020 0
New Here ,
Aug 07, 2020

Copy link to clipboard

Copied

You are impressive, my friend. Thank you! I am going to try it and hope I can follow with my marginal AE skills:)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Aug 07, 2020 0