Cinema 4D: Camera Calibration

In this Cinema 4D physical camera workshop, we will look at what we can do with a calibration result once we have calibrated the position and focal length of a camera.

So we create a camera, give it the calibration tag and start adding lines and grids as needed until the attribute manager says we have a solid “Solve”.

Im Falle dieses Fotos konnte ich einen guten Solve und genaue Brennweite mit den folgenden Linien erhalten …
In the case of this photo, I was able to get a good solve and accurate focal length with the following lines…

And now comes the fun part! I use a plane object first. And because I placed a pin in the corner of the steps, Cinema 4D inserts this plane right here. Then I press “C” to turn the parametric plane into a polygon object and activate the Edge mode to start working.

To get started properly, we just need to move the two left edges into the right position to hit the edges. Simply select the edges and drag them to fit – or use the coordinate manager here, as the red and blue axes sit directly on the world zero point – set the Z and X axes to zero and they will snap to the correct position. And that’s exactly why we set the pin so precisely in the previous workshop.

(1) Now we can pull the right edge over to finish off the top of the step. (2) Then we can also select the long front edge and, holding down the Ctrl key, drag the Y-axis down to create the polygon for the front of the step.

The problem now is that the geometry is covering the background image. This is where the camera projection mapping is perfect to let us see both. Go to the Attribute Manager, select the calibration tag on the camera and click on the “Create Camera Mapping” button under the tab. This will create a new material tag that is set up to map a camera projection of that image to the geometry. Simply drag the new tag onto the stage we have created. Now we can see the image above the polygons.

Step by step ..

Now we can continue with the modelling of the steps – and this only takes a few steps on the staircase. To start trimming – and to create an edge at the correct length of the step – we drag the axis we created earlier onto the step while holding down the Ctrl key. This is how Cinema 4D creates a copy. We follow the shape of the steps up to the top edge.

To make it easier for us, we deactivate the camera so we can actually see the results of the camera mapping. However, it is very important not to move the calibrated camera.

Disabling the camera makes it much easier to see what you’re doing. It means that I can zoom into an area, and because of the way the camera projection works, I can (1) move the geometry and the projected image doesn’t move – and that makes it really easy to align edges with the image. (2) It also makes it easy to see any mistakes made during modelling with the camera active. Because we want to move the camera away from its calibrated position, we need to model the background so that we get some parallax to maintain a bit of realism. This can be achieved fairly easily by using a layer positioned at the base of the first step to represent the ground, stretching an edge (then re-activating the camera) until the flat ground meets a point in the image, and then dragging the Ctrl key up and out of the shot. It looks quite strange when the camera is not active – we can only see it properly when the camera is active.

Once you’re done, it should look something like this …

This brings us back to the cover picture with the ducks. We now not only have shadow-catching geometry, but also geometric objects to hide other objects – like in a photo.

Auto-Animate!

But there’s another cool trick we can use our scene for. We can animate the camera – and let the camera morph tag do all the work. Here’s how: In the Object Manager, create one (1) copy of the camera you used for the calibration and delete the calibration tag. Make a (2) copy of this new camera and group under a zero point. Then right-click on the first camera copy and select the (3) camera morph tag from the motion camera tag menu.

Make a copy of the camera, group it under a zero, activate it and navigate into the image. Rotate and move it a little, but be sure to stay within the image.

Dupliziere die Kamera, aktiviere sie erneut und bewege sie leicht, wobei du darauf achten musst, dass das Bild im Bild bleibt.

The object manager should look like this.

So sollte der Objektmanager nun aussehen.

Select the Camera Morph tag, then change the source mode from “Simple Morph” to “Multi Morph” in the Attribute Manager (under the “Tag” tab). We then drag one camera after the other from the grouped zero tag into the list field. Make sure that the same order applies as in the zero point, as this is the order of the animation.

Now, to actually see the animation, set the project frame length to about 200 frames. Very important: make sure that the frame scrubber is on frame 001. Now we click on the small circle next to “Blend” in the Camera Morphs Attribute Manager (while making sure that Blend is set to 0%, of course) to create a keyframe. Now move the frame scrubber to the last frame, move the blend to 100% and create another keyframe.

All that’s left to do is sit back, enjoy what a great VFX guru we are and apply for jobs in Hollywood.