• 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] Footprints following a performer randomly walking on a stage

    How To... ?
    4
    12
    1669
    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.
    • DusX
      DusX Tech Staff @mark_m last edited by

      @mark_m

      #1: unsure what your looking for here.. maybe use some type of delay line?

      #2: Using a little trig. If you have the current XY, and you have the past XY via a delay line, you can calculate the rotation.

      #3: Using the same current and past XY, you can use the Velocity actor to watch speed and adjust as needed.

      I am attaching some JS I use to get angles between 2 XY points.

      // input1: X of rotating thing (Izzy range -50 to 50)
      // input2: Y of rotating thing (Izzy range -50 to 50)
      // input3: X of focus item eg: mouse (Izzy range -50 to 50)
      // input4: Y of focus item eg: mouse (Izzy range -50 to 50)
      // input5: stage width (pixels)
      // input6: stage height (pixels)
      function rotate(focusX,focusY,selfX,selfY,wPercent){
        //distance of focus from self
        var dx = focusX - selfX;
        var dy = focusY - selfY
        debug("vars. dx: " + dx  + " dy: " + dy + " wPercent: " + wPercent + "\n");
        return (Math.atan2( (dy * wPercent) , (dx) ) );
      }
      function rad2deg(rad){
        return rad * (180 / Math.PI);
      }
      function debug(printString){
          if (DebugMode){
              print(printString + "\n");
          }
      }
      function main(){
        // DO setup here: ONCE ONLY ************************************************
          DebugMode = false; //example usage: debug("string" + var + "\n");
          // main function for LOOP **************************************************
          main = function(){
            // get focus XY from Izzy enviroment
              var focusX = arguments[2]; // reverse due to flipped X in Izzy
              var focusY = arguments[3]; // reverse due to flipped Y in Izzy
            // get current Self Position
              var selfX = arguments[0]; // center for now
              var selfY = arguments[1]; // center for now
            // used to normalize the w/h at 100%
              var wPercent = arguments[5] / arguments[4];
            debug("vars. mX: " + focusX  + " mY: " + focusY + " sX: " + selfX + " sY: " + selfY + "\n");
                return [ rad2deg( rotate(focusX,focusY,selfX,selfY,wPercent) ) * -1]; // *-1 added to rotate other direction
          };
          // RUN ONCE FOR INIT ONLY
          var out = []; // declare out
          return out; // return from INIT state
      }

      and the JS being used.

      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 2
      • bonemap
        bonemap Izzy Guru @mark_m last edited by bonemap

        @mark_m said:

        you must have done this sort of thing...

         Hi,

        I do have something that I think will get you started... it is using the same principles suggested by @DusX, but packaged up in a demonstration patch. 

        blob-particle-follow.zip

        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_m 1 Reply Last reply Reply Quote 3
        • mark_m
          mark_m @bonemap last edited by

          @bonemap @DusX

          Great, thank you so much! Those are the very things! I'm so grateful!

          Cheers

          Mark

          Intel NUC8i7HVK Hades Canyon VR Gaming NUC, i7-8809G w/ Radeon RX Vega M GH 4GB Graphics, 32GB RAM, 2 x NVMe SSD
          Gigabyte Aero 15 OLED XD. Intel Core i7-11800H, NVidia RTX3070, 32GB RAM 2 x NVMe SSD
          PC Specialist Desktop: i9-14900K, RTX4070Ti, 64GB RAM, Win11Pro
          www.natalieinsideout.com

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

            @mark_m

            I think you will also what to use Pythagoras to calculate the distance between your 2 reference points, so that you don't update the rotation unless the distance is greater than a set threshold.
            Bonemaps example is great, but if you stop moving the mouse you get some unwanted rotation changes with any small point updates.

            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.

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

              @dusx

              Hi,

              The javascript solution does efficiently resolve the issue of what happens when the movement stops. I have so much to learn - Thanks for sharing it! 

              @mark_m here is a screengrab how I was able to integrate @DusX javascript. Apologies done with a beta version so I can't share the patch file.

              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_m DusX Woland 3 Replies Last reply Reply Quote 1
              • mark_m
                mark_m @bonemap last edited by mark_m

                @bonemap

                Thanks a lot! Will try that..

                Meanwhile, demonstrating that you can do anything many ways in Isadora... we used your (@bonemap's) original patch, and connected the 2D velocity actor to the blob tracker's X and Y output, and connected that to the pulse generator of the 3D Particle Generator. So that if the velocity was zero, no footsteps (particles) were emitted, and the faster you ran, the more footsteps got laid down.

                We also used the technique that you shared with us a while ago in your excellent tutorial on sprite animation to make left and right footprints!

                Here's a screen grab of this scene (the blob tracking itself is done in a secondary scene: the listeners get the x / y positions:

                And the video of our first, crude attempts: a quick demo to the director to show we were on the right track (no pun intended!).

                We'll get back to that and give it a go with the Javascript as well.

                Thanks Russell and Ryan, you're both marvellous!

                Intel NUC8i7HVK Hades Canyon VR Gaming NUC, i7-8809G w/ Radeon RX Vega M GH 4GB Graphics, 32GB RAM, 2 x NVMe SSD
                Gigabyte Aero 15 OLED XD. Intel Core i7-11800H, NVidia RTX3070, 32GB RAM 2 x NVMe SSD
                PC Specialist Desktop: i9-14900K, RTX4070Ti, 64GB RAM, Win11Pro
                www.natalieinsideout.com

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

                  @bonemap said:

                  <p>@dusx</p><p>Hi,</p><p>The javascript solution does efficiently resolve the issue of what happens when the movement stops. I have so much to learn - Thanks for sharing it! </p><p>@mark_m here is a screengrab how I was able to integrate @DusX javascript. Apologies done with a beta version so I can't share the patch file.</p><img src="/assets/uploads/files/1634079469460-screen-shot-2021-10-13-at-8.50.35-am.png" /><p>Best Wishes</p><p>Russell</p>

                   Nice approach!

                  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
                  • Woland
                    Woland Tech Staff @bonemap last edited by

                    @bonemap said:

                    Apologies done with a beta version so I can't share the patch file

                     Now that 3.1 is released, I'm itching to get my hands on this file 😅

                    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 |

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

                      @woland

                      Here it is! follow-particle.zip

                      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

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

                        @bonemap

                        Awesome! Do you mind if we make some tweaks and add some Comment actors then upload it and credit you, or do you want to upload it yourself?

                        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 |

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

                          @woland

                          The Javascript is from @DusX so I would say the credit goes there for this one.

                          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 1
                          • First post
                            Last post