LightWave to After Effects

Home/Computer Graphics/LightWave to After Effects

LightWave to After Effects

This is an LScript for transferring animation data from LightWave to After Effects. It is done by exporting the position and rotation of the selected item in LW into a .ma file (ASCII Maya file). At the same time, After Effects is either launched or brought to front and told to open that specific file. This makes it feel like you have a direct connection between the two applications.

It always exports it as a camera so that AE does not create a whole bunch of solids for the models inside the .ma file. Think of it as exporting a null that just so happens to look like a camera πŸ™‚

What do you think, should the script also export scale as well, or is it not needed?

Something weird happens with the sound in the end. I might re-record it, but it works for now:

Download LScript

By | 2012-05-14T14:40:31+00:00 August 8th, 2009|Computer Graphics|62 Comments

About the Author:

62 Comments

  1. Gary 2009/08/11 at 03:55 - Reply

    Looks Great! Have you looked at the ATS utilities? http://www.ats-3d.com/POIcam/POIcam_AEpro/AE_standard.html

    Can the position of objects be away from world center with your plugin? Your script looks simple and straightforward.

    could your script export a null as a position placement for a light in After Effects.

    Thanks for the LScript!

  2. Gary 2009/08/11 at 03:58 - Reply

    Also, I think it would be nice to have the script take scale into account. Could be useful for objects.

    • Petter Sundnes 2009/08/11 at 09:02 - Reply

      I have seen, but not used the ATS utilities. I haven’t tried exporting a null yet, but it should work as long as it has more than one keyframe. At the moment it cant export items with only one keyframe. I will fix that and I will add support for scaling too, but right now I am working on a similar script to export straight from AE back to LW.

  3. nathan neely 2009/08/19 at 23:39 - Reply

    I have no idea how to add this lscript and get it to work. I downloaded added through add plug ins and scrolled to it under “additional” and nothing happened. didn’t do a thing

    • Petter Sundnes 2009/08/19 at 23:52 - Reply

      Hi Nathan, open the script in a text editor and check that the path to After Effects is correct. Also take a look next to your LWS file to see if there is a .ma file exported at least.

  4. Gary 2009/08/24 at 03:23 - Reply

    Petter,

    Can the object in Lightwave be off the zero axis and come into AE correctly?

  5. Petter Sundnes 2009/08/24 at 08:33 - Reply

    Hi Gary, yes it can and it does. Check the coordinates in AE and see that it displays the same value but in pixels. 1.7m in LW == 170px in AE. I just tested on a model that moves around in LW, and its values are transferred correctly into AE.

    Have you tried it?

  6. Stereomike 2009/08/28 at 15:19 - Reply

    Hi Petter, does the script still assume the scene is 640×480@24fps?
    For people who encounter view and motion mismatches: be sure to adjust your camera option according to the imported .ma one. Also see if you have to stretch it to make it fit to your fps (this .ma comes in as 24fp right now and thus needs to be adjusted to fit an e.g. 25fps pipeline).

    • Petter Sundnes 2009/08/28 at 22:01 - Reply

      Download it again, it has been updated to handle camera resolution, fps (but only 24, 25 and 30 due to limitation in the .ma format), and lens focal length.

  7. Sie 2009/09/01 at 10:15 - Reply

    Like the plugin!
    Seems to work but I would like to export the rotation and position of an object that is parented to a different object. Position and Rotation comes from a Null, but I would like the position an rotation of the parented object. Is that a possibillity?

    • Petter Sundnes 2009/09/01 at 10:51 - Reply

      Try it and see what happens πŸ™‚ It should work, as it “bakes” the global position and rotation on export.

  8. avkills 2009/09/02 at 18:46 - Reply

    Petter,

    Great script, although it looks like the rotation transforms coming from NULL objects in lightwave are somehow backwards when they get into AE. I have a NULL that is rotating the wrong way in AE form what LW makes it look like. Should the NULL have world coordinates enabled?

    -mark

    • Petter Sundnes 2009/09/03 at 01:26 - Reply

      The script always reads out world position and world rotation from an animated item, so that should not have any effect. I do some axis reversal ( * -1 on rotation and * -100 on position ) to get the desired results in AE, and that is done to nulls as well as cameras, models or any other item. Please feel free to poke at it in the script, lines 92-97, I might have gotten something wrong there.

  9. kat 2009/09/03 at 11:18 - Reply

    Can we get some stuff for fusion?

  10. avkills 2009/09/03 at 16:31 - Reply

    Hmmmm, it could have been my scene. I will do some more testing. Do exported items still need 2 keyframes?

    -mark

  11. avkills 2009/09/03 at 16:44 - Reply

    This is a bit confusing, The 3D axis system between LW and AE is exactly the same except for the Y axis which is reversed. Interesting. I am going to see what happens if nothing is axis reversed just for giggles.

    -mark

  12. avkills 2009/09/03 at 16:54 - Reply

    Actually, I removed all the axis removal and just negative multiplied the Y POS by -100; I am going to see what this does.

    -mark

  13. avkills 2009/09/03 at 17:33 - Reply

    Petter,

    Do you have a direct email, I would like to send you this LW scene and AE project and see what you think.

    -mark

  14. Petter Sundnes 2009/09/03 at 19:11 - Reply

    send it to me via petter at mentalfish dot com

  15. Petter Sundnes 2009/09/03 at 19:22 - Reply

    @kat , how does FBX from LW to Fusion work out?

  16. William Vaughan 2009/09/16 at 02:24 - Reply

    Thanx for the killer tool. I’ll give it a go tomorrow at work!

  17. William Vaughan 2009/09/16 at 04:29 - Reply

    Did A quick test and it seems to work great…big thanx!

  18. JMCarrigan 2009/09/17 at 01:39 - Reply

    Wow. It certainly works. Lots of possibilities I never thought of.

  19. JMCarrigan 2009/09/17 at 01:39 - Reply

    Oh! And thanks loads. How do I register?

    • Petter Sundnes 2009/09/17 at 08:40 - Reply

      No need to register, just download it (link under video). Or were you thinking of something else?

  20. Kostas Filipidis 2009/09/17 at 19:31 - Reply

    Hi
    I have just downloaded the script and test it
    It does an excellent job for simple camera motions and for objects too
    BUT when i tried to rotate the camera to the bank axe everything went very wrong…DO you have any ideas??
    And another thing, i have used ATS plugin and your workflow it is much much easier
    Tomorrow i ll try it again to see if i can understand what really happens

    Thank you

  21. Michel 2009/09/18 at 18:59 - Reply

    Hi Petter!! awesome script!! been waiting for this since i use lightwave!! only one thing and maybe it’s because i did it wrong, but i rendered a movie of my sequence in lightwave witch was a simple board and the camera moving from right to left, when in after effect i see that the camera seems to make the good move, and when i add text wich should be on the board and moving according to the camera movement but it seems to move with a little offset and seems to be moving on the board… so if you can anwser.. sorry for the english i’m french canadian and not always comfortable with english!! thanks in Advance

    Michel

  22. Chad 2009/09/20 at 03:08 - Reply

    Nice lscript!

    For the life of me, I cannot seem to get this right. I am (hopefully) following your video correctly, but it seems as though I am doing something wrong. Is it too much to ask for you to post an example LW scene file and AE file to look at?

    Thanks!

  23. Chad 2009/09/20 at 06:48 - Reply

    Figured it out! Just a case of RTFM. πŸ™‚
    Once again, great lscript!

  24. Weezer 2009/09/21 at 13:37 - Reply

    Great stuff – looking forward to seeing how far you can push this script. You’ve achieved what the LW development team have failed to do in 20 years of coding! well done.

    • Petter Sundnes 2009/09/21 at 13:45 - Reply

      Hehe, thanks, at least NewTek has enabled the possibility of making scripts such as this. I’d rather have them work on the foundation so that it is as painless as possible to write such scripts. Having high hopes for scripting in CORE. I have one minor feature request that is outside of my scripting reach, and that is script access to FBX and Collada export.

  25. tinman 2009/09/29 at 23:44 - Reply

    this script looks great!
    I think scale should definitely be taken into account, maybe even Alpha (though it would be easier to do alpha in AE if you were working with this setup from the start).
    Whoever doesn’t need those properties can simply not link them.

    It would also be nice to have a script in after effects that links allt he required properties.

    Great Work!

  26. druitre 2009/09/30 at 13:03 - Reply

    Just used it and it works… fantastic, thanks! Although it looks as if I have to set FOV/zoom/backplate size manually? It came in with totally different values than what my LW camera is set to. Or is that dependent on aspect/resolution in LW?

  27. sirius156 2009/10/20 at 14:00 - Reply

    SOOOOOOO cool, im gona test it and thank you after… πŸ˜‰

  28. Charly 2009/10/27 at 19:48 - Reply

    I am definately looking forward to your plugin from AE to Lightwave. This would mean I could do the cameratracking in AE and create all the good stuff in LW πŸ˜‰ How is that plugin coming?

  29. Petter Sundnes 2009/11/25 at 18:07 - Reply

    Pardon my late reply Charly, I just wanted to tell you that you can use this script for AE to export your comp as LightWave scene: http://aenhancers.com/viewtopic.php?t=991

  30. chibi 2010/01/22 at 15:28 - Reply

    In the video, what is the anchorpoint,trans,scale of the logo.png in AE at the start? How is it matched to lightwave scene logo? Would it be possible to post the sample AE and lw file to follow the tutorial? Thanks.

  31. Ilya 2010/03/04 at 10:21 - Reply

    we have a Lightwave 7.5 und Script seems not to working there… Is any workaround? πŸ™

    • Petter Sundnes 2010/03/08 at 01:35 - Reply

      I don’t think so, I believe many of the features I am using in LScript is requiring a later version of LightWave, but I’ll take a look.

  32. Steve Skinner 2010/03/11 at 15:41 - Reply

    Hey Peter. I appreciate your work. I am very new to lightwave. I would like to know how to install this plugin so that it shows up as it does on your interface. I am running Mac OSX 10.6 LW version 9.2

  33. Adam 2010/06/25 at 15:58 - Reply

    Hey Peter, thanks for a great script! I’ve tried FBX, RLA, RPF, TransMotion, and everything else, and your script is by far the best for translating movement into AE.

    The only problem I’m having is that when I use a camera that has animation in the B rotation channel (banking), the movement doesn’t come into After Effects properly. Any ideas for a fix for this?

    thanks man!

  34. bonbon 2010/08/11 at 11:33 - Reply

    Is it impossible to use CS5?

  35. steve 2010/08/18 at 16:37 - Reply

    can’t figure out how to install and get button in LW 9.6 64 bit.

    i opened the lsScript in a text editor to see that it’s pointing to AE cs4.

    i can run the lsscript and also see a folder next to my LW scene with your new .ma file.

    i just don’t know how to get it into ae or get the script to launch ae.

    any help greatly appreciated.

    best,

    steve

    • Petter Sundnes 2010/09/24 at 14:50 - Reply

      You install the LScript just like a regular plugin and assign it to a menu position by going to Edit -> Edit Menu Layout or pressing Alt + F10.

  36. Kolin 2010/09/17 at 02:04 - Reply

    Still trying to figure this out. It seems to line up reasonably well but there are points where it seems to slip. I noticed that the motion curves in LW are somewhat different than how they come into AE. For instance i have a totally linear change in camera rotation in LW that comes into AE as a noticeable curve. Any clue as to why this might be?

    Thanks so much for creating a great tool. Not sure why this isnt built into LW. I loose business to C4D regularly because of this.

  37. daforum 2011/02/12 at 13:27 - Reply

    Love using this script, and following your video tutorial makes it so easy to use πŸ™‚

    Would it be possible to update the script so users don’t have to change the expression on the Point Of Interest to “position” or is this necessary?
    (ie:it’s already set-up so just have to pick-whip the Position and X,Y,Z rotation channels)

    • MentalFish 2011/03/04 at 12:36 - Reply

      Could perhaps make some automatisation of it in AfterEffects, but for now it has to be done manually.

  38. Gilbert Chavarria 2011/07/23 at 02:12 - Reply

    great script. super easy to use, but i’ve seen several others have issues with the banking of the camera. is there a workaround for this issue? thanks.

    • MentalFish 2011/07/23 at 16:15 - Reply

      Could be that the banking value needs to be reversed, you can open the script in the text editor and play around with the values (multiplying with -1 and what not to reverse it).

      • Gilbert Chavarria 2011/07/24 at 02:01 - Reply

        Thanks for the suggestion. I tried it, but it doesn’t seem to be a reversal issue. When the LW-camera has Bank values, it seems cause the AE-camera to drift away from the original position (when compared to the render out of lightwave). Removing the Lw Bank values, fixes the drift. Of course, the AE-Bank does not match anymore, but the rest of the values match up perfectly. I’ll just avoid Banking the camera. Thanks. AWESOME script.

  39. Kevin 2011/09/04 at 17:25 - Reply

    Greetings, and thank you. right now I get the Error File C:\referencing the script line 12 Script type generic differs from it’s architecture I am running 9.61 bld 1555 and ignorant of Lscripting. Any pointers would be most appreciated.

    Thank You

    • MentalFish 2011/09/14 at 07:42 - Reply

      Sorry for the late reply, but I have no idea what that error means. Perhaps you can post about it in the NewTek forums?

  40. tokkonv 2011/10/31 at 12:23 - Reply

    please help me! how to install
    i’m windows user.

    • MentalFish 2011/11/14 at 08:20 - Reply

      You install it the same way any other LScript is installed. If it does not work, open up the script in notepad and check if it points to the right version of AfterEffects.

  41. Pedro 2012/02/04 at 04:16 - Reply

    Hey Peter! what a great script this looks like, I’ve followed your video to the T, and for some reason I cannot get the same result, my AE scene and my LW scene, seems off, I’m not that experiences in LW, but I rendered a camera going past a cube, and rotates a bit, when I render the scene from LW out, and do all the import and setup in AE, seems like my AE scene is either zoomed out too much, and if I try to match the zoom on the 3D camera, the movement is off.

    What am I doing wrong?

    Thanks in advance,

    • MentalFish 2012/02/08 at 13:37 - Reply

      Difficult to say right off the bat. I would recommend you give the new LightWave to AfterEffects plugin a go: http://www.liberty3d.com/tools/ae-link-plugin/

      If not, it sounds like a field of view mismatch if the movement is just slightly off. I have also heard people having some issues when there is a rotation around the Banking.

  42. Matt 2012/02/16 at 18:41 - Reply

    Hello Peter,
    I’m wondering why the plugin is greyed out in the edit menu layout? I added the plugin under utilities/plugins/add plugin… Please let me know how to fix this, many thanks!

    I have windows 7/ 9.61 win64

    • MentalFish 2012/02/19 at 21:28 - Reply

      It means it has already been added to the menu somewhere, but that does not mean you can’t add it again somewhere else. Just click on the grayed out item in the left side list, select where you want it in the menu in the right hand list and click “Add”.

  43. Jarrod 2013/10/10 at 00:52 - Reply

    Tried it out and it works great! Did some adjusting of the values to get the desired results in after effects for me but otherwise all good.

    Do you still plan to add scaling? Notice the thread goes back a few years. It looks like the code reads scaling information. I guess as it creates a camera they don’t have scale attributes. Would be handy,

    Also, if it created a null in ae instead (with scale :P) then I could alt-drag and replace the nulls with other elements (instead of copying and pasting keyframes).

    Thanks for creating this!

  44. Jarrod 2013/10/10 at 06:34 - Reply

    OK, so I have no scripting knowledge, therefore have no clue what I am doing, but I managed to edit the output .ma file so it substituted the camera for a null (maya locator), and it includes the scaling info from LW! Awesome! All I do is replace that with my clip and it works!

    I had to make it create another camera also as it seems without a camera Ae can’t create a comp.

    Now I just have to figure how to get your lscript to do this? :/

    Thanks again for this!

    • MentalFish 2013/10/10 at 11:56 - Reply

      Can you tell me how you swapped the camera with a locator in the text file, and I’ll add it as an alternative version of the LScript. I am at a loss in terms of how to add the locator in the .ma format and I can’t find any useful sample files by googlin’.

Leave A Comment