3D Camera Tracking in 3ds Max Using After Effects

Follow by Email
Facebook
Facebook
Google+
Google+
http://graphic-world.co/3dgwg/learning/3d-camera-tracking-in-3ds-max-using-after-effects/
RSS
Youtube
Youtube
Pinterest
Pinterest
LinkedIn
INSTAGRAM
SHARE

Although the most popular pipeline to track a live action scene is to work in a dedicated 3d tracking system like Boujou, PF Track, Syntheyes and then export the camera to 3d application.

Not everyone, however, can afford these costly 3d tracking systems. For those, who have limited resources, they still can track the scene in After Effects and then export the tracking data to 3d application.

In this tutorial, I will show how to track a live action scene in After Effects and then exporting the camera data to 3ds Max.

Open After Effects.

Open After Effects
Open After Effects

Go to Composition > New Composition to make a new composition.

Alternatively, you can press Ctrl-N keys. It opens the Composition Settings window.

Set the Width and Height values to 1280 and 720 respectively.

Set the Frame Rate to 25 and Duration to 12 seconds. Click on OK.

Composition Settings
Composition Settings

Go to File > Import > File to import the image sequence. Alternatively, you can press Ctrl-I keys. With the first image of the image sequence selected, turn on JPEG Sequence option. Click on Open.

File  Import  File
File > Import > File

With the image sequence selected in the Project window, press Alt-Ctrl-G keys to open the Interpret Footage window. In the Interpret Footage window, set the frame rate to 25 and click on OK.

Interpret Footage
Interpret Footage

With the image sequence selected, drag and drop it inside the composition. You can see the footage in the comp view.

Image sequence
Image sequence

With the image sequence layer selected, go to Animation > Track Camera.

Animation  Track Camera
Animation > Track Camera

The 3D camera tracker system starts analysing the footage. It analyses the footage in two steps.

3D camera tracker
3D camera tracker

After a couple of seconds, the analyse process ends. Now you can see several track points in the scene.

If the track points are too tiny, you can increase the value of Track Point Size in the 3D Camera Trackereffect.

3D Camera Tracker
3D Camera Tracker

These track points would help to generate the dummy 3D plane/null and the camera. You need to select at least four points to generate the helping dummy or layer.

Select several track points on the ground as shown in the following image.

3D planenull
3D plane/null

With the points selected, secondary-click the mouse and select Create Null and Camera.

Create Null and Camera
Create Null and Camera

You get a null object and 3D camera in the timeline. This null object is the placeholder and sticks with the footage and follows the camera.

You get a null object and 3D camera
You get a null object and 3D camera

Go to www.aenhancer.com and you will find that they have released a free script AE3D for After Effects. You can download the script from there.

Alternatively, the script has been supplied with the tutorial also. Just copy the script and paste it in theScript folder of After Effects.

AE3D
AE3D

Restart After Effects. Open the same composition again.

With the null object and 3d camera layers selected, go to File > Script > AE3D_Export.jsx.

File  Script  AE3D_Exportjsx
File > Script > AE3D_Export.jsx

In the AE3D window, select the 3ds Max option, set the file name to camera tracker.ms and then click onExport. It saves the 3ds max script file on the desktop.

camera trackerms
camera tracker.ms

Open 3ds Max.

Open 3ds Max
Open 3ds Max

Go to MAXScript > Run Script.

MAXScript  Run Script
MAXScript > Run Script

Here select the camera track.ms script which was exported from After Effects. Click on Open.

camera trackms
camera track.ms

You get a 3d camera and one dummy in the scene.

3d camera and one dummy
3d camera and one dummy

In the perspective view, press C key for the camera view.

Camera view
Camera view

Right now the camera is upside down. You need to correct the coordinate of camera.

Coordinate of camera
Coordinate of camera

With the camera and dummy selected, group them together.

Camera and dummy
Camera and dummy

After grouping, jump in the left viewport. Select the Rotate tool and rotate it to the right side. Your goal should be to put the dummy on the grid line.

Rotate tool
Rotate tool

Adjust the dummy a little bit more to make it straight.

Adjust the dummy
Adjust the dummy 

Jump in the camera view. Press Alt-B keys to open the Viewport Configuration window. Turn on Use Filesand Animate Background options. Click on Files.

Viewport Configuration
Viewport Configuration

Select the image, turn on Sequence option and click on Open.

Sequence
Sequence

Turn on the Show Safe Frame option in the camera view.

Alternatively, you can press Shift-F keys.

Show Safe Frame
Show Safe Frame

You can now make any 3d model and put it on the grid around the dummy. In my case, I have made a barrel model which I have imported into the scene.

3D Object
3D Object

At this stage, if you render the complete scene and play the video, you’ll notice sliding problem in the 3d object.

To overcome this problem, drag the grouped dummy and camera a bit down. You should put the dummy at half of the black grid line.

Adjust the dummy and camera
Adjust the dummy and camera

Put a plane beneath the 3d barrel. Apply Matte Shadow on to the plane.

Matte Shadow
Matte Shadow

Apply a Skylight in the scene. Turn on Cast Shadow option.

Skylight
Skylight 
Advertisement

Render the frame and you will see the 3d barrel is perfectly merged with the scene. You can now render the whole sequence and when you play the video you will see the 3d barrel is perfectly matching with the live scene.

Rendered frame
Rendered frame

3D camera tracking system in After Effects is a great feature for 3D tracking. When it is combined with 3D application, it gives awesome results. I would try to bring some more interested tutorials based on 3D camera tracking.

Comments

comments

Follow by Email
Facebook
Facebook
Google+
Google+
http://graphic-world.co/3dgwg/learning/3d-camera-tracking-in-3ds-max-using-after-effects/
RSS
Youtube
Youtube
Pinterest
Pinterest
LinkedIn
INSTAGRAM
SHARE