Export camera to After Effects

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Rowan
Posts: 19
Joined: Mon Apr 23, 2018 4:29 pm

Re: Export camera to After Effects

Post by Rowan »

Thank you for this script! It's a real lifesaver.
User avatar
rafael
Posts: 129
Joined: Thu Feb 11, 2016 4:51 am
Location: Nomad
Contact:

Re: Export camera to After Effects

Post by rafael »

So how does one actually export the camera using this? I've got it installed, I've got a camera I need to export, I click the button, the button highlights and in the top-left of the UI it says "Export camera data to After Effects" but nothing actually happens. I know I must be doing something wrong...
User avatar
synthsin75
Posts: 9968
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Export camera to After Effects

Post by synthsin75 »

rafael wrote: Sun Jun 13, 2021 7:12 pm So how does one actually export the camera using this? I've got it installed, I've got a camera I need to export, I click the button, the button highlights and in the top-left of the UI it says "Export camera data to After Effects" but nothing actually happens. I know I must be doing something wrong...
If it doesn't come with a png icon, install it as a menu script.
User avatar
rafael
Posts: 129
Joined: Thu Feb 11, 2016 4:51 am
Location: Nomad
Contact:

Re: Export camera to After Effects

Post by rafael »

So I can see the icon in the UI, but when I click on it, nothing seems to happen. As an experiment, I clicked on 'DS layers to AE' and a window popped up. Should a window pop-up when I click DS Camera to AE?

I've since decided to just fake the camera move in AE with a large render from Moho, but it would be cool to figure this out so I can use it in the future.
User avatar
synthsin75
Posts: 9968
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Export camera to After Effects

Post by synthsin75 »

Install it as a menu script.
User avatar
Greenlaw
Posts: 9258
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Export camera to After Effects

Post by Greenlaw »

@rafael,

I tried it and it appears to work fine with Moho 12.5 and 13.5. To use it, just run the script from the Menu like Wes describes, and it will save a text file. Then, copy the text file contents, launch Ae, create a camera, and paste the contents to the camera. The camera should now have the Moho camera's animation keyframes including the lens.

So, to install the script:

1. Select File>Open Custom Content Folder
2. Open Scripts>Menu
3. Copy the script to an appropriate folder here. (I have a folder called '+Special' in this folder. The plus sign keeps this sub-menu at the top of the Menu list.)

Note: I only tested that the data was transferable. ATM, I do not have time to test for accuracy, so if you could check that and report here, that would be cool. Thanks!

Hope this helps.
Last edited by Greenlaw on Tue Jun 15, 2021 10:33 pm, edited 3 times in total.
User avatar
Greenlaw
Posts: 9258
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Export camera to After Effects

Post by Greenlaw »

BTW, I believe there's a companion script out there that exports the layer positions (probably as nulls?) If it exists, you'll want to install that script too for the camera data to be useful in Ae. (Sorry for the sketchy info...it's been a long time since I used this.)
User avatar
Greenlaw
Posts: 9258
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Export camera to After Effects

Post by Greenlaw »

I found it.

Go to David Sandberg's website and look under Other.

https://www.dauid.com/other.php

David has packaged all of his Moho scripts into a single .zip file. I believe the companion script is called 'ds_layer_to_ae.lua' and it's located in the MenuScripts.zip inside the main .zip.

(I need to check these out when I have time. I think there's a lot of fun stuff I can use here.) :)
User avatar
rafael
Posts: 129
Joined: Thu Feb 11, 2016 4:51 am
Location: Nomad
Contact:

Re: Export camera to After Effects

Post by rafael »

Installing to the "Menu" folder did the trick! I'll definitely be using this and the layers thing in the future. Thanks y'all!
User avatar
CandyCoated
Posts: 17
Joined: Wed Aug 09, 2017 1:44 pm

Re: Export camera to After Effects

Post by CandyCoated »

I've been looking for a way to do just the opposite. Bring camera data in from AE. (Really I want it from C4D, but I can go through AE as an interim since that's where I composite everything anyway)

Anyone ever seen a script for that? or if it's even possible?
User avatar
Greenlaw
Posts: 9258
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Export camera to After Effects

Post by Greenlaw »

It would be useful but unfortunately I'm not aware of any scripts to send the Ae camera and layers to Moho.

When I have a 3D camera setup in Ae, I animate my Moho elements 'in place', then place the Moho renders in Ae (or Fusion or Nuke) for the 3D compositing. I've done this countless times over the years and it's always worked well.

Actually, I do this routinely for 3D animation programs too: render 'in place' in Moho, then map the renders to cards in my 3D program for the 3D animation. Sometimes this can be significantly easier because of the 3D program's superior camera controls.
User avatar
Greenlaw
Posts: 9258
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Export camera to After Effects

Post by Greenlaw »

CandyCoated wrote: Wed Jan 05, 2022 7:29 pm I've been looking for a way to do just the opposite. Bring camera data in from AE. (Really I want it from C4D, but I can go through AE as an interim since that's where I composite everything anyway)

Anyone ever seen a script for that? or if it's even possible?
Moho has some basic support for exporting FBX but I wish it could import a camera from an FBX. Since Moho doesn't support nulls or locaters, the camera motion will need to be baked of course. I would be useful if Moho could also convert nulls or locaters from an FBX and convert them into group layers since that's the closest equivalent we have in Moho.

Improved i/o for FBX would expand compatibility with many 3D animation programs as well as compositing programs like Fusion and Nuke. Well, except for Ae, which doesn't natively support FBX but I think it's available as an add-on for people who need it. I don't use C4D but I'm sure it supports FBX like most 3D programs.

I'll submit a request for this.
User avatar
Greenlaw
Posts: 9258
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Export camera to After Effects

Post by Greenlaw »

Shoot! I found an article about a script to import FBX to Ae but unfortunately the link to the script is dead: https://lesterbanks.com/2015/06/import- ... r-effects/

On a related topic, one of the features that was added to Cartoon Animator 4 Pipeline last year was a CA4P to After Effects data link. From what I recall, this feature recreates the CA project inside Ae along with the camera and maintains a link between the two programs. It's actually kind of a hybrid exchange where deforming animations are pre-rendered as image sequences and layer transforms are baked down as motion keys for compatibility with Ae, and the cameras are synced up. I'm not 100% sure but with this system I think certain Ae changes will also update to the CA project too.

I haven't used this feature myself yet but if it really works and works well it might be neat to see something like this developed for Moho and Ae. I'll try this feature in CA4P this weekend and post what I think about it here.

FWIW, something like this was developed for LightWave 3D and Ae years ago and it was a really good system for sending camera data and null animations back and forth between the two programs. I still use this system occasionally. This also exists in Maya but I haven't used it yet. (I'll check it out since at work I'm mostly animating in Maya lately.)
User avatar
LeviFiction
Posts: 18
Joined: Thu Jul 10, 2014 4:19 am

Re: Export camera to After Effects

Post by LeviFiction »

Checking the waybackmachine the article points to a webpage that then points to this page - https://aescripts.com/fbx-to-ae/
User avatar
CandyCoated
Posts: 17
Joined: Wed Aug 09, 2017 1:44 pm

Re: Export camera to After Effects

Post by CandyCoated »

Thanks Greenlaw. There is already a super strong link between AE and C4D. That's why I'm hoping to find a way to do it as AE<-->Moho. That way I could use it with both AE and C4D. For now, I'm approximating the needed motion, rendering a sequence from moho and displaying that on a plane in C4D. It works for the most part, but I'm always looking for more control.

Can't wait to hear how your testing goes.
Post Reply