Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Inverse kinematics in 3D

  • Alex Printz

    March 3, 2020 at 7:57 pm

    Not really, AE isn’t (officially) capable of calculating and distributing multiple rotation values at once which you need to do for 3D rotation calculations, so you would have to do it on orientation which wouldn’t be optimal, given it’s based on shortest-distance calculations to itself rather than world.

    You could maybe cheat a lookAt expression on the orientation of an upper and lower limb and use an elbow and wrist controllers as targets, but it wouldn’t be true IK.

    Alex Printz
    Mograph Designer

  • Toms Burāns

    March 3, 2020 at 8:36 pm

    Hi, Alex!
    Thanks for your reply.
    I’m not sure I understand what you mean by “calculating and distributing multiple rotation values at once”.

    I’m far from an expert in trigonometry so I have not yet tried to implement this myself but it’s hard for me to believe that this is not possible with AE expressions. I mean, if you can do it in 2D why wouldn’t you be able (with a bit more math) do it in 3D? Can you explain a bit more why you think this is not achievable in AE?

    Thank you!

  • Alex Printz

    March 3, 2020 at 8:58 pm

    Because after effects 3D rotations are 3 different expressions: X, Y, and Z, while orientation calculations are matrix-based mathematics.

    https://en.wikipedia.org/wiki/Rotation_matrix

    After Effects expressions calculate independently one at a time; so an X-rotation is the first thing solved, then Y, then Z, etc, and the only thing that is shared is the final value.

    Matrix calculations need to be preformed all at once and are interdependent, so if you solve for one and apply it, it will affect the others. They have to all be done at once. 2D rotation is a single rotation, so it’s much easier to solve for.

    In the past I’ve built a 3D-based null that can steal the properties of other layers before, and the only way to solve for 3D rotation is to lock the rotation properties and instead use orientation, which is again going to be based on shortest path orientations and will (probably) give some incorrect results since orientation is not world-based, but object based.

    There might be a way to calculate the orientation back to the worldspace through a toWorldVec calculation, but that’s a bit beyond me off the top of my head.

    Alex Printz
    Mograph Designer

  • Toms Burāns

    March 3, 2020 at 9:36 pm

    Thanks for the explanation Alex!

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