Unlimited WordPress themes, graphics, videos & courses! Unlimited asset downloads! From $16.50/m
  1. 3D & Motion Graphics
  2. 3D Studio Max

3D Camera Tracking in 3ds Max Using After Effects



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.

1. Project Setting

Step 1

Open After Effects.

Open After EffectsOpen After EffectsOpen After Effects
Open After Effects

Step 2

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 SettingsComposition SettingsComposition Settings
Composition Settings

Step 3

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  FileFile  Import  FileFile  Import  File
File > Import > File

Step 4

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 FootageInterpret FootageInterpret Footage
Interpret Footage

Step 5

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

Image sequenceImage sequenceImage sequence
Image sequence

2. Camera Tracking in After Effects

Step 1

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

Animation  Track CameraAnimation  Track CameraAnimation  Track Camera
Animation > Track Camera

Step 2

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

3D camera tracker3D camera tracker3D camera tracker
3D camera tracker

Step 3

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 Tracker effect. 

3D Camera Tracker3D Camera Tracker3D Camera Tracker
3D Camera Tracker

Step 4

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 planenull3D planenull3D planenull
3D plane/null

Step 5

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

Create Null and CameraCreate Null and CameraCreate Null and Camera
Create Null and Camera

Step 6

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 cameraYou get a null object and 3D cameraYou get a null object and 3D camera
You get a null object and 3D camera

3. Exporting Camera Data to 3ds Max

Step 1

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 the Script folder of After Effects.


Step 2

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_ExportjsxFile  Script  AE3D_ExportjsxFile  Script  AE3D_Exportjsx
File > Script > AE3D_Export.jsx

Step 3

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

camera trackermscamera trackermscamera trackerms
camera tracker.ms

4. Creating Scene in 3ds Max

Step 1

Open 3ds Max.

Open 3ds MaxOpen 3ds MaxOpen 3ds Max
Open 3ds Max

Step 2

Go to MAXScript > Run Script.

MAXScript  Run ScriptMAXScript  Run ScriptMAXScript  Run Script
MAXScript > Run Script

Step 3

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

camera trackmscamera trackmscamera trackms
camera track.ms

Step 4

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

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

Step 5

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

Camera viewCamera viewCamera view
Camera view

Step 6

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

Coordinate of cameraCoordinate of cameraCoordinate of camera
Coordinate of camera

Step 7

With the camera and dummy selected, group them together.

Camera and dummyCamera and dummyCamera and dummy
Camera and dummy

Step 8

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 toolRotate toolRotate tool
Rotate tool

Step 9

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

Adjust the dummy Adjust the dummy Adjust the dummy
Adjust the dummy 

Step 10

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

Viewport ConfigurationViewport ConfigurationViewport Configuration
Viewport Configuration

Step 11

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


Step 12

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

Alternatively, you can press Shift-F keys.

Show Safe FrameShow Safe FrameShow Safe Frame
Show Safe Frame

Step 13

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 Object3D Object3D Object
3D Object

Step 14

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 cameraAdjust the dummy and cameraAdjust the dummy and camera
Adjust the dummy and camera

Step 15

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

Matte ShadowMatte ShadowMatte Shadow
Matte Shadow

Step 16

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

Skylight Skylight Skylight

Step 17

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

Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.