Generate 4x4 Matrix



  • On 16/06/2013 at 17:11, xxxxxxxx wrote:

    Hi

    I Need to generate a 4x4 matrix for the directx format - is there a way in cinema ?

    Thanks



  • On 17/06/2013 at 00:58, xxxxxxxx wrote:

    Cinema's Matrix is a 3x4 Matrix. What represents the additional component in the Direct X format?
    There is not way in Cinema because it doesn't make any use of it. Besides that, you need a
    definition of how to convert the 3x4 Matrix to a 4x4 matrix.

    FrameTransformMatrix {
    1.0, 0.0, 0.0, 0.0,
    0.0, 0.0, 1.0, 0.0,
    0.0, 1.0, 0.0, 0.0,
    0.0, 0.0, 0.0, 1.0;;
    } // Unit conversion to Pandoras Box
    

    From the Direct X file format snippet, it looks like you could just add zero values for the 4th
    components (and 1.0 respectively for the position vector). If this is correct, you have your definition
    and can now easily convert. :)

    -Niklas



  • On 17/06/2013 at 04:04, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Hi 
    I Need to generate a 4x4 matrix for the directx format - is there a way in cinema ? 
    Thanks

    Take a look at the class 'Matrix4' in the SDK (might not be supported in Python though, but it is in C++).

    Steve


Log in to reply