Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    ID_BASEOBJECT_ROTATION

    Scheduled Pinned Locked Moved SDK Help
    6 Posts 0 Posters 392 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 12/10/2010 at 18:58, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R12 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      For rotation CTracks, what is the vector format of ID_BASEOBJECT_ROTATION ?
      Is it in XYZ euler radians or HPB radians?
      I searched the docs, but couldn't find much info about it.
      Also, if I was importing rotation tracks, is this the only format allowed?
      Can I import rotation tracks as quaternions or matrices, and let Cinema4D figure out the format?

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 12/10/2010 at 19:09, xxxxxxxx wrote:

        All rotations are stored internally as HPB (including animation).

        You could apply quaternions or matrices to animation (not tracks directly!).  Since C4D stores the rotation animation tracks as separate components (x, y, z 'HPB'), you cannot directly apply quaternions or matrices to the animation tracks/keys.  That said, you can certainly do this in a plugin using non-standard tracks/keys (I use value keys for my InterPoser Pro plugin which are simply interpreted into matrices by my plugin bone deformation system).

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 12/10/2010 at 20:19, xxxxxxxx wrote:

          Thanks, I was afraid of that.
          I'm sure this topic has been beaten to death, but are there no SDK functions to convert XYZ euler to HPB?
          Are these any help?
          Vector VectorToHPB(const Vector& p);
          Vector MatrixToHPB(const Matrix& m);
          How does Cinema4D import FBX files with Euler rotation keys?  If they can do it with FBX files, then there must be a solution.

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 13/10/2010 at 10:51, xxxxxxxx wrote:

            Who wrote the FBX plugin for Cinema4D?  Could they take a peek at the source code and give us a hint at how they imported
            FBX animation rotation curves with XYZ Euler angles?  Did they use SDK functions or their own code?

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 13/10/2010 at 12:51, xxxxxxxx wrote:

              The simplest way to convert XYZ Euler to HPB is to concatenate a matrix using MatrixRotX()/Y()/Z() :

              // For a strict XYZ Euler order (note the concatenation order!)
              // For other orders, rearrange the terms accordingly
              Matrix rotMat = MatrixRotZ(zrot) * MatrixRotY(yrot) * MatrixRotX(xrot);
              Vector hpbVec = MatrixToHPB(rotMat);

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 13/10/2010 at 15:31, xxxxxxxx wrote:

                Originally posted by xxxxxxxx

                The simplest way to convert XYZ Euler to HPB is to concatenate a matrix using MatrixRotX()/Y()/Z() :

                // For a strict XYZ Euler order (note the concatenation order!)
                // For other orders, rearrange the terms accordingly
                Matrix rotMat = MatrixRotZ(zrot) * MatrixRotY(yrot) * MatrixRotX(xrot);
                Vector hpbVec = MatrixToHPB(rotMat);

                Thanks!  That works very well for me.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post