Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Mathematical relationship between Motion parameters for two images.

Engaged ,
Jan 10, 2025 Jan 10, 2025

An artist friend has painted a scene that I want to use in my next audio-visual. It has several layers in Photoshop, and was painted so that I can move and scale the objects on the different layers to suit my needs.

 

I have imported the image into Premiere as a layered PSD, put those layers on separate Premiere layers, and away I go. I can make this person larger or smaller (closer or more distant), put that vehicle over there and so on, but I also want to pan and zoom. However, if I pan away from a person, I want that person to appear as if they were locked to the underlying background.

 

Let me put some numbers to this problem.

 

Background Layer

The background comes in as 5171 x 2909 pixels, but is used in a 1080P timeline. It fills the screen if Motion has these settings (960, 540, 37.2): 1080/2909 = 37.2. I want to pan and zoom the background to (1736, 104, 67.2). I've panned left and zoomed in.

 

Aunt Leila Layer

I've placed Aunt Leila above the background at (904, 324, 100). The artist painted her small, but I want to make her larger and put her closer to the camera. She's in the foreground now.

 

Question

How do I transform Aunt Leila's parameters, so that she stays in the same relative position on the background when I zoom and pan? To use numbers again:

 

When background goes from (960, 540, 37.2) to (1736, 104, 67.2)

I want Aunt Leila to go from (904, 324, 100) to (X, Y, S).

 

How do I calculate X, Y and S?

I think S is easy to calculate: 67.2/37.2 x 100 = 180.6. But X and Y?

TOPICS
Editing
2.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Engaged , Jan 14, 2025 Jan 14, 2025

Thanks for all the input, everyone. Looks like that Vector Motion thing is the way to go, but I haven't got that.

 

I have solved the problem though, with help from people here and on the Physics forum. In case anyone ever comes this way looking for the maths behind this stuff, here are my notes.

 

To re-align an image with itself when the Anchor Point is changed
Let the original location be at (PX1, PY1, S, R, AX1, PY1)
New location is at (PX2, PY2, S, R, AX2, PY2)

 

To re-align the image, set these va

...
Translate

correct answers 1 Pinned Reply

Adobe Employee , Jan 10, 2025 Jan 10, 2025

Hi @Guy Burns,

Thanks for the question. I hope someone in the community can assist you with this calculation.

 

As for me, it is a little difficult to follow your workflow in order to give you exactly what you need. Can you provide some screen shots?

 

Do you have After Effects? If you want better and more realistic camera moves, I would attempt this kind of stuff there as you have the ability to use the 3D camera and tracking tools.

 

I wish you luck in completing this project.

 

Thanks,
Kevin

 

Translate
Adobe Employee ,
Jan 10, 2025 Jan 10, 2025

Hi @Guy Burns,

Thanks for the question. I hope someone in the community can assist you with this calculation.

 

As for me, it is a little difficult to follow your workflow in order to give you exactly what you need. Can you provide some screen shots?

 

Do you have After Effects? If you want better and more realistic camera moves, I would attempt this kind of stuff there as you have the ability to use the 3D camera and tracking tools.

 

I wish you luck in completing this project.

 

Thanks,
Kevin

 

Kevin Monahan - Sr. Community & Engagement Strategist – Pro Video and Audio
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 12, 2025 Jan 12, 2025

I think this problem cannot be solved with the info I have provided. Anchor points have to be specified, both for the background and Aunt Leila, specifically the location of her foot on the ground so she stays in place. I've done it manually, but it was time consuming because there's a second person that I also want to remain in place relative to the background. And I haven't been able to do that yet.

 

I'll take this problem to the Physics Forum, in case I ever have to do it again. I'll be asking (with a lot more explanation than what follows):  given an image in the Program Window that has six parameters (Position X, Position Y, Scale Rotation, Anchor X, Anchor Y), and I then change the Anchor Point, what values of Position X and Position Y do I have to enter so the image in the Program Window appears unchanged?

 

If I receive an answer, I'll post the equation here.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 12, 2025 Jan 12, 2025

As Kevin said, After Effects would be the logical place for this project.

As for moving things 'locked to the background', it would be to have those elements in a nested sequence and you can move all the tracks together.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2025 Jan 12, 2025

I will also add, that anchor points move ... bizarrely ... if you touch them after doing other movement of the image.

 

So if you need to move an anchor point, do it before doing anything else. If you need to then move it again, nest the clip, then move the anchor point, then do additional image movement.

 

But better yet is Ae for this.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 12, 2025 Jan 12, 2025

I agree with that "bizarrely" statement about Anchor Points. They went stupid on one occasion, positive, negative, all over the place when I moved them by dragging.

 

Thinking about this problem a lot more, I think transforming the background while trying to keep Aunt Leila and Gil fixed on the ground, would have to be manually constructed with multiple keyframes. One person at a time can be done by two keyframes at the start and end of the transformation, but not both persons at the same time, with just two keyframes each. I may have to put up with some "jitter" in one of them, as it quickly moves off-frame during the tranformation.

 

But I still want to know the mathematics behind some of this. Here is my post in the Physics forum, about the mathematical aspects of re-aligning an image when the Anchor Point is changed. It's probably a very simple equation, but I can't work it out.

 

Why all this?

The attached show what this is all about. Move 1 is the original painting.

It will appear on screen first up as Move 2 (Aunt Leila's farm).

Young Gil, in 1964, turns up on his bike (Move 3)…

   sees Fred trying to get his car started (Move 4)…

      and then kicking his car when it won't start (Move 5).

 

A true story. And I want to bring it to life as a small part of an AV about old Freddie, who was a local identity here in Devonport, Tas.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 12, 2025 Jan 12, 2025

Essentially, the image moves in relation to the anchor point. There's kind of an opposite thing that occurs. I know some Ae wizards for whom this is "obvious" ... but I'm not that person ... lol.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 13, 2025 Jan 13, 2025

It’s much easier to handle this kind of workflow in After Effects since it lets you adjust scale in both percentages and pixels. But if you’d rather stick with Premiere Pro, you can achieve a similar result by working with layers in a single graphic, like you would in Photoshop, instead of managing multiple tracks.

Here’s a simple way to do it:

  1. Open your sequence in the Timeline.
  2. Go to Graphics and Titles > New Layer > Rectangle to create a new layer.
  3. Select the clip in the Timeline, then go to Window > Properties.
  4. Drag your Photoshop layers from the Project panel into the Properties panel (and delete the rectangle shape layer).
  5. In the Effect Controls panel:
    • You can adjust the position and scale of each individual layer.
    • Or use Vector Motion to adjust the position and scale of all the layers at once.
  6. If needed, group multiple layers together to make changes to the entire group in one go.

If you want to dive deeper, this video is a good introduction to animating with graphic layers in Premiere Pro: Animate Stunning Graphics Using Only Premiere Pro

 

Screenshot 2025-01-13 at 9.43.28 AM.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 14, 2025 Jan 14, 2025
LATEST

Thanks for all the input, everyone. Looks like that Vector Motion thing is the way to go, but I haven't got that.

 

I have solved the problem though, with help from people here and on the Physics forum. In case anyone ever comes this way looking for the maths behind this stuff, here are my notes.

 

To re-align an image with itself when the Anchor Point is changed
Let the original location be at (PX1, PY1, S, R, AX1, PY1)
New location is at (PX2, PY2, S, R, AX2, PY2)

 

To re-align the image, set these values:
     PX2 = PX1 + (AX2 - AX1) • S/100
     PY2 = PY1 + (AY2 - AY1) • S/100

 

To align two images so that they move together under Motion
Call the images Background and Fred. Background is going to zoom and pan. Fred, a layer that has the same dimensions as Background, has been scaled and moved, and is going to be anchored to Background during transformations. Both images need to have their Anchor Point set at a common point. For example, if Fred’s foot is touching the ground, the point of contact with the ground will be the common Anchor Point. Call this point Foot for both Background and Fred.

 

1. Select Background in the timeline and click on Effect Controls > Motion. A bullseye will appear in the centre of the screen.
2. Note the Anchor parameters (AX1, AY1)
3. Adjust the Anchor parameters to move Foot to the Bullseye.
4. Note the new Anchor parameters (AX2, AY2)
5. Re-align Background by entering new Position parameters:
     PX2 = PX1 + (AX2 - AX1) • S/100
     PY2 = PY1 + (AY2 - AY1) • S/100
6. For the layer Fred, click on Motion to set up the bullseye.
7. Adjust the Anchor parameters to move Foot to the Bullseye.
8. Set the Position parameters for Fred to the same as those for Background.

 

Background and Fred should now be aligned, anchored to Fred’s foot.

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