• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ 30% Off | Artisan 2 on sale until April 30th Buy Now

MSPhysics 1.0.3 (16 October 2017)

Scheduled Pinned Locked Moved Plugins
920 Posts 170 Posters 882.8k 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.
  • A Offline
    Anton_S
    last edited by 20 Mar 2017, 01:53

    Pilou, do you mean, how to set the box static when the other box hits it?

    If so, attach this script to the little box:

    onTouch { |toucher, point, normal, force, speed|
      this.static = true
      this.set_velocity(0,0,0)
      this.set_omega(0,0,0)
    }
    

    This should set the little box static whenever the falling box over it catches up.

    1 Reply Last reply Reply Quote 0
    • P Offline
      pilou
      last edited by 20 Mar 2017, 09:05

      For avoid this artificial bowling's corridors! πŸ˜„

      http://sketchucation.com/forums/download/file.php?id=146225

      Objective is make a stone wall : so a general vertical fall
      Rotation 90Β°
      Then another http://sketchucation.com/forums/download/file.php?id=146225

      Frenchy Pilou
      Is beautiful that please without concept!
      My Little site :)

      1 Reply Last reply Reply Quote 0
      • D Offline
        delchrys
        last edited by 20 Mar 2017, 09:21

        @anton_s said:

        Hello, Bert Broek,

        Here is the hydraulic torque wrench with MSPhysics:
        [attachment=1:zw0fm2hr]<!-- ia1 -->delchrys - hydraulic torque wrench.skp<!-- ia1 -->[/attachment:zw0fm2hr]
        The center of rotation might need some adjusting but it works as good as the model is.

        Regards,
        Anton

        It's getting there but now i only need to get it to rotate around the small hole's center.
        i've made another one with a dynamic component for you to see what i mean. Hope you can help me with it.
        regads,

        Bert


        PROBEER NIEUWE ATORATOR.skp

        1 Reply Last reply Reply Quote 0
        • P Offline
          pilou
          last edited by 20 Mar 2017, 14:53

          @ Anton yes that works fine but I have hundred of objects!
          I can't put one by one the script! πŸ˜„
          (multiple selection don't work for this case)

          GIF_touch2.gif

          and little problem! πŸ˜„

          stop_at5.jpg

          Frenchy Pilou
          Is beautiful that please without concept!
          My Little site :)

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

            Hello, Bert,

            Could you be more clear about, which small hole's center it should rotate about?
            Is that what it should do now?
            PROBEER NIEUWE ATORATOR.skp

            I will soon make a video on how I am adding MSPhysics to it, so you know how it is done.

            Regards,
            Anton

            1 Reply Last reply Reply Quote 0
            • A Offline
              Anton_S
              last edited by 20 Mar 2017, 16:12

              Hi, Pilou,

              To assign same script to multiple objects, give them all the same name, assign script to one of them, and in the Properties tab of the UI click on the Assign Script to All with Same Name button.

              One way to reduce the offset, is by enabling the Continuous Collision in Simulation tab.

              Regards,
              Anton

              1 Reply Last reply Reply Quote 0
              • D Offline
                delchrys
                last edited by 20 Mar 2017, 20:23

                Sorry for not being very clear. The whole circular wrench part should rotate around the hole's center. I'll post a update tomorrow where I have added the hydraulic cylinder so you can see what I mean. Now I'm on my phone so can't post it now.
                I want the cylinder to push out and push the lever so that the wrench part rotates a bit. So from a linear motion to a rotating one. I'll update tomorrow, thanks for now.

                1 Reply Last reply Reply Quote 0
                • A Offline
                  Anton_S
                  last edited by 21 Mar 2017, 04:58

                  @faust07 said:

                  Hallo Anton. Thanks for your explanation.
                  Here is a picture sequence with the problem. It usually happens in fast motion sequences, as if MSPhysics tries to run the simulation in real time. For games and the like it is certainly useful, but for a video recording are missing some phases of some objects.
                  Unfortunately the model is currently under construction. I am trying to optimize and combine motion sequences and motion modes. If it works again, I can send it to you.

                  Hello, Faust,

                  I sent you a private message on this. Please check your inbox.

                  Thanks,
                  Anton

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    Anton_S
                    last edited by 21 Mar 2017, 05:28

                    Bert, you can alternatively add labels to hole centers and then indicate which hole you're referring to by its name.

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      delchrys
                      last edited by 21 Mar 2017, 19:37

                      So I made my model a bit more complete.
                      So the red cylinder pushes out and pushes the yellow block.
                      the yellow block makes the green part rotates around origin point.
                      I have made a dynamic component that when you click on the yellow part it show the rotation and added a piston controlley for the cylinder.
                      Hope someone can show me how you make it moving and maybe a step by step guide with it.


                      new gatorator.skp

                      1 Reply Last reply Reply Quote 0
                      • F Offline
                        faust07
                        last edited by 21 Mar 2017, 20:56

                        First impressions of MSPv1.0.0_WIP6:

                        Great new features and improvements!: Particle recording and export, Escape to stop
                        exporting, Magnets, Joystick, OnTouch functions ... πŸ‘

                        I've got my walker model to run. Although I thought first, I can not do it.
                        The main problem was my inaccurate definition of "Material" in conjunction with "Mass
                        Control". For example: rubber with a mass of 3 kg, wood with a mass of 10 kg etc.
                        This worked in version 0.9.9 but after opening with v1.0.0 all former mass values
                        were displayed in density and the bodies then behaved strangely...
                        I have now changed all the MSP materials with deviating mass to "Custom" and reset the
                        display of "by Density" to "by Mass".
                        It would be good to know the dependence of the strength of the joints on the density
                        / mass of the connected body parts. For the walking person, I have to adjust the
                        triple weight for all parts of the body in order to reduce the wobbling and trembling
                        to a tolerable level.

                        An oscillation of previously 60 frames now appears to correspond to a value of 1.0.
                        Does the oscillation refer to real time or simulation time?
                        The start rotation direction of the joints changes sometimes? I guess the cause is at
                        the oscillators starting point at -1.0. But that's ok.

                        The improper phasing till persists:
                        The elimination of movement phases of individual bodies is still present. This,
                        however, seems to be due to the amount of transformed emitters (drops, splashes,
                        etc.). Without the many emitters, the body movements of my "Little Richie Gear" (I as
                        a boy with a lantern...) are smooth.

                        What is the influence of setting "Kinematic" or "Dynamic" to the simulation? Where
                        can I find the script overview?

                        Right now, I'm just trying to figure out what the simplest method is to copy a
                        complex MSPhysics conglomerate like a person (with Curvy Piston and scripts) and let
                        them act independently.


                        WalkerTest_15_MSP1.gif

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          Anton_S
                          last edited by 21 Mar 2017, 20:57

                          Hello, Bert,

                          That's indeed a better model! I made a YouTube video on how to add MSPhysics to it:

                          Here is the model:
                          delchrys - gatorator.skp
                          Regards,
                          Anton

                          1 Reply Last reply Reply Quote 0
                          • A Offline
                            Anton_S
                            last edited by 21 Mar 2017, 22:07

                            Hello, Pilou,

                            There is an onUntouch {|toucher| ...} event for that. Basically when squeezing wall stops touching the stones, you want them to become static, right? To do that, you have to assign this script to the wall(s):

                            # Triggered when the wall stops touching a body.
                            onUntouch { |toucher|
                              # Ensure that only touchers named, 'stone', are set static.
                              next if toucher.group.name != 'stone'
                              # Set static
                              toucher.static = true
                              toucher.set_velocity(0,0,0)
                              toucher.set_omega(0,0,0)
                            }
                            # Triggered when the wall starts touching a body.
                            onTouch { |toucher|
                              # Ensure that only touchers named, 'stone', are set movable.
                              next if toucher.group.name != 'stone'
                              # Set toucher 
                              toucher.static = false
                            }
                            

                            Make sure to name all stones, stone.

                            However, I think that for cluttering a lot of stones it would be better to manually set them static, say after pressing key, S.
                            Assign this script to the wall:

                            onStart {
                              @set = false
                            }
                            onTick {
                              if key('s') == 1 && !@set
                                @set = true
                                simulation.world.bodies.each { |body|
                                  if body.group.name == 'stone'
                                    body.static = true
                                    body.set_velocity(0,0,0)
                                    body.set_omega(0,0,0)
                                  end
                                }
                              end
                            }
                            

                            This, too, requires that all stone objects are assigned a name, stone.

                            FYI, it's not "Ms Physics" it's "MSPhysics", standing for Math Science and Physics. πŸ’š

                            Regards,
                            Anton

                            1 Reply Last reply Reply Quote 0
                            • A Offline
                              Anton_S
                              last edited by 21 Mar 2017, 22:33

                              Hello, Faust,

                              @faust07 said:

                              This worked in version 0.9.9 but after opening with v1.0.0 all former mass values
                              were displayed in density and the bodies then behaved strangely...

                              Yes, that was another change I made. I basically renamed the attribute, so it describes the Control by Mass/Density property more accurately. After version 1.0.0, new releases will usually include backup compatibility, but while MSPhysics is still in 0.x.x stage, I don't make changes compatible.

                              @faust07 said:

                              It would be good to know the dependence of the strength of the joints on the density
                              / mass of the connected body parts. For the walking person, I have to adjust the
                              triple weight for all parts of the body in order to reduce the wobbling and trembling
                              to a tolerable level.

                              In the current versions, joints are the most robust when two linked objects have identical masses. But since linked objects usually don't have identical masses, simply assign realistic mass ratios to objects, and that will usually, too, guarantee strong joint connections. For example, the torso of your robot could have a mass of 1.0 kg, the arm of 0.2 kg, the hand of 0.05 kg, and etc...

                              @faust07 said:

                              An oscillation of previously 60 frames now appears to correspond to a value of 1.0.
                              Does the oscillation refer to real time or simulation time?

                              Yes, that was changed too. Now the oscillator accepts frequency in seconds of simulation time - number of times to oscillate per simulation second; no longer depends on frame. This change was made to keep the oscillation value persistent when changing the simulation timestep.

                              @faust07 said:

                              The start rotation direction of the joints changes sometimes? I guess the cause is at the oscillators starting point at -1.0.

                              I added another function, called oscillator2, which starts at 0.0 and oscillates from 0.0 to 1.0. See the documentation for details. Also, since 1.0.0 isn't released yet, the documentation is local. To open it, select some group, open MSPhysics UI, activate the Script tab, and select MSPhysics link. From there, click on CommonContext too see all functions you could use as controllers.

                              @faust07 said:

                              What is the influence of setting "Kinematic" or "Dynamic" to the simulation? Where
                              can I find the script overview?

                              After opening the local documentation, click on Overview tab. There should be a small topic on that.

                              @faust07 said:

                              Right now, I'm just trying to figure out what the simplest method is to copy a
                              complex MSPhysics conglomerate like a person (with Curvy Piston and scripts) and let
                              them act independently.

                              This can be done by selecting the entire robot, and enabling the Connect Closest Joints state. Then you can copy it, along with the curvy joint, as many times as you want.

                              @faust07 said:

                              The improper phasing till persists:
                              The elimination of movement phases of individual bodies is still present. This,
                              however, seems to be due to the amount of transformed emitters (drops, splashes,
                              etc.). Without the many emitters, the body movements of my "Little Richie Gear" (I as
                              a boy with a lantern...) are smooth.

                              Send me a private message with the model so I can see what could be done to improve MSPhysics and/or the model.

                              Regards,
                              Anton

                              1 Reply Last reply Reply Quote 0
                              • P Offline
                                pilou
                                last edited by 21 Mar 2017, 22:46

                                @Anton!
                                Thx i will test all that!

                                Can you see the 2 gif animations above?
                                (because they are on the Su French forum section)

                                PS Sorry for the MS "Untouching" Physics! 😳
                                I will remember that for the next time!

                                Frenchy Pilou
                                Is beautiful that please without concept!
                                My Little site :)

                                1 Reply Last reply Reply Quote 0
                                • A Offline
                                  Anton_S
                                  last edited by 21 Mar 2017, 23:00

                                  @pilou said:

                                  Can you see the 2 gif animations above?
                                  (because they are on the Su French forum section)

                                  Nope, I don't see them. It says I'm unauthorized to view them...

                                  @pilou said:

                                  PS Sorry for the MS "Untouching" Physics! 😳
                                  I will remember that for the next time!

                                  I'm not offended by that in any way. Neither is Ms Physics πŸ˜†

                                  1 Reply Last reply Reply Quote 0
                                  • P Offline
                                    pilou
                                    last edited by 22 Mar 2017, 01:18

                                    @Anton

                                    By Chri : tricky use of MS Physics! πŸ˜‰

                                    dameuse2.gif
                                    dameuse21.gif

                                    PS Have you something for "Untouch" objects selected in Ms Physics ?


                                    DAMEUSE2.skp

                                    Frenchy Pilou
                                    Is beautiful that please without concept!
                                    My Little site :)

                                    1 Reply Last reply Reply Quote 0
                                    • P Offline
                                      pilou
                                      last edited by 22 Mar 2017, 01:19

                                      Gif animations repaired! β˜€
                                      http://sketchucation.com/forums/viewtopic.php?f=323%26amp;t=56852%26amp;start=600#p616669

                                      Sorry for the inconvenience! 😳

                                      Frenchy Pilou
                                      Is beautiful that please without concept!
                                      My Little site :)

                                      1 Reply Last reply Reply Quote 0
                                      • F Offline
                                        faust07
                                        last edited by 22 Mar 2017, 10:27

                                        Hi Anton, thank you for the detailed explanations. Much confirms my assumptions. Can not wait for the final version. From the v1.0.0 onwards, it also makes more sense to put models in 3D-Warehouse.
                                        I've sent you a PM with the test model. Perhaps you can find the causes for the jerky movements in complex MSP calculations and give ideas for the improvement of the scripts.

                                        1 Reply Last reply Reply Quote 0
                                        • D Offline
                                          delchrys
                                          last edited by 22 Mar 2017, 12:38

                                          Almost ready Anton,
                                          now i only need to get it moving a bit further.
                                          If the two green half circles meet each other and the cyclinder moves further, the whole green circle part should rotate a bit around the origin point. If you know what i mean.
                                          If you look at the following youtube video you should understand what i mean. The first couple of centimeters is needed for closing the green grip halves, the next centimeters are needed to rotate.
                                          regards,
                                          Bert

                                          PS Hope i'm not asking too much πŸ˜„
                                          https://www.youtube.com/watch?v=MO2Dy7PM7Gs

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 29
                                          • 30
                                          • 31
                                          • 32
                                          • 33
                                          • 45
                                          • 46
                                          • 31 / 46
                                          31 / 46
                                          • First post
                                            612/920
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement