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

Get camera position from image?

Community Beginner ,
Sep 18, 2020 Sep 18, 2020

Copy link to clipboard

Copied

Can you get a camera position from the perspective of a still image in After Effects? I know you can track the camera motion in video clips , but it doesn't work for images or footage shot on a tripod (where there are no camera movements).

 

I know that one could use the corner pin effect and pin whatever you like on a wall for instance according to the perspective. That is not what I'm after here. I want to get a camera position or a 3D plane from the perspective of the still image/video. Do anyone know how to achieve that?

 

Thanks

TOPICS
FAQ , How to , Performance

Views

3.3K

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
community guidelines
Community Expert ,
Sep 18, 2020 Sep 18, 2020

Copy link to clipboard

Copied

You cannot get the camera position, focal length, and angle, but you can make a very good educated guess. Perspective is controlled by position, framing is controlled by focal length. Here is the workflow:

  • Lock your footage.
  • Add a comp sized solid with grid applied
  • Set the anchor point at the top of the frame (snapping helps)
  • Duplicate the solid 3 times and move the anchor point to the left, right, and bottom of the solid
  • Make the layers 3D then rotate each layer in X or Y + or - 90º to create a box with grid lines
  • Scale the layers in X or Y until you get a nice long box
  • Add a 2 node camera
  • Press aa and set a keyframe for zoom (to make it easy to find
  • Press alt/option + p to set a keyframe for position
  • Press U to reveal camera position and zoom
  • Adjust the Y and Z values of the camera to set the tilt angle of the camera so that the geometry in the scene starts to line up with the reference grid
  • Adjust the Zoom value so you can see the edges of the grid layers at the edge of the frame
  • Keep fiddling until the perspective looks pretty close

 

If the geometry in the scene is at an angle you may need to also adjust the X position of the camera. If there is little or no geometry in the scene then it becomes a lot harder to make an educated guess of the camera position and zoom value. This shot is fairly easy to figure out. You can test the shot by adding a small 3D layer to the scene and moving it along the Z-axis. 

Screenshot_2020-09-18 16.29.27_Rj1e3N.png

There is no software that I am aware of that can guess the camera position because you would need to know the position and rotation of the geometry in the scene to make it work. The camera tracker works because it identifies surfaces and calculates the perspective change. 

Votes

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
community guidelines
Community Beginner ,
Sep 19, 2020 Sep 19, 2020

Copy link to clipboard

Copied

Hey Rick. Thanks for your reply.
I tried your way and it seems to a bit time-consuming and hard to get a precise perspective. I was look for a more sleek and faster way. The shot that I'm working with has a perspective that is hard to recreate. For example, I would like to make a 3D plane underneath the feet in this shot. Ignore the grid since its the corner pin effect and is not in a 3D space.


pic2.jpg

Votes

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
community guidelines
LEGEND ,
Sep 18, 2020 Sep 18, 2020

Copy link to clipboard

Copied

You can do it in Cinema 4D, but (as Rick says), I don't know of a way to do it in After Effects. 

You can do some stuff with the Vanishing Point feature in Photoshop, but it might not be helpful here. Knowing what, exactly, you're trying to do would be helpful.

Votes

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
community guidelines
Explorer ,
Nov 21, 2020 Nov 21, 2020

Copy link to clipboard

Copied

Szalam would you be kind enough to elaborate on how to do this in Cinema 4D? I think you are talking about the Camera Calibration tag. I see lots of youtube videos about it online but can't find the actual feature in C4D Lite even though it's mentioned in the C4D help files. 😞

I've been trying to just get my C4D camera to match my overhead tripod shot all day. 😞

Being able to calibrate the camera in C4D from a still then import it back into AE would be great.

Votes

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
community guidelines
LEGEND ,
Nov 22, 2020 Nov 22, 2020

Copy link to clipboard

Copied

This feature is present in full versions of Cinema 4D and is not in Cinema 4D Lite.

Votes

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
community guidelines
Community Expert ,
Sep 19, 2020 Sep 19, 2020

Copy link to clipboard

Copied

Working with that image is going to be pretty easy. I downloaded it, used Change Color to hide the grid you made to make it easier to see what I was doing, then added a solid + Grid, made it a 3D layer, rotated the layer -90º in X, added a camera with a 35 mm lens because the shot looks a little wider than a normal lens, then used the Camera tool (c) to get close, adjusted the position and zoom value of the camera, and was lined up in about 3 minutes. When you have a flat surface like that with parallel sides it is pretty easy to line things up.  I'm not going to post the screen capture video on YouTube, but you can watch it on Dropbox. I apologize for the low audio.

Votes

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
community guidelines
Community Expert ,
Sep 19, 2020 Sep 19, 2020

Copy link to clipboard

Copied

Use your screenshot and this Project will show you what I've got. 

Votes

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
community guidelines
Community Beginner ,
Apr 09, 2024 Apr 09, 2024

Copy link to clipboard

Copied

Hi Konstantin. This is a really good question that I stumbled upon by myself. Corner Pinning is not the solution to what we both need. do you have found a solution? they are trying for years to get a good perspective tool into psd (vanishing point filter is a good step, but pain in the a...s to handle and does no work with smart objects...= in illustrator some MODEL Effectmachinery appeared lately --- but it´s not what we both need in AE) greetings

Votes

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
community guidelines
Community Beginner ,
Apr 09, 2024 Apr 09, 2024

Copy link to clipboard

Copied

LATEST

By the way. I´ve tricked the camera tracking tool with a somehow strange method.

  • precombined my still image into a 10 sec comp
  • added some soft effect layer with noise above it
  • let the tracking tool run on that "still movie comp"
  • got my 3D-Layer Data from that

It´s not perfectly aligned, but it works with a little tweaking. There´s another way I have in mind to trick that machinery... but maybe someone has found some better way already?!!! You can track the still image with that Tracker 4 point Perspective tool and give it over to a Null - 3D Object that will parent your other 3d layer.

Votes

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
community guidelines