Camera Calibrator

摄像机矫正

Basic 基础Image 图片Calibrate 校准Settings 设置Links 链接

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

几乎每个3D 艺术家的一个共同任务是将渲染的对象合成为真实世界的场景-静态或动画。这样做的一个主要问题是创建真实世界材质的未知摄像机角度——特别是透视和焦距。这些设置也必须反映在Cinema 4d 摄像机,用于渲染3D 物体。只有这些设置相匹配,3D 物体才能令人信服地组合成真实世界的图像(当然,照明也必须在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.

使用 Camera calibator 标签,你可以加载一张照片/图像(参考图像如下所示) ,并交互式地重建相机的焦距、方向和位置。

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):

为了重建,C4D院需要2个消失点和2个独立的垂直堆叠平面。要定义消失点,必须在图像上绘制平行线(当在透视图中显示时,这些线将创建一个消失点) :

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: fisheye 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:

如果选择了 Camera calibator 标签,将提供以下组合键:

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.

在上图中,平行于 z 轴的线用蓝色箭头标记,平行于 x 轴的线用红色箭头标记。在下面的步骤中,每个轴上至少有2行需要标记。

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

Shift + 单击该行,直到它变成红色(x 轴)。

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.

现在所有相关的相机设置已经明确定义。作为测试,您可以创建一个 Cube 对象并沿着轴移动它。您将看到,根据图像的透视图,立方体遵循直线。

General info and tips

一般信息和提示

Limitations of the vanishing point method

灭点法的局限性