Scripts‎ > ‎Commercial‎ > ‎AfterFxIO‎ > ‎

Documentation

Intro.


Documentation - After Effects IO for Luxology modo 
Version: 1.0 
Designed for: modo 401 
The documentation covers: 
Export from modo 
Import to After Effects 
Note when going from modo to After Effects 
Export from After Effects 
Import to modo 
Note when going from After Effects to modo


Export from modo.


The export engine is working on the last selected 3D item. You'll find the After Effects IO settings and interface under the animation tab. 


Scene Multiplier - Will multiply the translation before converting to pixels. With a default value of 100, if you move an item 1m in modo it will move 100px in After Effects. This will not affect how your After Effects layer is tracking to your modo item.

Add Start Frame - The export engine will run thru your scene frame range, but you can offset the start frame with this controller. It's handy because modo will start render from frame 1 if your scene begins at 0. You need to have your rendered footage to exactly line up with the exported frames in After Effects. 

World or Local - This is a handy controller when you're dealing with item that's parented to each other and you want or doesn't want to recreate that hierarchy in After Effects. World means that the export engine will take the world coordinates for the items, i.e. you'll not need to recreate any hierarchy. With the Local setting you'll get the translation and rotation that's shown in the items properties and you'll need to recreate any hierarchy inside After Effects. 

Angle Tolerance - When you press export the export engine will bake the animation for effected channels. (note. it will not change your animation or item in your scene in any way, this is done after all the animation data have been read of the engine.) When the animation gets baked the rotation order is also getting changed, to match After Effects rotation order. When this conversion is done you'll end up with rotation values that's clipping at every 360 cycle. This is fine and will not effects the look of the animation, but if you looking at half frame this might sometimes cause errors. So to solve this the engine is even out the spikes at the end of the rotation cycle. So with default value of 265.0 it will only even out values within 265 degrees difference. Be careful, do not change this value to much, if you do, the script will be caught up in a while loop. The top graph in the images below shows the rotation with bad angel tolerance settings. The bottom graph shows the angle tolerance set to 265. This will work in almost all cases. 




Import to After Effects.


Just open up the file you exported from modo in a text editor, select all and copy. Then go to After Effects, got to the first frame, select your 3D layer and paste in the key frame data. If you're importing camera key frame data to After Effects you'll need to turn off Auto Orientation on your camera before pasting the key frames. 




Note when going from modo to After Effects.


The syntax for the exported key frame data is "Adobe After Effects 8.0 Keyframe Data" i.e. the exported files will work from CS 3 as well as After Effects CS 4 and above. The channels that currently being exported are; 
Position XYZ
Rotation XYZ
Zoom
 (if the item is a camera) 

Always export one camera and at least one item from modo, do not try to position the After Effects layer by hand, export an item for that. Be aware of that both position and rotation is calculated from the pivot. So if you want to place a sticker on the side of a box you can not just export the data for the box, this will cause sliding in After Effects. To avoid this you can do two things, either move the pivot the exact position of the polygon you want to place the After Effects sticker on, or create a locator that you match up the the polygon position and export the locator. To make sure you'll always get clean key frame export I've added sort of a safety switch, that will skip all mathematical algorithms and conversions. If you set you item in modo to the same rotation order as After Effects (ZYX) and choose the World to be Local, then the export engine will do a straight export of your item. The last thing to note is that there's a bug in After Effects where it sometimes won't let you paste the key frames, if this happens to you try restart After Effect, if that doesn't help, then restart your system. 


Export from After Effects.


This is simple process, just select the key frames that you want to import to modo, copy them and past them into a plain text document. On a PC, this is straight forward, just use notepad and save your file as a .txt file. Under OS X you'll need to convert your document to plain text (if you're using TexEdit). To do this simply go; 
Format > Make Plain Text 

Then save your file as a .txt file with the default encoding. 


Import to modo.


The import engine works on the last selected 3D item, make sure to deselected everything (hit ecs a couple of times) then selected the item you want to import the data to. The engine will read in the following channels; 
Position XYZ
Rotation XYZ
Zoom
 (if the item is a camera and that get converted that to focal length distance) 

Before you import the key frame data you'll need to give the import engine the proper values to work with. 

Scene Divider - Will divide the translation before converting to meters. So with a default value of 100, if you move a layer 100px in After Effects it will move 1m in modo. 

Film Size - This is the value from the film size of your camera in After Effects, it can be found under your Camera Settings. 

Angle of View - This value can also be found under your Camera Settings in After effects, this value is only used when the zoom value on the camera is static. 



Note when going from After Effects to modo.


The import engine will work best if your After Effects project uses an Aspect Ratio of 1, otherwise you might see sliding and bad tracking. This will also be the case if you're having few key frames on the layer your exporting from After Effects. The reason for that is that modo and After Effects doesn't calculate the curves in between key frames in the same way. You will get better result if you convert your curve in the graph editor to linear in both programs. As for exporting camera data from After Effects you also need to disable Auto Orientation.