Processing to After Effects

Background

I have been an avid user of Processing for quite some time and have enjoyed investigating many different uses for it. Whenever Processing is mentioned in the motion graphics community its potential importation into After Effects is always discussed. To date there has been no documented attempts, that I have come across, to marry Processing with After Effects in any significant way. Everyone including myself, simply saves either image sequences or movie files from Processing much the same way you render animation from a 3D app and import into AE for compositing and post effects. This is a proven workflow and has been used repeatedly in both experiments and commercial work, however, it does not afford much latitude when it comes to editing the animations after they have been "rendered".

Objective

My objective in this experiment was to create a more literal connection between my Processing apps and After Effects. I wanted to be able to translate the "objects" from my Processing animations into After Effects comps. More specifically my goal was to export position, rotation, and scale data from Processing and apply it to a layer in After Effects.

Solution

The initial solution that I have developed simply saves the "object's" property values for each frame into a structured text file from Processing. I then created an After Effects script which reads this structured keyframe data and applies it to a layer in After Effects. In it's current iteration this is not a terribly sophisticated solution, but it works and allows me to create motions and behaviors in Procesing, that I wouldn't be able to create in After Effects, and then edit both the motion and look in After Effects.

Example of workflow in action:

Example of a quick experiment made with this workflow:

Example of a more complex behavior: