Giter Club home page Giter Club logo

ae-blender-camera-export's Introduction

ae-blender-camera-export

This repo includes a script for After Effects, and add-on for Blender, that allows animated camera data to be exported from the former to the latter.

Installation / Usage (After Effects)

To install the After Effects script, first download it and then select it via File > Scripts > Install Script File...:

AE step 1

You'll need to restart After Effects after installing it.

To use it, you must first select the cameras you want to export:

AE step 2

Then, make sure you're in the Composition view:

AE step 3

And run the script:

AE step 4

After Effects Script Options

When you run the script, a dialog box will appear:

AE step 5

The settings are as follows:

Save to

Choose the destination of the exported camera data file. This file can then be imported into Blender.

Time range

  • "Whole comp": keyframes will be generated for the entire duration of the composition.
  • "Work area": keyframes will only be generated within the composition's work area.
  • "Camera layer duration": keyframes will only be generated within the duration(s) of the exported camera layer(s).

Comp camera is centered

If checked, the exporter will treat the center of the After Effects composition (half its width and height) as the 3D origin. This matches the Cineware option for using a centered comp camera, and if you select that option, you should check this box:

Centered comp camera option

Installation / Usage (Blender)

To install the Blender add-on, download, install, and then enable it via the add-on preferences:

Blender step 1

To import camera data exported from After Effects, simply navigate to File > Import > After Effects Camera data (.json):

Blender step 2

Then navigate to the .json file exported via the After Effects script. This will create cameras in your scene that match the exported After Effects cameras.

Development

If a script file depends on other script files, After Effects' "Install Script File" option will not work. To get around this, I've created a preprocessor script that lives in util/preprocess.py. To use it, simply run it via Python:

python3 util/preprocess.py

Or if you're on Windows:

py -3 util\preprocess.py

This will generate Export Camera Data to JSON.jsx.

If you're working on the script, you don't need to re-preprocess the file every time you make a change--the @include directives are also recognized by After Effects itself. Simply run the script file located in export-camera-from-ae via File > Scripts > Run Script File.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.