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

    Generate 4x4 Matrix

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 279 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

      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

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

        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

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

          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

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