• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    [ANSWERED] Inverse kinematics using 3D player and Calc Angle 3D actors

    How To... ?
    5
    26
    35786
    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.
    • mark
      mark @dritter last edited by mark

      @dritter said:

      This is great Mark! thank you very much. I am not yet using Isadora v3, would you happen to have the you puppet file as a v2.6.1?

       Dear Don,

      No I don't. But here's the code for the JS Quaternion Calc Angles actor. Perhaps you can build it up from that.

      include("three.min.js");
      function radToDeg(f)
      {
          return f * 180.0 / Math.PI;
      }
      function main()
      {
          // IZ_INPUT 1 "x1"
          // IZ_INPUT 2 "y1"
          // IZ_INPUT 3 "z1"
          // IZ_INPUT 4 "x2"
          // IZ_INPUT 5 "y2"
          // IZ_INPUT 6 "z2"
          // IZ_OUTPUT 1 "rotation x"
          // IZ_OUTPUT 2 "rotation y"
          // IZ_OUTPUT 3 "rotation z"
          // IZ_OUTPUT 4 "translate x"
          // IZ_OUTPUT 5 "translate y"
          // IZ_OUTPUT 6 "translate z"
          // create v1 from the x1/y1/z1 arguments
          // this should be one point on a rigid body such as a hand
          var v1 = new THREE.Vector3(arguments[0], arguments[1], arguments[2]);
          // create v2 from the x2/y2/z2 arguments
          // this should be the second on the rigid body such as an elbow
          var v2 = new THREE.Vector3(arguments[3], arguments[4], arguments[5]);
      
      v2.x = v2.x - v1.x;
      v2.y = v2.y - v1.y;
      v2.z = v2.z - v1.z;
      
      v1.x = 0; v1.y = -1; v1.z = 0;
      
      // vectors must be normalized for use with Quaternion
      v1.normalize();
      v2.normalize();
      
      // create a quaternion based on the two vectors
      var q = new THREE.Quaternion();
      q.setFromUnitVectors(v1, v2);
      
      var e = new THREE.Euler();
      e.setFromQuaternion(q, 'ZYX');
      
      e.x = radToDeg(e.x);
      e.y = radToDeg(e.y);
      e.z = radToDeg(e.z);
      return [e.x, e.y, e.z, arguments[0], arguments[1], arguments[2]];
      

      }

      Media Artist & Creator of Isadora
      Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

      D 1 Reply Last reply Reply Quote 0
      • D
        dritter @mark last edited by dritter

        @mark

        Great, thank you for spending time on this Mark. I just opened the patch in the demo version of Isadora 3, and it looks like I can rebuild this  in 2.6.1. The .js code from  your message above is displayed as black text on a grey background, but it becomes white text on a black background starting with the line "v2.x = v2.x -v1"; Is this important?
        When I opened quaterion-puppet.izz in Isdora 3, I get the message that 001-one.3ds is missing, and I also get the message

        The following actors/plugins could not be loaded:
          Skeleton Decoder (ID = '5F736B6C')
          Unknown (ID = '5F736B6C')   
          Rokoko Studio Live Watcher (ID = '5F737370')

        Should I be concerned about the first two items?

        many thanks,
        Don




        Don

        Izzy 2.6.1 USB | MBP (mid 2015) 2.8 GHz i7, 16GB, AMD Radeon R9 | OSX 10.11.6
        Corsair One, 3.7 GHz i7, 32GB, GTX1080 | Windows 10

        Woland bonemap 2 Replies Last reply Reply Quote 0
        • bonemap
          bonemap Izzy Guru @mark last edited by bonemap

          @mark

          Wow! I really don’t know what to say - except to express gratitude for your care and effort!

          It is a beautiful thing. The new tool is impressive, but I am astounded and humbled that you have taken so much care in presenting the theory and exemplar in your post. It should really become a knowledge base article, as the articulation back to some of the fundamental understandings of using 3D nodes in Isadora are so eloquently explained.

          Best wishes

          Russell

          http://bonemap.com | Australia
          Izzy STD 4.2 | USB 3.6 | + Beta
          MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | 14.5 Sonoma
          Mac Studio 2023 M2 Ultra 128GB | OSX 15.3 Sequoia
          A range of deployable older Macs

          mark 1 Reply Last reply Reply Quote 1
          • Woland
            Woland Tech Staff @dritter last edited by

            @dritter said:

            The following actors/plugins could not be loaded:  Skeleton Decoder (ID = '5F736B6C')  Unknown (ID = '5F736B6C')     Rokoko Studio Live Watcher (ID = '5F737370')Should I be concerned about the first two items?

             No need for concern, those are non-public beta plugins that Mark used in his example, (which is why you don't have them).

            TroikaTronix Technical Support
            New Support Ticket: https://support.troikatronix.com/support/tickets/new
            Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
            Add-Ons: https://troikatronix.com/add-ons/ & https://troikatronix.com/add-ons/?u=woland
            Professional Services: https://support.troikatronix.com/support/solutions/articles/13000109444

            | Isadora Version: all of them | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s |

            1 Reply Last reply Reply Quote 0
            • bonemap
              bonemap Izzy Guru @dritter last edited by bonemap

              @dritter said:

              Should I be concerned


              Hi Don,

              Considering the level of engagement you are working with using Isadora, it may be worthwhile considering making a request to join the beta testing group. As a beta tester you may be able to access additional resources associated with Isadora3 including the nodes in the download.

              @woland, is it feasible to suggest inviting Don into the beta program?

              Best wishes

              Russell 

              http://bonemap.com | Australia
              Izzy STD 4.2 | USB 3.6 | + Beta
              MBP 16” 2019 2.4 GHz Intel i9 64GB AMD Radeon Pro 5500 8 GB 4TB SSD | 14.5 Sonoma
              Mac Studio 2023 M2 Ultra 128GB | OSX 15.3 Sequoia
              A range of deployable older Macs

              1 Reply Last reply Reply Quote 0
              • Woland
                Woland Tech Staff last edited by

                @bonemap said:

                is it feasible to suggest inviting Don into the beta program?

                 Can do!
                @dritter 
                Please submit a new ticket using to link in my signature requesting to join the beta testing group and we can take it from there.
                (There's no cost associated with joining and we'll provide you with a temporary Isadora 3 license to test with for a few months.)

                TroikaTronix Technical Support
                New Support Ticket: https://support.troikatronix.com/support/tickets/new
                Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
                Add-Ons: https://troikatronix.com/add-ons/ & https://troikatronix.com/add-ons/?u=woland
                Professional Services: https://support.troikatronix.com/support/solutions/articles/13000109444

                | Isadora Version: all of them | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s |

                D 1 Reply Last reply Reply Quote 1
                • mark
                  mark @bonemap last edited by

                  @bonemap said:

                  Wow! I really don’t know what to say - except to express gratitude for your care and effort!

                   It was a fun problem to solve. But, you're welcome. ;-)

                  Media Artist & Creator of Isadora
                  Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

                  D 1 Reply Last reply Reply Quote 2
                  • D
                    dritter @Woland last edited by dritter

                    @Woland 

                    OK, I have submitted a ticket to join the beta group. thank you. 

                    Izzy 2.6.1 USB | MBP (mid 2015) 2.8 GHz i7, 16GB, AMD Radeon R9 | OSX 10.11.6
                    Corsair One, 3.7 GHz i7, 32GB, GTX1080 | Windows 10

                    1 Reply Last reply Reply Quote 1
                    • DusX
                      DusX Tech Staff last edited by

                      Mark, this is very cool.
                      Three JS also includes physics and collision detection. It would be fun to take this further in this way.

                      Troikatronix Technical Support

                      • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
                      • My Add-ons: https://troikatronix.com/add-ons/?u=dusx
                      • Profession Services: https://support.troikatronix.com/support/solutions/articles/13000109444-professional-services

                      Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

                      1 Reply Last reply Reply Quote 1
                      • D
                        dritter @mark last edited by dritter

                        @mark

                        Happy New Year Mark and many thanks for the IK patch. I was able to reconstruct it for Isadora 2.6.1 and it is working fine with a Kinect and NI-mate. So far I have built IK for the lower arms(elbow-hand) and lower foot(knee-foot), but I have some questions about the following JS code within 'Macro JS Quaternion Calc angle':

                        // create v1 from the x1/y1/z1 arguments
                        // this should be one point on a rigid body such as a hand
                             var v1 = new THREE.Vector3(arguments[0], arguments[1], arguments[2]);
                        // print('v1 = ' + v1.x + ' ' + v1.y + ' ' + v1.z + '\n'); 
                        // create v2 from the x2/y2/z2 arguments
                        // this should be the second on the rigid body such as an elbow    
                               var v2 = new THREE.Vector3(arguments[3], arguments[4], arguments[5]);

                        QUESTION 1: Is it correct that v1 is the end-effector(or target), and v2 is the rotating joint? I am asking because the IK works for the arm link when v1 is the hand's xyz coordinates and v2 is the elbow's coordinates, but for the foot link, the IK works when v1 is the knee's xyz coordinates and v2 is the foot's xyz coordinates.

                        QUESTION 2: when the arm link is moved to vertical with the hand straight up, the link rotates 360 degrees around its Y axis(around the spine of the link). Is this normal, or perhaps I have made an error?

                        QUESTION 3: see below for the orientation of my link. When this link is used for the left or right arm, the IK works correctly when +180 is added to the x rotation provided by the JS Quaternion Calc actor, but this modification is not needed when the link is used for the lower leg. Does this seem normal, or perhaps I have made an error?

                        many, many thanks Mark,
                        Don

                        Izzy 2.6.1 USB | MBP (mid 2015) 2.8 GHz i7, 16GB, AMD Radeon R9 | OSX 10.11.6
                        Corsair One, 3.7 GHz i7, 32GB, GTX1080 | Windows 10

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