After Effects to Blender Script

After Effects to Blender Script

For the video production work that we do here at Blueprint, After Effects is essential. In animation projects and graphics projects for live-action videos, After Effects works wonders in compositing and for other graphical post-production work.

After Effects comes bundled with Cinema 4D lite, which as the name implies, is a scaled down version of C4D. It works well for certain types of production, but we have found we can get more functionality and creative freedom using Blender 3D.

Now, it is nowhere near as easy to move back and forth between these softwares as between AE and C4D. Unless we get a little help.

Using Scripts For Video Production | Blueprint

Thanks to Atom, a member of the Blender Artists forum, there is a great .jsx script that can be run on elements in your After Effects composition that will actually export these elements into a Blender friendly format, Python. The script can be found here.

Since it is just a .jsx script, it is very simple to use, and you can export just about anything. Now of course, whatever you export won’t necessarily import “as-is” into Blender. The script is mainly meant to facilitate matching camera movement between the two programs.

To use the script, simply download the .zip file and unpack it. In After Effects, with your composition open, select File>Scripts>Run Script File. Navigate to the unpacked .jsx file, and open it. A dialogue box will pop up. Select your camera layer, and any other layers you want to export, and then click “export.” A moment later the script will generate a python script that you can execute from the text editor in Blender.

To execute the script in Blender, open a project and navigate to the text editor. Click open file and navigate to where you saved the exported python file. Open the file, and then click “Run.” The 3D viewport should then populate with the camera and empties representing elements in your composition.

One problem you might run into is a formatting issue. When I have opened the exported python file in Blender, the script has appeared as one long line of text, instead of a properly formatted python script with standard indentation and white-spacing.

In this format, it is obviously not executable. One workaround to this issue that has worked for me is first opening the saved python script in Adobe’s Edge Code application, and then doing a “Save-As” of the script, as itself. Edge Code will properly format the script so that the next time you open it in Blender it will be executable.

In combination with Bartek Skorupa’s handy Blender to AE .jsx exporter addon for Blender, this script by Atom really goes a long way for setting up a functional two-way production pipeline between Blender and After Effects, which for us has opened up a world of creative opportunity

By: John
  • Aaron Ward

    Working with cameras in blender is soo much better that working with the cameras in After Effects. Now its nice that you can record all the movements using blender and then import it easily into After Effects to create your video. Great job.

  • Jeff Cline

    John, I’m always amazed at the levels you are able to push video production and you know how much I enjoy peeking in to see what you are working on next. While I’m no expert in video I know from every other aspect of marketing I’ve worked in having the right tools and “work-arounds” can mean a world of difference both in quality of the finished product as well as the speed in which you can produce.

  • Naima

    Very informative article! I had no idea how blender works. Thank you for sharing these helpful tips that can transform basic videos into high quality videos.

  • Thanks for this post, John. Technology is making video more accessible for all types of businesses. Understanding how to use tools and workarounds like Blender and After Effects is very important to getting the most out video.

  • Samantha Torres

    So thankful for the great video team we have here at Blueprint. It’s expertise like this that enables you guys to create such amazing content!

  • Victoria Vener

    I love mini tutorials like this. I really like that you included a workaround for a possible formatting issue. Expertly explained!

  • Chuniq Inpower

    Where can I admit that this went far over my head? Like @samtorresseo:disqus said, its the “expertise” with this team that makes a great difference!