3D position to 2D screen space [XSI to AFX]

All things .jsx

Moderator: Paul Tuersley

Post Reply
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

I have just finished a new script that exports 2D position data from 3D objects in XSI. The data is then read by a script in After Effects and animates nulls or a corner pin effect. Let me know if anyone finds any bugs. The AE part is much better put together than the XSI part, but it seems to work.

http://www.armoredsquirrel.com/scripts/ ... to_AFX.zip

Detailed Usage

The script finds the position of an object in 2d 'screen' space. This is useful for tracking objects in compositing apps, namely Adobe After Effects. This is designed to be used with XSI and After Effects, although, you could most likely write a script to replace either one and use a different app for 3D or compositing. It is mainly set up for NTSC, most of the comp settings come from what you are using in XSI though. It would not be hard to sub out the few other variables to make it compatible with PAL.

-There are two scripts, a .vbs for XSI and a .jsx for AFX.
-Inside XSI select any number of objects you wish to track and run the script. If you would like After Effects to perform a 4 point corner pin track, select the 4 points in clockwise order starting from the Upper Left. (UL,UR,LR,LL)
-It will prompt you to save a txt file that will contain the exported data.
-In After Effects, run the jsx script. It will ask you to find the data file that XSI exported.
-If the file contains 4 tracking points, the script will ask if you would like to apply a corner pin effect. If you choose this option, it creates a comp based on settings from XSI and animates a corner pin effect using the data.
-If there are not 4 points or you choose not to use corner pin, it will create a null with animated postion for each tracking point that you had selected in XSI.
-In AE, you can either select the comp you would like everything to go in before running the script, or select nothing to have the script create a new comp based on settings from the data file.
Last edited by byronnash on November 21st, 2006, 12:19 pm, edited 1 time in total.
byronnash
Posts: 321
Joined: July 7th, 2004, 2:30 pm
Location: Charlotte, NC
Contact:

I have updated the script with some bug fixes and workflow enhancements.

You can now apply a corner pin to an existing AE layer by selecting it before running the script in AE. It will ask you if you want the corner pin on the layer.

All the comp settings come from XSI, so it 'should' support PAL or anything you have set up in XSI
ugur3d
Posts: 5
Joined: June 10th, 2008, 1:41 pm

Wow. very cool script. i will try it today.
tiz
Posts: 1
Joined: June 30th, 2010, 2:57 pm

hi I have a problem with importing trackers to the AFX composition. script for afx I added to the folder: ScriptUI Panels so I can run this and choose file ..txt with parameters XY, but after that I see communique e.g. "null is not a object" or, "AF error: unable to call 'setValueAtTime' because of parameter 2 value "237,84" element 1 in the array is not a valid float".
Sometimes it is a problem with 61 or 161 line of code jvscript. I don't know what to do, please can you help me solve this problem...
Thanks!
Post Reply