I'm looking for an expression, script, or option to filter the rotations of a 3d camera output from the camera tracker so that the rotations shown in the graph editor are allowed to be greater than 360 or less than 0. For example, I'm trying to avoid seeing the kind of graph in the image below when the camera is only rotating about 20 derees in any direction but the graph "pops between 359.xx and 0.xx quite often. This would make it much more intuative for me to read on modify the curves. Any ideas of how I can fix this?
Unlike 3D programs, AE does not have such a filter that adjusts the graph automatically. An expression might be as trivail as value % 360, though it still flips and pops between keyframes when the values jump over. At the end of the day you can't really avoid cleaning up your graphs, but I'm sure there are soem scripts on AEScripts.com that can help.
Thanks for your help. I had forgot that I ran into this problem earilier and I had found a solution many years ago buried on an old HD. It's called "advanced camera tracking.jsxbin". Can't seem to find it on google anymore, but it solved the problem.
The Camera Tracker does not manipulate Rotation. It only makes changes to Orientation on the One-node Camera that is created. Orientation is limited to X, Y, and Z values from 0º to 359º. There is no 360 value available. There is no way to count rotations.
You can't add an offset expression to Orientation and see the results in the Graph Editor because Orientation is one of the few properties that does not have a Show Post Expression Graph switch.
It would help if we knew what you were trying to do. You cannot modify any keyframed transform Properties Camera Tracking generates without fouling up the track. If you have a jittery track, you might be able to use the Smoother on Position, but Orientation has no smoothable (is that a word) properties. The only options are the Spatial Path and Temporal Graph.
There is a free Normalize Track script that I use all the time to reset the Camera Track starting point to the comp center. Normalizing the track makes using Element 3D, Particular, and other 3D effects easy. I don't know what you are trying to accomplish, so I don't know if the Normalize Track script would help.
Well you can always pickwhip and bake out the orientations to be rotations. I'm basically trying to get "human readible curves" in my graph editor that don't "pop" from 0 to 360 when they change by only 1 degree. I can
Sounds like a perfect job for Automation Blocks 🙂
If you want to pick-whip and bake the rotation values to 1D properties, you can then select these 1D properties and run the tool "Euler Filter 1D Rotation", which I just created for you. You find it in the Community Library of Automation Blocks now at
Layer Properties/Keyframes/Filter/Euler Filter 1D Rotation
If you are curious - this is what the full implementation of the tool looks like:
That's very interesting! I don't suppose this tool has anything that could support offsetting a tracked camera's orientation (or rotation) the "correct" way by converting the euler rotations to quaternions, performing the offsetting math, and returning the quaternions back to euler rotations?
If just processes each component individually and solves the pops from 359.x to 0.x, which you describe.
I.e. for each frame it checks the value of the previous frame and then chooses for the current frame among all the equivalent rotation valuesthe one that is closest to the value of the previous frame.