Camera Calibrator

Thanks to the calibrated camera, squash-playing monsters can be composited convincingly into real-world photos.

A common task for almost every 3D artist is compositing rendered objects into real-world scenes - stills or animations. A major problem when doing this is the unknown camera angle with which the real-world material was created - in particular perspective and focal length. These settings must also be reflected in the Cinema 4D camera that is used to render the 3D objects. Only if these settings match can the 3D objects be composited convincingly into the real-world images (of course the lighting must also be set up correctly in Cinema 4D).

Using the Camera Calibrator tag you can load a photo/image (referred to in the following as, reference image’) and interactively reconstruct the camera's focal length, orientation and position.

Tip:In addition to the objects, the calibrated camera and the light setup in the scene above there is also a Plane used as a floor (for shadow and reflection) and a Background object onto which - in both cases - the reference image is projected using camera mapping.

For the reconstruction, Cinema 4D needs 2 vanishing points and 2 separate, vertically stacked planes. To define vanishing points, parallel lines must be drawn on the image (when displayed in a perspective view, these lines will create a vanishing point):

Parallel lines culminate in an imaginary vanishing point.

This works best when working with images of buildings, city squares or similar elements in which clear, parallel lines that lie perpendicular to each other exist.

If you should determine that straight lines are actually depicted bent (extreme example: fish-eye look), it's most likely due to the fact that the recording camera has a lens distortion applied to it. If the distortion is too strong (either very pronounced or the camera calibration is faulty), you have to create a lens profile using the Lens Distortion tool and load it into this tag.

Tip:This tag assumes control of the corresponding camera settings (coordinates, focal length, etc.). For a camera that has been completely calibrated, these settings can no longer be modified and the focal length cannot be changed.

Interactive Control

If the Camera Calibrator tag is selected, the following key combinations will be made available:

Example of how a camera can be calibrated based on a photo

In the image above, lines parallel to the Z axis are marked with blue arrows and lines parallel to the X axis are marked with red arrows. At least 2 lines from each axis will have to be marked in the following step.

Shift+click on the line until it turns red (X axis).

Tip:You can now click on the Create Background Object button to create a Background object including the texture. You can then render an object in front of the image as a background. For more complex compositions, for example if an animated object should disappear behind another object in the image, a dummy object must be modeled onto which the images is projected from the camera's angle of view (see also Projecting the reference image for rendering).

Now all pertinent camera settings have been clearly defined. As a test you can create a Cube object and move it along the axes. You will see that the cube follows the lines according to the image's perspective.

General info and tips

Limitations of the vanishing point method