Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions baking camera for export – trouble with 3D rotations!

  • baking camera for export – trouble with 3D rotations!

  • Ryan Gilmore

    February 24, 2008 at 10:50 am

    baking the AE camera for export to 3D packages – trouble with 3D rotation

    I’m trying to share my AE camera with a number of 3D packages. What often helps is having a free camera that does not use a POI (target) or parenting before you export. So I was trying to write an expression to convert all values to global values to “unparent” my camera. The position so far works fine. I used Dan Ebberts’ 2D Auto Orientation script for the rotations as a starting point…which works fine one at a time, but not when the the axes are combined. Does it not work because of the rotation order? Anyone tackled this before?

    The layer “c” is my keyframeless child camera layer controlled by a parent null. Below are the expressions applied to the new free camera.



    X Rotation

    L = thisComp.layer(“c”);
    u = L.toWorldVec([0,0,1]);

    Y Rotation

    L = thisComp.layer(“c”);
    u = L.toWorldVec([1,0,0]);

    Z Rotation

    L = thisComp.layer(“c”);
    u = L.toWorldVec([1,0,0]);

  • Ryan Gilmore

    February 25, 2008 at 1:47 am

    Thanks to some direct help from Mr. Ebberts with the 3D rotations, I now have a script to share that will bake the AE camera. It shouldn’t matter what rotation methods and parenting the original camera has, as it translates all of that into a free camera with only position, rotation, and zoom parameters.

    All you have to do is set your work area, highlight your camera, and it will make a copy of it with all the keyframes baked.

    There are a number of advantages. Sometimes there is a need to export an AE camera to a 3D app, and baking the camera usually helps you avoid certain problems before you export. Also, there is an advantage to seeing the camera motion path on a free camera that’s invisible on a parented one. And, this script could easily be adapted to remove parenting or auto-orientation on any layer.

    (ps. there is no error checking in the script, so if you don’t highlight the camera it just quits at the moment)

Viewing 1 - 2 of 2 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy