Archive for After Effects

More fun with sampleImage(): Ascii animation in After Effects

More experimentation with sampleImage(). This one relies on this expression.

target = thisComp.layer("");
samples = new Array();

var spacing = 10;
var w = target.width / spacing ;
var layerOrder = 1;
var h = 10 * layerOrder;

letters = "   .,:!-+=;iot76x0s&8%#@$";

for(x= 0; x < w; x++){
	samples[x] = target.sampleImage([x* spacing ,h],[spacing , spacing], false, time);

var string = '';

for(z = 0; z < samples.length; z++){
	var y = Math.round((0.299 * samples[z][0] + 0.587 * samples[z][1] + 0.114* samples[z][2]) * 100)/ 4;
	string = string + letters.substring(y,y + 1);


We loop through the row of pixels and place the sampled RGB pixels in the samples array, convert the RGB samples to YUV and grab the Y or brightness value for comparison against a rough gradient of ASCII values. For best results, use a monospace font to retain proper spacing. A more complete script/expression and breakdown to come.

Comments (7)

sampleImage() is fun

sampleImage() is a new layer method expression introduced in After Effects CS3 that allows you to access a layer’s color pixel data. Combined with sophisticated particle systems like Particular, I think we’re likely to see some really interesting designer driven explorations a la Processing, but with more of a tinkering, let’s try things out approach.

I’ll have more scripts, and automated stuff as I explore further, but until then you might want to take a look at the reference and examples that Dan Ebberts is posting at the brilliant

Comments (2)

Exporting Camera Data from After Effects to Cinema 4D

Paul Tuersley has written a script for exporting camera data from After Effects to Cinema 4D. Paul has also written an extensive brain dump on his process of writing the script and it’s a great example of how research and development of scripts and tools can take on a life of its own. I’ve talked to a couple of people lately who feel that scripting is just beyond their reach, but I hope by reading posts like Paul’s, folks realize that a bit of tenacity and letting a problem gestate and get under your skin until you “just have to solve this” goes a long way to developing really useful tools.

Paul was also kind enough to send me his upgrades and update to my Auto Rig Script for After Effects. I’ve posted his version of the script and I hope to make his changes permanent once I can get some field testing of it working out in all situations. So, I’d appreciate it if you’d download it and give me feedback if you have any issues.

Great work Paul!

UPDATE 04.24.2007

Paul posted a project ( set up to animate the null instead of the camera that will allow the use of motion paths addressed in the comments below. It also sounds like Paul has a lot of ideas about new features and is looking for feedback at the thread he’s set for the script at aenhancers.

UPDATE 06.09.2007
Paul has updated his script to version 1.1

Paul writes…
I’ve posted a new version of that AEtoC4D script that exports normal
AE cameras, and more.

AE to C4D

Comments (9)

Final Cut Pro to After Effects Scripting without the hassle

With the release of Automatic Duck as a free product there really isn’t a great reason to use this script except as an example of XML parsing and Comp creation from parsed properties. For general FCP to AE workflows I’d recommend downloading Automatic Duck Pro Import AE 5.0. Depending on what happens with FCPX and After Effects I may write new tools for import from FCPX.

One of the most popular pieces of content here is Moving Between Final Cut Pro and After Effects: The Scripting Option. I think the idea of using scripting to move between Final Cut Pro and After Effects resonated with people working in a production environment.

Unfortunately, the post was more of a tech demo of the kinds of things that were possible with After Effects scripting and less of a practical demonstration for non-technical users. I still urge non-technical folks to dip their toes into the scripting waters, it can be really rewarding, but the challenges presented in “rolling your own” in this situation may be a bit much. So, I decided to write a small application to provide a way for readers who don’t want to deal with the scripting hassle to use some of the techniques I described in the article.

FCPToAE (working title) is an application for OSX 10.4 and above designed to create a .jsx file from a Final Cut XML file for import into After Effects without the hassle of scripting the different parts yourself. Read the rest of this entry »

Comments (231)

Using Apple Motion with Adobe After Effects

Looks like Apple’s chocolate is in Adobe’s peanut butter, or is it the other way around? Import Motion Files Into Adobe After Effects is an Apple tutorial on how to bring Motion files into After Effects.

The cool thing about Motion files is that the project format is a well formed XML file that Quicktime understands how to render. That’s how you get cool products like Digital Heaven’s Automotion. If you’ve got more of a DIY bent, that also opens up a lot of possibilities for creating cool projects via XML transforms and scripting. More to come as I explore some of the possibilities.

Update 03.08.2007

While I was researching, it looks likes the folks at motionsmarts have already been hard at work with cool scripts for Motion. After Effects Position to Motion Position script looks particularly useful for the kind of stuff I do.

Comments (2)

After Effects Background Render Script from Lloyd Alvarez

Lloyd Alvarez recently released his BG Renderer script for After Effects 7 which will work with both Mac and Windows. BG Renderer is a handy script for managing background rendering tasks including launching multiple instances if you have multiple CPU’s. Lloyd’s put a lot of work into this script and it shows.

If you’re looking for commercial software to get more bang for your rendering buck, take a look at Nucleo and Nucleo Pro from GridIron software.

Comments off

Great After Effects Scripts

As I take a chance to catch my breath after a bunch of big projects, I’ve been taking a look around to see what’s happening with other folks. While I was doing research I ran across the scripts, expressions and experiments at nabscripts is written in french so although I’ve noticed it in the past, it’s on my blogroll and nab is a regular poster at aenhancers, I haven’t dug into his (her?) site as much as I might normally.

Well, recently I ran across his collected scripts in english, and I must say they are a really nice set of scripts. I particularly like the auto orient camera script and createCylinder script. There are also a ton of utility scripts for making your every day life easier. The script collection section is also available in the original french. Nice work all around.

Comments (3)

After Effects 7 hanging on “Initializing User Interface” fix

Have you had After Effects 7 hang on Initializing User Interface on start up? Like so…

Initializing User Interface startup screen

I’ve seen a couple of instances of this problem and it seems to occur when a User Workspace becomes corrupted. The fix that’s worked for me is to replace the folders at

YourLoginName/Library/Preferences/Adobe/After Effects/7.0/ModifiedWorkspaces/


YourLoginName/Library/Preferences/Adobe/After Effects/7.0/OriginalUserWorkspaces/

with backups. If you don’t have a recent backup, you can delete these folders and they’ll be recreated but you’ll lose your custom workspaces.

I’ve only had this crop up on OS X machines to this point, so I haven’t dug into the custom workspace definitions locations for Windows. If anybody has had to track this down for Windows could you leave a comment or send an email to dale(at remove-this)creative-workflow-hacks(dot)com and I’ll update this post.

UPDATE 11-18-2006 David Baertsch writes…

After reinstalling AE 7.0 for Windows, my system would hang on “Initializing User Workspace” I googled that
and got to your fix for Mac, that sent me in the direction to find the fix for Windows.

C:Documents and SettingsUserNameApplication DataAdobeAfterEffects7.0ModifiedWorkspaces

“UserName” is the name of the logged in individual, and the UserWorkspace1.xml files are the saved
workspaces… I deleted them and though my Workspaces were deleted, Aftereffects launched fine after
that. (There were several files UserWorkspaceX.xml)

Thanks for giving me the idea where to look. Hope this helps other users.

Comments (54)

Reading Quicktime Timecode in After Effects Redux: A Solution

When we were last talking about reading timecode from FCP sourced Quicktime’s I followed a tangent into Spotlight and other OS X technologies. Well, recently I revisited this problem for another project I’m working on and I think I’ve got a working solution for reading embedded timecode in After Effects on OS X.

timecodereader is a command-line utility that takes a path from After Effects via system.callSystem() and returns either the embedded timecode or the string . Right now the included .JSX script just writes that information to the console, but there are a lot of cool uses for Quicktime timecode in productivity scripts.

How to Use timecodereader

Download the zip archive, and either compile a new binary from the included XCode project or move the already compiled binary from build/release to a local binary directory. Since this is a command line tool you will want to move it to a location in your Path statement so you can use system.callSystem(“timecodereader ” + String(thisItem.mainSource.file))” instead of system.callSystem(“/path/to/timecodereader ” + String(thisItem.mainSource.file)) .

Update 09-09-2006: Lloyd Alvarez points out at aenhancers that AE preferers ~/bin/timecodereader when we set up as below. I’ve adjusted the enclosed script.

In the default Bash shell

export PATH="$PATH:~/bin"
echo 'PATH="$PATH:~/bin"' >> .profile

will setup a path to bin in your User directory. Move the enclosed script to your Scripts folder, select a Quicktime file in the Project window and we’re done.

When I run the script, I get these results (The 1:00:00:00 timecode is due to the fact that I’m using writeln to write to the console so the previous lines scroll up until they are out of view).

After Effects Project Window with Quicktime selected
After Effects Info Window with timecode displayed

I’ve tried timecodereader with quite a few Quicktime’s but obviously there might be a few that aren’t handled well, so consider this a beta release. The compiled binary is a universal binary so it should work on both PowerPC and Intel platforms. One gotcha, is that if you have a codec that is not compiled for the supported platform you might get a dyld returns 2 log message that might futz with your script. You can either work around it via string handling or remove the codec since it won’t work anyway. You’ll need to turn on Allow Scripts to Write Files and Access Network and turn off Enable JavaSript Debugger so we can eat the errors.

timecodereader requires After Effects 7, and OS X 10.4+

Updated file: 09.09.2006

Fixed a problem with external Hard Drives and Mounted Volumes. After Effects does not add /Volumes/ to drive paths like OS X, so /Volumes/MyHardDriveName is reported as /MyHardDriveNameI’m basically checking all mount points and adding /Volumes when appropriate, unfortunately the response is a bit slower if you have disk images or a lot of volumes mounted. If anybody knows anything faster send it my way.

Also. I’m using metadata checks for to check whether the file is a quicktime file. This only works on volumes that are indexed, so it might not work on mounted server volumes. I can add alternative QT detection if anybody finds it useful or necessary.

Zip Archive of Binary, Script and XCode Project

Comments (10)

Kona 10bit RGB/Trillions+ with Endian Option producing black frames?

Update 9/11/2006 6:20PMI said I’d update this post when updated drivers were available, and it looks like the 8/29/2006 drivers from AJA have addressed this issue. Download them here.

Update 8/19/2006 2:50PM OK. It appears that downgrading the codec to version 1.2 fixes the issue. Run the uninstaller, and grab the 1.2 codecs at Aja’s site. I’m going to leave this up for any future Google searches and I’ll update it when there is an upgraded codec. Thanks to Evan on this one.

I’m running into a problem with Kona 10bit RGB output with trillions+ that I’m hoping somebody might be able to help with since I’m on a really tight deadline. I’ve been happily producing 10 bit RGB quicktimes with trillions + option for weeks now. I bought several new machines that have introduced a new endian option in the compressor options like so…

big endian option

This is what all of our older machines with the same version of OSX, Quicktime and Kona drivers look like…

no big endian option

All of the Quicktimes we produce from the computers with the endian option produce black frames no matter what combination we use when trillions+ is selected. I’m aware of endian issues with the new Intel Macs vs G5 Macs, but I can’t seem to produce a working combination and like I said all software is up to date on all machines. I’m guessing a firmware issue or something. I’m hoping somebody has a working workaround and can send a comment or email to dale(at)creative-workflow-hacks(dot)com. Normally, I’d just go through tech support options, but my deadline is pressing. Thanks folks.

Comments off

« Newer Posts · Older Posts »