Export camera to After Effects

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

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

Export camera to After Effects

Postby ponysmasher » Sun Dec 26, 2010 7:15 pm

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.
User avatar
ponysmasher
 
Posts: 370
Joined: Thu Aug 05, 2004 2:23 am
Location: Los Angeles

Postby funksmaname » Sun Dec 26, 2010 10:47 pm

sweet!
User avatar
funksmaname
 
Posts: 3101
Joined: Tue May 29, 2007 11:31 am
Location: Nelson, New Zealand

Postby aRh » Mon Dec 27, 2010 4:15 pm

Many Thanks!.. BTW is this works with ASP 5.6 too?
aRh
 
Posts: 20
Joined: Wed Aug 01, 2007 5:52 am

Postby Víctor Paredes » Mon Dec 27, 2010 5:30 pm

Great. It remembers me another script:
Export bone position to After Effects & Particle Illusion
http://www.lostmarble.com/forum/viewtopic.php?p=92202

This script will be very useful to me. Thank you very much :)
Víctor Paredes - Former Moho 12 Product Manager
My Youtube Channel - My webinars
User avatar
Víctor Paredes
 
Posts: 4735
Joined: Wed Jan 26, 2005 12:18 am
Location: Chile

Postby ponysmasher » Mon Dec 27, 2010 6:14 pm

selgin wrote:Great. It remembers me another script:
Export bone position to After Effects & Particle Illusion
http://www.lostmarble.com/forum/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...
User avatar
ponysmasher
 
Posts: 370
Joined: Thu Aug 05, 2004 2:23 am
Location: Los Angeles

Postby Víctor Paredes » Mon Dec 27, 2010 6:50 pm

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
Víctor Paredes - Former Moho 12 Product Manager
My Youtube Channel - My webinars
User avatar
Víctor Paredes
 
Posts: 4735
Joined: Wed Jan 26, 2005 12:18 am
Location: Chile

Postby xothermik » Thu Aug 04, 2011 2:51 am

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?
User avatar
xothermik
 
Posts: 103
Joined: Fri Nov 13, 2009 12:22 am
Location: abuja, nigeria

Postby funksmaname » Thu Aug 04, 2011 3:21 am

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! :)
User avatar
funksmaname
 
Posts: 3101
Joined: Tue May 29, 2007 11:31 am
Location: Nelson, New Zealand

Postby ponysmasher » Thu Aug 04, 2011 8:48 am

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.
User avatar
ponysmasher
 
Posts: 370
Joined: Thu Aug 05, 2004 2:23 am
Location: Los Angeles

Postby xothermik » Thu Aug 04, 2011 5:44 pm

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?
User avatar
xothermik
 
Posts: 103
Joined: Fri Nov 13, 2009 12:22 am
Location: abuja, nigeria

Postby xothermik » Thu Aug 04, 2011 5:54 pm

thanks guys i figured it out.
User avatar
xothermik
 
Posts: 103
Joined: Fri Nov 13, 2009 12:22 am
Location: abuja, nigeria

Postby neon22 » Sun Oct 02, 2011 10:09 pm

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...
User avatar
neon22
 
Posts: 51
Joined: Tue Aug 28, 2007 5:41 am
Location: New Zealand


Return to Scripting

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 1 guest