PDA

View Full Version : New LScript: LW -> After Effects



MentalFish
08-08-2009, 05:21 AM
Hi guys

I have made a new LScript that exports the animation of the selected model as an .ma file that After Effects can read.

Check out the video of it in use and download it from here: MentalFish blog (http://mentalfish.com/2009/08/lw-2-ae/)

raw-m
08-08-2009, 11:10 AM
I think you are Genius!! I can't tell you how useful this is going to be..... tryin' it out now (PS. your link is broken, got there through your "blog" link). Thanks again!

MentalFish
08-08-2009, 12:14 PM
Sorry for the mess with the link, I was trying different setups in Wordpress. I have set it back to year/month/title again so the link works.

Glad to hear it will be of use. In case you haven't seen it, there is an AfterEffects script that does it the other way around too AE -> LW:
http://www.newtek.com/forums/showthread.php?p=868014

nikfaulkner
08-09-2009, 01:48 AM
wow this looks great, i'll have a play when i get a spare 5 minutes (if ever)

thanks a lot, we've been waiting for something like this for ages

n.

tyrot
08-09-2009, 04:04 AM
dear petterms

first thanks for the script. Second, thanks for the script. Brilliant concept. One problem though, i have CS4 after effects. It doesnt open it up automatically. what to do?

BEST!

MentalFish
08-09-2009, 06:09 AM
Glad to have made something useful :)

Behold the beauty of unencrypted LScripts: Open it in a text editor and change the application it is supposed to open in the variable at the top of the script.

Make sure it doesn't get a .txt added to the file name when saving it back out.

dee
08-09-2009, 07:27 AM
Fantastic, thanks! :thumbsup:

nikfaulkner
08-09-2009, 10:02 AM
sorry, i'm being a total idiot. anybody got this working with cs4?

followed the instructions above, probably typing in the wrong thing :(

ta
n

MentalFish
08-09-2009, 10:30 AM
I have not tried it on Windows, sitting on Mac myself, perhaps you need to specify the full path to the exe?

nikfaulkner
08-10-2009, 02:44 AM
ok, still cant get the auto thing to work but everything else is :)

i exported the camera and a moving object from lightwave, got it all setup in after effects hoping to add a particle trail to the object using particular.

initially i had loads of issues with things not lining up properly, then i realised that the after effects cameras "field of view" was different to lightwaves. so i changed it to the same setting as lightwaves "horizontal FOV" and it works perfectly.

i'm wondering if this setting could be added to the script?....maybe :)

good work petterms, its a great new tool to have

n.

akademus
08-10-2009, 03:19 AM
Thanks, much appreciated! I'll try it right now.

Lewis
08-10-2009, 04:15 AM
Thanks this is great stuff, I would also like to thank you (massively) for your other LScript called "Scale Polygon island" for modeler. That's big help in car modeling stuff and i always wanted to have something like that in modeler to scale numerous parts at it's own pivot points (now i do) :).

cheers

ivanze
08-10-2009, 04:26 AM
Thanks a lot man!!

I wonder why something like this didn't appear before. There have been a lot of threads about this workflow over the years.

3DGFXStudios
08-10-2009, 04:49 AM
What's the difference between the other exporter that's here for a while?

MentalFish
08-10-2009, 04:51 AM
Thanks for all the positive replies.


ok, still cant get the auto thing to work but everything else is :)
I'll jump over to Windows, download the CS4 demo and get it sorted out


initially i had loads of issues with things not lining up properly, then i realised that the after effects cameras "field of view" was different to lightwaves. so i changed it to the same setting as lightwaves "horizontal FOV" and it works perfectly.
Sure thing, ill do a check if isCamera -> also export FOV

I'll 1up you and add export of scale too, just in case, and I am well on the way of making an automated AE->LW workflow also. It has its "quirks", but will work.

MentalFish
08-10-2009, 04:58 AM
What's the difference between the other exporter that's here for a while?

Are you thinking about this one?
http://pagesperso-orange.fr/dpont/plugins/Lscript_Plugin_Development_en.htm

The one I made is available for download :) and is "automagic", apart from when nikfaulkner is using it that is :)

nikfaulkner
08-10-2009, 05:05 AM
the other ways around involve different aproaches that i could never get to work.
after effects camera always seemed really odd with the other ways. something maybe to do with scale, or field of view or even the way depth is calculated in after effects.


oh, and this is free and open sourced :)

thanks again petterms :)

n.

3DGFXStudios
08-10-2009, 06:11 AM
Are you thinking about this one?
http://pagesperso-orange.fr/dpont/plugins/Lscript_Plugin_Development_en.htm

The one I made is available for download :) and is "automagic", apart from when nikfaulkner is using it that is :)

I think that might be it, but I can remember there was also one for Fusion so I'm not quite sure it is Dpont's one I was referring to.

tyrot
08-10-2009, 11:31 AM
dear petterms

waiting for CS4 update ...A S A P :)

BEST

Larry_g1s
08-10-2009, 11:49 AM
Super big thanks petterms!
I'll have to also wait for the CS4 update. :)

MentalFish
08-10-2009, 01:17 PM
Go download new version, fixed path to CS4 on both Mac and Windows.

This was the correct path in case anyone wanted to know:

afterEffectsWin = "C:\\Program Files\\Adobe\\Adobe After Effects CS4\\Support Files\\AfterFX.exe";
I assume it will be for the same for CS3 on Windows, just with CS3 in the name obviously? In any case, just use the double backslashes as seperators and find the exact path to the exe you want to be launched if you have a different version of AE, i.e. 6 or 7.

nikfaulkner
08-11-2009, 04:32 AM
thanks Petter,

i shall check it out later :)

n.

tyrot
08-11-2009, 11:37 AM
Dear petterms

IT DOES WORK ...:) .i ll test it today ...

BEST

StereoMike
08-19-2009, 10:46 AM
Hm, it exports my scene always as 640x480, 24 fps, although the scene runs at [email protected] in LW. Have to stretch the timeline of the cam in AE to make it fit.
e.g. a 1000 frame animation @25 in LW becomes a 1043 frame animation @24 in AE.
It's like that in the .ma file ([email protected], haven't checked if it's 1043 frames inside the .ma but I guess so).
But anyway thank you Petter for some great scripts (islands aswell)

mike

MentalFish
08-19-2009, 12:53 PM
Hm, it exports my scene always as 640x480, 24 fps, although the scene runs at [email protected] in LW. Have to stretch the timeline of the cam in AE to make it fit.
e.g. a 1000 frame animation @25 in LW becomes a 1043 frame animation @24 in AE.

Yes, that is a thing on my todo list, will definitely fix both the FPS and resolution settings. I think the .ma format is limited to predefined 24, 25 and 30 fps by naming: film, pal and ntsc, so if fps in LW is different than these i will inform you about it so it can be changed before exporting.

MentalFish
08-28-2009, 04:16 PM
The script is updated to handle 24, 25 and 30 fps, exports the resolution and lens focal length as well.

Todo: export of scaling.

nikfaulkner
08-29-2009, 11:59 PM
many thanks for the update,

i have a shot to work on on monday that'll make good use of this.

great stuff !!!

n.

3DGFXStudios
08-31-2009, 07:09 AM
The update causes Layout HC to crash immediately. Also running it from anywhere else causes a crash.

MentalFish
08-31-2009, 07:13 AM
What does Layout HC mean?

The script works fine here in LW 9.6 UB

JeffrySG
08-31-2009, 09:13 AM
Just wanted to say THANK YOU!!

:bowdown::bowdown::bowdown:

adhesiveX
08-31-2009, 06:03 PM
I also experience immediate crashing when launched in 9.6 windows 32 bit.

MentalFish
09-01-2009, 02:49 AM
Could you try it now? I fixed some lines of code that were too long for LW-win to handle. I don't have a full LW/AE setup available to test here, so perhaps you could give it another go and report back :)

dee
09-01-2009, 03:47 AM
Link is broken, error 403.

MentalFish
09-01-2009, 03:54 AM
Sorry about that, fixed.

dee
09-01-2009, 06:11 AM
Thanks! Doesn't crash anymore. :thumbsup:

3DGFXStudios
09-01-2009, 07:25 AM
Yup! Works Great!!! thanks!!! :D

oobievision
09-01-2009, 08:48 PM
great Lscript, any chance u can create something that takes AE camera movements to Lightwave camera?

MentalFish
09-02-2009, 04:35 AM
Glad you like it.

I am planning on doing some LW/Blender/Nuke/AE integration toolkits for speedier workflow for rendered 3D, and there are some LW<->Unity efforts going on as well. So expect more of this stuff, bidirectional, between apps. Think of it as Zbrush' ZAppLink for those apps. First up was this LW->AE, next up is AE->LW, but in the mean time you can use this script (http://aenhancers.com/viewtopic.php?t=991) in AE to export it back out as a LWS file. I am going to make it a GUI-less, one click solution as well. Scripts can only be assigned to shortcuts in AE, so that's what I will go for.

oobievision
09-02-2009, 06:31 AM
thanks, its developers like you that makes this great software even better!

avkills
09-02-2009, 10:35 AM
Kick *** man, I am giving it a test run right now. Thanks so much for the script. I am testing by having a NULL in LW move behind a already moving object, which I will then parent some AE text layer to, already exported Camera info, which worked like a charm using LW 9.6 and AE CS4 on Mac.

Where does the plugin save the motion data?

-mark

avkills
09-02-2009, 10:36 AM
Ah, nevermind I see where it saves it, wherever the scene file is. Cool.

-mark

avkills
09-02-2009, 01:50 PM
I think the rotation transforms are off or opposite what they should be, my Null or the camera tilts incorrect from what LW is doing. Hard to explain, the position is correct but the tilt is mirrored form what LW is doing (only seems to be the Z tilt also)

-mark

hunter
09-08-2009, 09:46 AM
I think the rotation transforms are off or opposite what they should be, my Null or the camera tilts incorrect from what LW is doing. Hard to explain, the position is correct but the tilt is mirrored form what LW is doing (only seems to be the Z tilt also)

-mark

I think I see what you're seeing. It's not matching up.
But thanks for the work on this script petterms. A seriously useful tool. :thumbsup:

MentalFish
09-11-2009, 02:25 AM
I have studied the results of an export, and it seems right to my eyes here. Can you do a screencapture and send to me at petter at mentalfish dot com or post a link to it here?

hunter
09-14-2009, 05:52 PM
I have studied the results of an export, and it seems right to my eyes here. Can you do a screencapture and send to me at petter at mentalfish dot com or post a link to it here?

I'm assuming you have photoshop. I've attached a ps file with 3 layers showing AE and LW at frames 0, 30 and 50. Probably I'm doing something wrong but I followed your video exactly.
Thanks again.

MentalFish
09-14-2009, 06:06 PM
Could it be due to LW is set to use inches? Just guessing here, have not tried. Also, have you checked if camera settings in general is the same too?

hunter
09-15-2009, 11:28 AM
I think the cameras are the same and I tried changing it to metric and SI, but still the same result. Windows vista 64bit. Here's the files. Thanks for all your help.

MentalFish
09-15-2009, 02:05 PM
I don't have access to CS4 right now so I couldn't open your .aep file, but here is a checklist:
- 1 meter in LW == 100 pixels in AE
- Check that the x,y,z coordinates of the plane in AE is set to the same as the one in LW (with some potential reversal of some axis, but 0,0,0 such as this case should be the same of course :) )
- Make sure the zoom level on the camera matches. In AE it is specified as pixels and degrees in parenthesis ie. (45.2). Set this zoom to match the horizontal FOV in LW and you should be good to go.

hunter
09-16-2009, 05:03 PM
I don't have access to CS4 right now so I couldn't open your .aep file, but here is a checklist:
- 1 meter in LW == 100 pixels in AE
- Check that the x,y,z coordinates of the plane in AE is set to the same as the one in LW (with some potential reversal of some axis, but 0,0,0 such as this case should be the same of course :) )
- Make sure the zoom level on the camera matches. In AE it is specified as pixels and degrees in parenthesis ie. (45.2). Set this zoom to match the horizontal FOV in LW and you should be good to go.

Thanks. That explanation helped a lot. It looks closer now.

CC Rider
09-17-2009, 12:29 PM
Thanks!
This is such a great tool...for me, setting the anchor point of the footage to be added in AE so that its at the bottom instead of the upper left or middle was the tidbit that I needed to tie it all together. Once the actor's feet stay in place, the rest works like a charm.
You probably mention something about this in the video, but I can't get it to play here at the office (tons of filters here to keep folks off of youtube etc...)
I'll check it out when I get home to see if there is something I am missing...

anyway...well done and thank you very much sir!!!

:thumbsup:

justinacree
10-02-2009, 12:23 AM
thanks! for this awesome script MentalFish it worked like a charm on my aniboom marvel entry, I used it for a good amount of the shots.

http://www.aniboom.com/competitions/Marvel/399439/NOVA_all-for-one/

thanks again great work

geo_n
01-22-2010, 09:24 PM
I don't have access to CS4 right now so I couldn't open your .aep file, but here is a checklist:
- 1 meter in LW == 100 pixels in AE
- Check that the x,y,z coordinates of the plane in AE is set to the same as the one in LW (with some potential reversal of some axis, but 0,0,0 such as this case should be the same of course :) )
- Make sure the zoom level on the camera matches. In AE it is specified as pixels and degrees in parenthesis ie. (45.2). Set this zoom to match the horizontal FOV in LW and you should be good to go.

Great plugin.
I don't quite understand the scaling and camera settings to match lw. The image plane in AE is on a different location and the camera I chose 24mm in lw and 24mm preset in AE but it doesn't seem to match. I attached the files if I made a mistake in AE. :D