Tip 68: Precise Camera Alignment in 3D Studio Max

Tip 68 Video Shot An interesting use for photogrammetry is determining the location and angles of a camera when a photo was taken and then using that information in 3D rendering and animation software to provide an accurate background image. The 3D software will know where the camera was located and how it was oriented so additional 3D objects can be rendered to match the perspective of the background photo/plate – for mixing animation and rendering with reality.  A common technique these days in movie making.

Most 3D rendering and animation packages render scenes through an ideal camera. An ideal camera has no lens distortion, has square pixels, and has a centered lens axis. Real cameras have none of these ideal characteristics. In order to get a precise alignment of any rendered 3D data with a background image from a real camera, the photograph has to be made ‘ideal’ to match the 3D software’s rendering camera.

This alignment issue can become very obvious when the real camera used to take the background photos has high lens distortion – such as a GoPro. The GoPro images have high lens distortion because of the wide field of view of those cameras. Other cameras and lens can behave similarly.  In fact, every lens has lens distortion and for very precise, pixel-level background alignment, all photos can benefit from this ‘idealization’.  Typical lens distortion is when a straight edge (side of a building) looks curved in a photograph.

PhotoModeler Scanner and Motion have a unique capability of ‘idealizing’ photos for this application.  Useful not only in film and animation but in forensics and design as well. PhotoModeler’s Idealize function removes all lens distortion, pixel unsquareness, and lens decentering effects from the photos in a project.  Curved lines become straight. The camera specs are also idealized so the photogrammetric project is consistent. This idealized data can then be exported in a variety of formats (in the video we use Max Script). When the data is imported into the rendering and animation software, and the view aligned with the imported camera, you can see the precise alignment of the 3D model data and the background plate/image – perfect for analysis or rendering new objects that match the photo’s perspective.

This tip video shows two different projects being exported from PhotoModeler for use in 3D Studio Max. The photos are to be used as background images in Max and hence precise alignment is important. In the case of the second project, a GoPro image shows high distortion and the misalignment in Max until the ‘idealize’ function is used. You will see how PhotoModeler’s Idealize function and export produce a precise camera alignment in 3D Studio Max – precision not possible any other way.

Some additional resources:

Watch the YouTube video for further detail:

Please share!