Wednesday, November 6, 2019

Understanding 3D Camera Tracking: Part 6

Understanding 3D Camera Tracking: Part 6

Preview

1. Tracking Footage in SynthEyes

Preview

Step 1

Open the SynthEyes software.

Open the SynthEyes
Open the SynthEyes 

Step 2

Before tracking the footage, you'll need to set the preference. Since, you will work in Maya later so the preferences must be set according to Maya

Go to Edit > Edit Preferences.

Edit Edit Preferences
Edit > Edit Preferences

Step 3

Set the Axis as Y Up (Maya), Default Export Type as Maya ASCII Scene, Maya Axis Ordering as XYZ and then click on OK.

Preference
Preference 

Step 4

To load the footage to track, click on Open File icon. Alternatively, press Ctrl-O keys.

Open File icon
Open File icon

Step 5

This opens a browser window. Navigate to the location where you have saved the files. The footage is in an image sequence, so select the first file and then click on Open.

Browser window
Browser window

Step 6

This opens the Image Settings window. Here you set frame rate of the footage, pixel aspect ratio and lens settings. I have set the Frame Rate to 24 fps.

Image Settings window
Image Settings window

Step 7

SynthEyes loads the footage in its timeline. There are several white plus signs on the table in the scene. These act as good tracking markers.

Timeline
Timeline

Step 8

Press Auto button to start the automated tracking process.

Auto button
Auto button

Step 9

The software starts tracking the scene. You can see the process as shown in the following image.

The software starts tracking
The software starts tracking

Step 10

Syntheyes finishes the tracking task within a couple of seconds and generates the camera and tracking data as well. 

But, you can see the camera is not facing in the right direction. You need to setup the correct co-ordinate system before exporting the camera data to Maya

Syntheyes finishes the tracking
Syntheyes finishes the tracking

Step 11

To setup the correct co-ordinates, click on the Co-ordinate Control System Panel icon. Alternatively, press F8 key.

Co-ordinate Control System Panel icon
Co-ordinate Control System Panel icon

Step 12

First click on the 3 icon and then click on a good tracking point to set it as the origin.

First click on the 3 icon
First click on the 3 icon

Step 13

Next, click on another point to make it the reference point for the XY plane.

XY plane
XY plane

Step 14

Finally, click on one more point to make it the reference point for the Z direction. 

As soon as you click on it, a dialogue box appears and asks you to finalise the coordinate system. Click on Yes.

Coordinate system
Coordinate system

Step 15

Another window appears which confirms the solving is done. Click on OK button.

Another window appears
Another window appears

Step 16

And now you will see the camera is pointing in the right direction. All the tracking points are now placed on the grid. This confirms that the tracking has been done successfully. Now you are ready to export the camera to Maya.

The right direction
The right direction

Step 17

Go to File > Export > Maya ASCII Scene.

File Export Maya ASCII Scene
File > Export > Maya ASCII Scene

Step 18

Save the script as Maya Tracker.

Maya Tracker
Maya Tracker

2. Setting up the Tracked Camera Data in Maya

Step 1

Open Maya.

Open Maya
Open Maya

Step 2

Open Maya Tracker file.

Open Maya Tracker file
Open Maya Tracker file

Step 3

With the camera selected, go to Panel > Look Through Selected. This way, you'll see the scene from the camera point of view.

Panel Look Through Selected
Panel > Look Through Selected

Step 4

For testing purpose, I've created a polygon cube and some lights in the scene as shown in the following image. 

Create a polygon cube
Create a polygon cube

Step 5

I have also created a ground plane for matte shadow.

Create a ground plane
Create a ground plane

Step 6

Render the frames in PNG format to get the alpha channel.

Render the frames
Render the frames

Step 7

You can check the tracking accuracy of the rendered frames in After Effects. Import both the live action footage and the rendered frames in After Effects and set the layers accordingly. 

Once you press the Play button, you will see the rendered frames are actually following the live footage perfectly.

Final compositing
Final compositing

Conclusion

In the next part of the tutorial, I'll show how to track the footage in SynthEyes and then work in 3ds Max.


No comments:

Post a Comment