I have a camera sensor and have done the calibration to acquire the intrinsic. Now I want to re-produce the calibration images in blender, and hopefully the rendered images can perfectly align with the captured ones. How can I set the measured radial and tangent distortions to the blender camera if I have K1, K2, K3, P1, P2?

I can add distortion via the lens distortion node, but there's only 1 number to set, and doesn't support tangential distortion (I guess?).


1 Answer 1


You can't set tangential distortion ($p1$,$p2$) through the interface. Only radial ($k1$,$k2$,$k3$)

To set camera intrinsics load a video file or image generated with the known camera and lens in the Movie Clip editor

Int the Track tab you will find the camera and lens settings. Set Lens size in mm or pixels, Image center, sensor size and distortion coefficients.

enter image description here

Then use the compositor use a Distort-> movie distortion node. Set it to use the distortion information from the clip loaded in the movie clip editor.

There are two modes on the movie distortion node: distort or undistort. So you can choose to undistort the video or images from the camera, or distort the images generated on blender's camera to match those of the real camera.

enter image description here

Note that there is also a lens distortion node in the compositor, but that is meant more for "artistic" purpose and has no way to set precise camera intrinsics.

I'm not aware of any built in way to distort the camera directly in the 3D environment and the viewport, only the rendered pixels of the image can be distorted as far as I know.

Note also that a lot of 2D software that deals with lens distortion uses the maximum dimension of the image to convert pixel coordinates to normalized ones, and blender uses normalized image coordinates (aka measured in -1 .. 1 space, not in pixel space)


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .