• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

MSPhysics 1.0.3 (16 October 2017)

Scheduled Pinned Locked Moved Plugins
920 Posts 170 Posters 882.9k Views 172 Watching
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.
  • T Offline
    TIG Moderator
    last edited by 24 Apr 2017, 14:05

    @ecati said:

    Where do we download MSPhysics 1.0.0?
    You could wait [joke 😉 ] ?
    The current version is 0.9.9 - and it's latest version is always available from the SketchUcation PluginStore:
    http://sketchucation.com/pluginstore?pln=MSPhysics
    Like most Plugins/Extensions...

    TIG

    1 Reply Last reply Reply Quote 0
    • F Offline
      faust07
      last edited by 24 Apr 2017, 14:16

      Hi, ecati,
      Sorry, I used a test version for the connect example file.
      Anton is working on release version 1.0.0 - which soon comes out.

      1 Reply Last reply Reply Quote 0
      • S Offline
        SynSuka3D
        last edited by 25 Apr 2017, 17:27

        Bonjour,
        Je voudrais lire la vitesse D'un corps sur l'axe Y interne,no axe Y mondiale !!!
        J'ai essayé get_velocity...
        set_var("speed_Y",????)

        Hello,
        I would like to read the speed of a body on the internal Y-axis, no Y-axis world!
        I tried: get_velocity...
        set_var("speed_Y",????)

        1 Reply Last reply Reply Quote 0
        • A Offline
          Anton_S
          last edited by 25 Apr 2017, 20:41

          Hello, Nicolas,

          To get local velocity, along the body's Y-axis, you got to transform the global velocity relative to the body first, then get the Y component:

          loc_vel = this.get_velocity.transform(this.get_normal_matrix.inverse)
          vy = loc_vel.y
          

          Regards,
          Anton

          1 Reply Last reply Reply Quote 0
          • A Offline
            Anton_S
            last edited by 25 Apr 2017, 20:46

            Faust, I will ckeck out that cloth thingy soon.

            1 Reply Last reply Reply Quote 0
            • F Offline
              faust07
              last edited by 25 Apr 2017, 20:52

              Hi, Anton,
              first test of a (cloth-) mesh with your MSPhysics API self connect script.
              Unfortunately, each node joins only one rod. What am I doing wrong?


              Connect_test_01.skp


              Self_Connect_02.gif

              1 Reply Last reply Reply Quote 0
              • A Offline
                Anton_S
                last edited by 26 Apr 2017, 00:02

                Okay, faust.

                Your script for connecting bodies attempts to connnect multiple bodies to the same joint. That's how it is in the user interface of MSPhysics, but behind the scenes a new joint instance is added for each constraint. So here is the script to have:

                onTick {
                  if frame == 1
                    this.touching_bodies(true).each { |body|
                      next if body.group.name != 'capsule'
                      joint = MSPhysics;;BallAndSocket.new(this.world, this, this.get_matrix, this.group)
                      joint.connect(body)
                    }
                  end
                }
                

                Paste it into one knot, and assign it to all knots, using the Assign Script to All With Name button.

                That said, this is a very inefficient way of creating cloth, not to mention that you also have to create faces and then reposition vertices and map the UVs of textures (if any).

                I already got my own, more efficient, version of cloth working, like 3 years ago. But it's not perfect. Here is the demo updated and refined for the current version of MSPhysics:

                1 Reply Last reply Reply Quote 0
                • C Offline
                  cristyan
                  last edited by 26 Apr 2017, 12:06

                  Hello ! There is a script or another way that maintains the same distance between objects attached on CurvySlider , as a rollercoaster ? Thank you !

                  1 Reply Last reply Reply Quote 0
                  • F Offline
                    faust07
                    last edited by 26 Apr 2017, 13:55

                    Thanks, Anton,
                    Your code works perfectly. For genuine cloth simulation this is, of course, too cumbersome. For me, it is a good practice to learn a little bit of good script again. In addition, the example shows the almost unlimited possibilities of MSPhysics.


                    Self_Connect_03.gif


                    and this happens after 1.800 frames

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      Anton_S
                      last edited by 27 Apr 2017, 02:29

                      Oops, the get_normal_matrix should be normal_matrix

                      Also, to quote other people, use the double-quote button or put them in quote tags surrounded with square brackets. And posting the whole video on the error isn't necessary either. Just post a message that is reported.

                      1 Reply Last reply Reply Quote 0
                      • S Offline
                        SynSuka3D
                        last edited by 27 Apr 2017, 09:14

                        ==============================

                        To get local velocity, along the body's Y-axis, you got to transform the global velocity relative to the body first, then get the Y component:
                        CODE: SELECT ALL
                        loc_vel = this.get_velocity.transform(this.get_normal_matrix.inverse)
                        vy = loc_vel.y

                        Regards,
                        Anton

                        ===================
                        problem!!!!!!

                        1 Reply Last reply Reply Quote 0
                        • E Offline
                          ecati
                          last edited by 29 Apr 2017, 07:02

                          This gears is not spinning properly. What would be the reason?


                          dişli.jpg


                          dişli.skp

                          1 Reply Last reply Reply Quote 0
                          • E Offline
                            ecati
                            last edited by 29 Apr 2017, 21:46

                            Hi, Anton
                            Will you take a look at this file at a time when you are not busy?


                            makine.skp

                            1 Reply Last reply Reply Quote 0
                            • A Offline
                              Anton_S
                              last edited by 30 Apr 2017, 07:54

                              Hello, Ecati,

                              For the first one, try setting material thickness of simulation tab, in the MSPhysics UI, to zero. It will improve the behavior by a bit. But because the gears are too small, the collision intersections aren't quite proper. You could increase world scale, say to 40, which should result in an improved behavior, but it will unfortunately result in a crash. I will try to fix that scaling bug before releasing 1.0.0.

                              For the second one, you can increase update rate, to say 4, and/or reduce update timestep, to say 1/120. The smaller the update timestep is, the more accurate the simulation is. The smaller update timestep should prevent collisions from deteriorating. Both of the settings can be adjusted through the Simulation tab of the MSPhysics UI dialog. After you do these, increasing the motor speed should have things running properly.

                              Nice examples by the way. I'm stunned with your improved MSPhysics skills.

                              Regards,
                              Anton

                              1 Reply Last reply Reply Quote 0
                              • E Offline
                                ecati
                                last edited by 2 May 2017, 20:28

                                Is it possible to do servo controls via the msphysics API without writing a script?

                                1 Reply Last reply Reply Quote 0
                                • A Offline
                                  Anton_S
                                  last edited by 2 May 2017, 21:31

                                  It depends on how complex you want the controller to be. The simplest one is the slider controller. You can generate it by pressing the generate slider button in joint UI. Others are controlling with key, like key('f') as noted in some prior post. You can also write a function of time dirctly into the cpntroller, like: t = world.time; cos(t)*5 There are many controllers you can write without relying on the MSPhysics scripting API.

                                  1 Reply Last reply Reply Quote 0
                                  • W Offline
                                    Wolfy_71
                                    last edited by 3 May 2017, 10:09

                                    I'm really enjoying MSPhysics plug-in and have been following Sam Ketner's very insightful tutorials on Youtube. I'm wondering if there is a manual easily available, so I can bone up on some more stuff. More pressingly, I'm wondering how to attach one hinge with a bar (which appears to be in a fixed point) on a bar attached to another hinge... so that it is freely movable. I'm trying to draw an umbrella-like hinge at the moment and I'm stuck.

                                    1 Reply Last reply Reply Quote 0
                                    • E Offline
                                      ecati
                                      last edited by 4 May 2017, 07:30

                                      Hi, Anton,
                                      I made this file by taking advantage of the Planned Steps.skp file you have prepared. I want the movement to begin when the space key is pressed and continue and stop until the space key is pressed again.


                                      makine_servo.skp

                                      1 Reply Last reply Reply Quote 0
                                      • A Offline
                                        Anton_S
                                        last edited by 4 May 2017, 08:23

                                        @ecati said:

                                        I made this file by taking advantage of the Planned Steps.skp file you have prepared. I want the movement to begin when the space key is pressed and continue and stop until the space key is pressed again.

                                        This command will be available in MSPhysics 1.0.0. Basically you will utilize the toggle_key('space') command. It will be released soon.

                                        1 Reply Last reply Reply Quote 0
                                        • A Offline
                                          Anton_S
                                          last edited by 4 May 2017, 08:24

                                          @wolfy_71 said:

                                          I'm really enjoying MSPhysics plug-in and have been following Sam Ketner's very insightful tutorials on Youtube. I'm wondering if there is a manual easily available, so I can bone up on some more stuff. More pressingly, I'm wondering how to attach one hinge with a bar (which appears to be in a fixed point) on a bar attached to another hinge... so that it is freely movable. I'm trying to draw an umbrella-like hinge at the moment and I'm stuck.

                                          To create movable hinges, you have to create them within the context of a desired parent group/component. Then connect it to the desired child group/component (using the MSPhysics Joint Connection Tool). That way the parent group will move and the connected child group will move relative to the parent group, while rotating around the hinge axis, which will also be relative to the parent group.

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 32
                                          • 33
                                          • 34
                                          • 35
                                          • 36
                                          • 45
                                          • 46
                                          • 34 / 46
                                          34 / 46
                                          • First post
                                            679/920
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement