ID_BASEOBJECT_ROTATION



  • 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?



  • 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).



  • 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.



  • 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?



  • 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);



  • 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.


Log in to reply