Compositing 3D objects into photographs

Professional arch-viz artist, Indre Kuzminiene, shows how to use 3ds Max and Photoshop to create a 3D object for integrating into a 2D scene...

We are often faced with the task of integrating a 3D object into a photograph. This technique is very often used in architectural visualization for analysis of how a new object is going to blend into the existing environment. It can also be used in video montage when we integrate a 3D object into a real scene that was captured using a static camera (a different technique is used for moving camera though).

For this tutorial we will use 3ds Max and Google Satellite views to create a 3D object and integrate it into a scene.

Detailed analysis of photographs is required to analyze and implement a camera positioning method. There are 2 methods in the 2014 version of 3ds Max.

1. Camera match (existed in previous versions of 3ds Max): This method is more suitable when it is difficult to identify 3 pairs of perpendicular lines corresponding to the XYZ axes and we can at least partially reconstruct the existing situation.

2. Perspective match (new method introduced in 3ds Max 2014). This is more suited to interiors and freestanding buildings when it is easy to distinguish perpendiculars corresponding to the co-ordinate axes.

In this tutorial we are going to explain how to match the camera in photomontage using method 1.

An example of analyzing an interior scene to determine and co-ordinate the axes

Locate the photo-image

If the task is to place the object into a photo of existing landscape satellite imagery, such as Google Maps or Google Earth (higher resolutions), then it is very easy to locate and place existing objects.

Finding an image to place our object in

Scale the image

Satellite images need to be scaled to match the size of the 3D scene. Refer to existing markers and height points
in the scene.

Scaling the photo-image to match the object's scale

Place the CamPoints

Locate the CamPoints on existing objects that are best visible on the satellite image and photograph. The accuracy of the result will depend on the amount of camera points chosen. It is recommended to choose CamPoints on different height levels, too.

Locating the CamPoints on the 2D image/3D image

Camera sensors

A full frame photo is considered to be 24 x 36mm, however most cameras use sensors of smaller sizes. When using such a camera it seems that the camera is zooming in but all it does is crop part of the image as seen here.

Different cameras have different sizes of sensors. For example, Canon's sensor size is 1.6 times smaller than full frame, Nikon and Sony are 1.5 times smaller.

Showing an example of how a camera typically crops an image

Analysis of the EXIF info in the photo

3ds Max is set to work with full frame photos, so when manually setting the camera focal length found in EXIF data, it needs to be multiplied by the crop factor (1.6 or 1.5, depending on the camera model).

Check the focal length and find out the crop factor of the camera model. The time and date when the photo was taken is used for positioning the sun in a 3D scene using the Daylight system. Create a free camera in 3ds Max and enter focal length.

Working out the focal length and crop factor

Matching render settings

The render settings in the dialogue window should be changed to match the proportions of the photograph.

Making sure the render settings match the photograph

Setting the photo background

Set the selected photo as a background using Alt+B. Select Use Files, set Match Rendering Output in the list of settings of Aspect Ratio, and then click Apply to Active View. Click OK.

Setting the photograph as a background to the viewport

The scene so far

At this stage we have a 3D scene containing the existing objects that are set on the corners of visible CamPoints, and a photo on the background of the viewport projection. Now we can move on to the Camera Match dialogue window.

Preparing to move on to the camera match dialog window

Assigning camera positions

There is a list of CamPoints and an Assign Position button in the image below. Select each CamPoint on the list, click Assign Position and try to match its location on the photo as accurately as possible. Do it with every CamPoint.

If you wish 3ds Max to calculate the focal length and create a new camera automatically, just click on Create Camera. It could be that its position won't be entirely correct though. There are 2 ways to correct it by either moving it manually or adding more CamPoints and clicking on Modify Camera.

It is highly recommended that you create a camera yourself, and manually set the focal length. Check the Freexe FOV boc and click on Modify Camera.

Assigning camera positions to the CamPoints in the scene