Page 1 of 3

Export camera to After Effects

Posted: Sun Dec 26, 2010 7:15 pm
by ponysmasher
Here's a menu script that exports the camera movement to After Effects keyframe format.

Get it here: ds_camera_to_ae.zip

I've had problems (and long render times) with large images in AS pro so I wrote this to make my life easier.

It gets the camera information between the in and out point of the project and gets the camera values from every frame, not just the key frames. This is done for maximum accuracy and it's like when you track a layer in After Effects.

I haven't tried anything too advanced yet, but it seems to work.

The left image is animated in AS, the right is a still frame in After Effects with imported camera motion.
Image

Here's an example of using the script:

Let's say I want these two characters standing on piles of money with the camera moving.
Image

I render out the animation with the characters as PNG files (I want a transparent background) and export the camera movement to a text file.
In After Effects I import the rendered frames and Import a high resolution image of the money (that I scale down appropriatley for the scene).
Image

If I look at the animation right now it looks like this:
Image

But now I set the image layer to 3D (the layer with the guys should NOT be set to 3D as this layer already has the camera movement rendered).
Image

And then create a camera.
Image

I go to the text document with the camera movement (the one exported from AS) and copy the text inside.
Image

I select the camera layer in After Effects and paste (Edit-paste or CTRL+V)

And there we go.
Image

Of course you could add several other 3D layers and arrange them in 3D space and build an environment that way.

You can also import Illustrator files in After Effects, just make sure to click 'Continually rasterize' so you can scale it without getting a mess of pixels.

Note: When pasting keyframes in After Effects they will start from the frame you are on at the moment, so it doesn't matter if the keyframe data in the file starts at some other frame.

Posted: Sun Dec 26, 2010 10:47 pm
by funksmaname
sweet!

Posted: Mon Dec 27, 2010 4:15 pm
by aRh
Many Thanks!.. BTW is this works with ASP 5.6 too?

Posted: Mon Dec 27, 2010 5:30 pm
by Víctor Paredes
Great. It reminds me another script:
Export bone position to After Effects & Particle Illusion
viewtopic.php?p=92202

This script will be very useful to me. Thank you very much :)

Posted: Mon Dec 27, 2010 6:14 pm
by ponysmasher
selgin wrote:Great. It reminds me another script:
Export bone position to After Effects & Particle Illusion
viewtopic.php?p=92202
Oh, I haven't seen that script! *download*

We really should make a site for all AS scripts with categories and a search function. Maybe I'll do it myself. I'll just have to figure out a way to make the days a couple of hours longer first...

Posted: Mon Dec 27, 2010 6:50 pm
by Víctor Paredes
ponysmasher wrote: Oh, I haven't seen that script! *download*

We really should make a site for all AS scripts with categories and a search function. Maybe I'll do it myself. I'll just have to figure out a way to make the days a couple of hours longer first...
We thought about that some time ago. I contacted a programmer, but he never even started the project.
anyway, check this old thread. If you could make something that would be just awesome. And I'm pretty sure if we contact Smith Micro with a concrete project they will give us some space on their servers :D

Posted: Thu Aug 04, 2011 2:51 am
by xothermik
hi. this script is just what i need for my current project. i seem to be having problem pasting the text file into the AE camera. could it be because of my AE version? im using cs3. so far i'v tried selecting the camera layer and control v-ing without any result. can someone please help?

Posted: Thu Aug 04, 2011 3:21 am
by funksmaname
did you copy all the text out of the file that's created first? (open the export file and copy all that text first before pasting)... I assume you did but you never know! :)

Posted: Thu Aug 04, 2011 8:48 am
by ponysmasher
I have problems with pasting in both After Effects and Photoshop. Restarting the application usually helps.

It's really annoying when you copy an image in an external application and Photoshop keeps pasting the previous image from the clipboard while other applications paste the new image. I don't know how that even works.

Posted: Thu Aug 04, 2011 5:44 pm
by xothermik
did you copy all the text out of the file that's created first? (open the export file and copy all that text first before pasting)... I assume you did but you never know! Smile
yes i did. do you just select the camera layer and paste or is there a particular text dialogue u bring up and paste into?

Posted: Thu Aug 04, 2011 5:54 pm
by xothermik
thanks guys i figured it out.

Posted: Sun Oct 02, 2011 10:09 pm
by neon22
ponysmasher wrote:I have problems with pasting in both After Effects and Photoshop. Restarting the application usually helps.

It's really annoying when you copy an image in an external application and Photoshop keeps pasting the previous image from the clipboard while other applications paste the new image. I don't know how that even works.
I believe this is happening when your graphics card runs out of memory.
Had it a lot when I had a 256MB card. Now I have 2GB - never happens anymore :-)

As usual - you just need money - piles of money...

Re: Export camera to After Effects

Posted: Wed Sep 18, 2019 10:54 am
by Víctor Paredes
Hi! I know this is an old thread, but do you know if this could work in the opposite way? Here we are looking to import the camera keys from After effects to Moho.
Any ideas about that?

Thank you very much.

Re: Export camera to After Effects

Posted: Wed Sep 18, 2019 3:59 pm
by Greenlaw
I've wanted that too.

One 3D animation program I use at work called LightWave has a native script the sends the camera or nulls directly to AE, or from AE back to LightWave, with a single button click. I'd like to see something like this added to Moho.

Some 3D animation and compositing programs, can transfer camera and other elements through the FBX format. For example, I use this to transfer camera data, objects and nulls from LightWave or Maya to Fusion. This won't help for AE since it doesn't support FBX, but since Moho partially supports FBX now, it would be cool if it got support for the camera (and other elements if possible) for other animation/compositing programs to use.

Re: Export camera to After Effects

Posted: Thu Sep 19, 2019 12:11 am
by mrc
Yes, camera data exchange via FBX would be excellent.