I took photos of an object with a real camera. I then used computer vision techniques to 3D-reconstruct the object and in the meanwhile estimated the camera pose (locations, pointing direction, etc.). With everything in hand, I imported everything into Blender, and my goal is to reproduce the exact real-world photo with Blender.

There are of course errors in my 3D reconstruction, so by "exact" I mean I shouldn't get "zoomed-in" or "zoomed-out" version of the real image from Blender. Given the fact that the 3D reconstruction of the object is pretty good, I expect to see my 3D model "overlaid" on top of the real object if I align the Blender-output image and my real photo.

During my 3D reconstruction, I set my focal length to 5000, whose actual unit doesn't really matter, as the 3D reconstructed object will just have the same unit.

How should I set my camera parameters, e.g., focal length (how to convert 5000 to Python-Blender's space), sensor size, etc.?

Here is the image whose view (not sure if this is the correct word?) I want to reproduce exactly.

enter image description here

Here is the 3D scene.

Rendering the scene above gives this.

enter image description here

So you see, it's a zoomed version of the real image. This is unsurprising because I don't know how to set the parameters of the camera... Focal length may be easy -- just needs a unit conversion? What about all the other parameters like sensor size, etc.

  • $\begingroup$ Could you please post some screenshots or even blend file to: blend-exchange.giantcowfilms.com ? $\endgroup$
    – cgslav
    Mar 2, 2017 at 10:47
  • $\begingroup$ @LukeD Question updated as suggested. Thanks! $\endgroup$ Mar 2, 2017 at 16:07
  • 1
    $\begingroup$ Focal length and sensor size are literally both settings on the camera. $\endgroup$ Mar 2, 2017 at 18:05
  • $\begingroup$ I've asked something very similar here in the past, so I figured that I would share just in case it's helpful. $\endgroup$
    – Rick Riggs
    Mar 15, 2017 at 21:39

1 Answer 1



Set Focal length to the same value as your actual camera.

5000 sounds way off. Maybe you missed a decimal and it was 50.00?
Most point-and-shoot cameras are between 35 to 50.
Wide angle is lower, 18 - 30. Zoom is 80 - 200.
Just looking at it, I would guess 50.

Scoot your Blender camera to the same distance
from your object as it was in the real world.

After looking at the scene...

File > User Preferences:

Add-ons tab > Import-Export tab

enable Import Images as Planes

N to bring up right-panel

right-click on the 3D Cursor Location
and Reset All to Default Values

Add > Mesh > Images as Planes

select the image you are trying to replicate

then scale it up on the X and Y by 5

go down to the Viewport Shading button
(bottom-center) click Material
so you can see the image.

Be sure to click the Photo-icon
in the top-right panel
so it won't render in your final image.

Click on the Render tab, and under Dimensions,
X: 1800 px
Y: 1000 px

this should give you the proper aspect-ratio
use the Percentage Scale for test renders

select camera, press 0 on your numpad
to go into camera view

set Focal Length to 50

reset camera X rotation to 0
and set Z location to 14

select human.001

X: 1.0
Y: -0.3
Z: 9.0

X: 0
Y: 180
Z: 180

Material > Add
Surface: Toon BSDF
Size: 1
Smooth: 1

Add > Lamp > Sun
Strength 3

X: 5
Y: 5

X: -5
Y: 5

Add > Lamp > Sun
Strength 5

X: -5
Y: 5

X: -5
Y: -5

Click on the light properties

Size: 5
Samples: 8
Max Bounces: 12

Render tab >
Branched Path Tracing - uncheck square
Clamp Direct: 10
Clamp Indirect: 10
Light Sampling: 0.5

AA Samples:
Render: 25
Preview: 0

Glossy: 50
rest of 'em: 1

x Sample All Direct
x Sample All Indirect

Pattern: Correlated Multi Jitter


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.