PDA

View Full Version : Max to After Effects Script


daft-crut
06-27-2008, 12:07 AM
Hi guys, we recently created this script to help our production pipeline, because we often use After Effects to add an element such as smoke, fire, or else...and with this script, we can export a object and camera movement from MAX into After Effects and automatically as a 3d layer (it tracks 3 dimentional movement). I'd like to share this script, and hopefully it's gonna be useful.

How to use is pretty simple, simply select the object you wanted to track the motion, and select the camera each under node and camera button, then browse for the output files, and press export, it will generate a jsx (after effects script) file, and simply run the script inside after effects (create a composition first)

Caution: never use aperture other than 36.0 , because AE use that aperture, and different aperture can cause inaccurate tracks. make sure the pixel aspect and the resolution between 3dsmax render settings, and AE composition settings the same.

EDIT:I've reupload to Script, and change it's name, but haven't implement rotation yet, still trying to figure the best way to convert quaternion into AE

erilaz
06-27-2008, 12:43 AM
Wow, this is really surreal. I was thinking of writing a script like this only this week!

Now I don't have to. I'll check it out. :D

Paradyce
06-27-2008, 01:08 AM
Can't wait to try it out. Cheers!

daft-crut
06-29-2008, 04:45 PM
thanks mate for testing...

well any feedback would be greatly appreciated!

Kramsurfer
07-02-2008, 06:18 AM
You may need to rename your script.. there's a commercial MAX2AE, that's been around for sometime... Cool little script you've got there...

http://www.boomerlabs.com/cart/product.php?productid=8&cat=3&page=1

You know AE CS3 takes a -s command line option, so if AE was open ( it'll open if it's not ) you can command line it and it'll run the script...

Keep up the good work!

DangerousCliff
07-08-2008, 04:09 PM
The script works great, many thanks! My only problem is I'm not using Trapcode plugins, and the CC particle systems ( or most of the AE effects that are not separated out into x,y,z) are having problems assigning the position data to the emitters.

Now, my only request for this script, or something similar is to go the opposite direction- I would love to get some AE tracks into Max. especially tracking objects and using that to drive animation in Max.

PS, I second the name change... Max2AE has been around a while, don't want to step on toes with a script that essentially does the same thing for free..

PiXeL_MoNKeY
07-08-2008, 10:52 PM
I really need to finish my Max2Comp script which I have used to create CWS files from Max. Though I plan to expand it to more apps. I may get in contact with you daft-crut about how you are working with *.jsx format.

-Eric

erilaz
07-09-2008, 04:08 AM
Hey Romi, does it handle rotation values? The camera position works great, but I rotated the node and it didn't reflect in the AE script. Looking at the data it seems to only set position.

Great script though, nice and simple and does the job.

Have you considered perhaps only setting the values at the keys to reduce time/data?

joconnell
07-09-2008, 02:03 PM
tbh I think it'd be a bad idea since a key on each frame is the only way to lock trajectories - there's no guarantee that after effects tangents will be the same length and slope as max - no point in taking the chance.

PiXeL_MoNKeY
07-09-2008, 03:34 PM
Also, Key to key conversion would only work with EulerXYZ, plus you would also have to take into account all parenting, etc. On the other hand if you export World Position and Rotation values every frame, then everything should carry over without trying to recreate the scene hierarchy and controllers inside of AE.

-Eric

daft-crut
07-10-2008, 01:19 AM
Thanks a lot for the feedback,it doesn't rotate yet but we are currently trying to also incorporate rotation and automatically creates composition, so users will never have to create composition first (and hopefully it will minimize inaccuracy in the data, as the composition created will follow exactly max files setting parameters)

Also we'll change the name on next uploads...

cheers :)

daft-crut
07-10-2008, 05:32 AM
erilaz: one more thing, if you want the script to export the data quickly (ie: if the scene have massive poly amounts) simply uncheck "preview", and then export, this makes export faster, because it won't slide the timeline.

CHRiTTeR
07-16-2008, 01:52 AM
verry handy, cant wait for the rotation update!



tnx!

ShakeandBake
08-29-2008, 05:07 PM
Hmm, Has this been updated for MAX 2009? When I run the script I get an error saying '--Unkown property: 'pos" in undefined'

daft-crut
09-01-2008, 01:16 AM
For the rotation, I'm sorry but I haven't found an accurate way to convert max rotation onto After Effects rotation, all our attempt always failed, the rotation always went wrong in AE, hopefully we'll find a way to make it (or perhaps if someone know how to do it please share)

as with 2009, I haven't tried it, but I will try it soon, and check what's wrong with the script...

daft-crut
09-01-2008, 09:55 AM
ShakeandBake: I've tried in max 2009, and it works well, so you may forgot to select a node or a camera (this script need all it's input assigned to an object).

Well I've uploaded a new version, added error handling when the inputs are undefined, it simply pop a messagebox up, no need to re evaluate the script.

daft-crut
02-22-2009, 01:56 PM
Uploaded a new version, now support multiple objects to track, and support free camera, also Vray Physical Camera..

haven't implemented rotation yet, as it pretty difficult to convert quaternion into euler XYZ without introducing sign flip...hopefully we can add this in the future version..

thatoneguy
02-22-2009, 11:00 PM
http://www.scriptspot.com/3ds-max/max2nuke

Check out this script. We use a derivative of it for our max to nuke transfers.

It includes rotation.

CHRiTTeR
02-24-2009, 02:32 AM
tnx for these guys!

Laserschwert
03-17-2009, 04:25 PM
After the export is done I get an error:

-- No "delete" function for undefined

And the line "delete temp_dummy" is highlighted in the script editor.


And when I try to run the generated JSX-file in AE CS3 I get another error:

After Effects error: opening file "xxx.jsx" - file is busy (delete) (-47).
(3 :: 130)

Edit:
Nevermind, got it working.

daft-crut
04-29-2009, 07:53 AM
Sorry for the late update, we were busy with other things, anyway I've uploaded a new version below. We fixed the temp_dummy delete issue, now it will check if it's a free camera or targeted before deleting. Still no rotation for now. Cheers

CGTalk Moderation
04-29-2009, 07:53 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.