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

# Get camera position from image?

Community Beginner ,
Sep 18, 2020 Sep 18, 2020

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

2.6K

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
9 Replies 9
Community Expert ,
Sep 18, 2020 Sep 18, 2020

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:

• 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.

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.

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

Copied

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.

Report

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

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.

Report

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

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.

Report

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

Copied

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

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

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.

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

Copied

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

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

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

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

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.