LightWave Camera to After Effects using POIcam_AEpro

 

This is the After Effects Professional version of this tutorial.  For the Standard version, go here:  

http://www.ats-3d.com/POIcam/POIcam_AEpro/AE_standard.html


by Al Street        © 2007  Al Street. All Rights Reserved.

Plugins used:    POIcam_AEpro.lsc, CameraMotionBaker.lsc  

Additional software:  After Effects Professional

Download:  Plugins and tutorial files


Overview:

In the scene there are a camera, several boxes and a floor. The camera moves and rotates. The goal is to render the scene and then recreate the camera and its motion in After Effects so that it matches the rendered footage. 

The boxes are 200 units square at the base with various heights. There are several nulls in the scene that correspond to some of the faces of the boxes. These nulls will come into
After Effects as solid layers and will be used to verify that the camera match is correct. This usage is optional but is useful for visualization and checking alignment. The nulls are positioned at the center of the face and have a Custom Object attached (a Grid Shape). The shape is set for Scale = 200 m using the Z-axis. Always use the Z-axis setting and then rotate the null in Layout to match the face. This ensures that the rotation will be brought into AE correctly. In this scene the nulls are rotated (if necessary) and scaled to match the face they are representing.


Steps:

In LightWave:

Load the scene POIcam_AEpro_tutorial.lws

Make sure Auto Key is ON and Auto Key Create is not OFF.

If you intend to export nulls to
AE, use the  Custom Object Grid shape set to Z-Axis. Then scale and rotate them as necessary to line up with the geometry.  The sample scene already has the nulls set up.



Bake the camera's motion starting from frame 0. You can use the Camera Motion Baker plugin for this step.  In the sample scene the camera motion has already been baked.



Render the footage. 

Select all nulls that you want to export to AE. They must be selected before you run POIcam_AEpro.

Run POIcam_AEpro. Choose the "Camera_baked" camera if you have used the Camera Motion Baker plugin. 



If you are exporting nulls, activate "Export Selected Nulls as AE Solids" and set "Solid Layer Size" to the same value you used for the Custom Object Grid shape that you applied to the nulls earlier.

Leave the Position Scale Factor at 1.0 unless you have a good reason to change it (see "Things to know" below). 

Note the name and location of the output file that will be created. It will be named "LoadPOICamera.jsx" and will be saved in the
LW "Programs" folder on the PC. On the Mac, it will be in the folder you have designated as the LW "Content" folder.

Click "Ok". 


In After Effects

File > Scripts > Run Script File... and select the file you have just created ("LoadPOICamera.jsx").

A composition is created ("LW comp") containing the
LW camera and any nulls you selected for export as solid 3D layers with random colors. 

Bring the rendered LW footage into the comp as a 2D layer and select all the "Null" solid layers.  

The solids layers are set for 75% opacity so you can see the LW rendered footage behind them. With the solid layers selected you should also see the outlines of the layers matching the faces of the rendered boxes.

 

Things to know:

Meters in LW = pixels in AE. If your scene consists of objects and a camera only a few meters apart, they will come into AE only a few pixels apart. The match will still be correct, but AE may have problems rendering objects that close to the camera. I don't recall that being an issue in AE 5, but it seems to be in AE 6.x and beyond. Try to construct your scene accordingly. If you can't, you can use the Position Scale Factor setting in POIcam to scale the distances in AE.

Position and rotation of LW nulls are taken from frame 0 only.

The first camera keyframe found will be created in AE at time = 0. 

Composition length is set according to the First and Last frame Render settings in LW, not the start and stop frames in the time slider. Frame width and height are set in AE according to the corresponding settings in LW's Camera Properties panel. FPS in AE is set according to the value in LW's Preferences > General tab.





Tips:

Make sure Auto Key is ON and Auto Key Create is not OFFAuto Key Create is found under LW's Preferences > General tab (see above).

If you have multiple cameras in your scene, make sure you export the same camera that was used to generate the renders.

Always Bake the camera's motion before exporting it. You can use the Camera Motion Baker plugin for this step.

Always make your baked camera range match your rendered footage range. For best results, start your renders and bake your camera from frame 0. If you don't start from frame zero all is not lost, but you will need to slide things around a bit in AE's timeline to get things to match up. 


Q & A:

Q. I activated "Export Selected Nulls as AE Solids", so why aren't my nulls showing up in AE as solid layers?

A. You forgot to select any nulls in Layout before running the plugin. 

Q. I'm getting an error message, something like "Line 162, unknown Object Agent data member: null". What's wrong?

A. You have activated "Export Selected Nulls as AE Solids" but you have selected a camera or light in Layout.

Q.  I'm only getting 30 frames of the camera's motion in AE.  What's wrong?

A.  The plugin is running in DEMO mode.  Once registered, that restriction is removed.

Q.  I'm getting messages that say "All camera position and rotation channels must have same number of keys!" and "Consider baking the camera motion." What's wrong?

A.  When you keyframed your camera motion, you did not create keys for x, y and z positions and H, P and B rotations for all frames.  You can fix this by running Camera Motion Baker. 



Comments:   Al Street (al@ats-3d.com)