Moderator: Paul Tuersley

Topic Author
Posts: 321
Joined: Wed Jul 07, 2004 2:30 pm
Location: Charlotte, NC

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

Tue Jul 12, 2005 12:37 pm

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.

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 Tue Nov 21, 2006 12:19 pm, edited 1 time in total.
Topic Author
Posts: 321
Joined: Wed Jul 07, 2004 2:30 pm
Location: Charlotte, NC

Thu Jul 14, 2005 11:59 am

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
Posts: 5
Joined: Tue Jun 10, 2008 1:41 pm

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

Wed Jun 11, 2008 5:32 am

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

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

Fri Jul 02, 2010 9:19 am

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

Who is online

Users browsing this forum: No registered users and 2 guests