sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    MSPhysics 1.0.3 (16 October 2017)

    Scheduled Pinned Locked Moved Plugins
    926 Posts 171 Posters 883.1k 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.
    • R Offline
      rick149
      last edited by

      Camera Follow Tool: Can I hide the highlighted selection?

      The Camera Follow and Target tools work by right clicking the required entity as the target to follow during the simulation.

      The selected item is highlighted in a blue box.

      .

      Is there any way to suppress the highlighting while the simulation is running?

      1 Reply Last reply Reply Quote 0
      • A Offline
        Anton_S
        last edited by

        Left-click on the sky/background to suppress the highlighting. You can't unfortunately hide the group from the menu though. I should've thought of adding this command.

        1 Reply Last reply Reply Quote 0
        • R Offline
          rick149
          last edited by

          thanks Anton, that works fine
          MSPhysics is truly awesome

          i am keen to learn more about scripts

          1 Reply Last reply Reply Quote 0
          • J Offline
            jb1016
            last edited by

            Is there a way to utilize multi core processors with msphysics?

            1 Reply Last reply Reply Quote 0
            • A Offline
              Anton_S
              last edited by

              @jb1016 said:

              Is there a way to utilize multi core processors with msphysics?

              Probably not. When I compiled Newton, I disabled multi-threading, due to issues encountered with it. I will try to enable multi-threading in the next release.

              1 Reply Last reply Reply Quote 0
              • ecatiE Offline
                ecati
                last edited by

                Is it possible to move or rotate a model with a joint connected to it?
                Please click on the picture.


                move.gif

                1 Reply Last reply Reply Quote 0
                • A Offline
                  Anton_S
                  last edited by

                  Making relative joints is easy if you know the concept. Here is how it's done: https://drive.google.com/open?id=0B3qg8f4WrNdHUDJrTUsybmU0NGs

                  1 Reply Last reply Reply Quote 0
                  • F Offline
                    faust07
                    last edited by

                    Hello Anton,
                    What is to do to get faces (not in a Group), scripted during MSPhysics simulation, handled in MSPhysics Replay?
                    They are displayed during the simulation and disappear in replay and also in the animation export.
                    Thank you in advance.

                    1 Reply Last reply Reply Quote 0
                    • A Offline
                      Anton_S
                      last edited by

                      Faust, replay doesn't record transformation of vertices. There is nothing you can do with it yet, but is a good request.

                      1 Reply Last reply Reply Quote 0
                      • R Offline
                        RobiBue
                        last edited by

                        I have an odd result with a test I've been trying to get to work:
                        I have two aluminium pieces, connected through two aluminium bars.
                        One aluminium piece is static with two hinge joints (each connected to one bar).
                        One of the hinge joints I have set up as an angular spring to dampen the fall.
                        The other aluminium piece is connected to two hinge joints, each on the end of the two bars.

                        My problem is, the system starts to wobble after 10 seconds ๐Ÿ˜ž , and after 30 seconds it spins out of control ๐Ÿ˜ฎ .

                        what am I doing wrong?

                        attached is the SU15 model with MSPhysics 1.0.2 and AMS_lib 3.5.2SketchUp 2015 model of MSPhysics hinged test

                        edit: I wanted to attach a spring (instead of using the angular spring hinge) but I believe that springs are fixed and non-movable) and somehow I can't implement this idea.
                        with spring.png

                        1 Reply Last reply Reply Quote 0
                        • A Offline
                          Anton_S
                          last edited by

                          @robibue said:

                          My problem is, the system starts to wobble after 10 seconds ๐Ÿ˜ž , and after 30 seconds it spins out of control ๐Ÿ˜ฎ .

                          what am I doing wrong?

                          If you set simulation solver model to iterative 64 passes and update timestep to 1/120, the wobbling should be significantly reduced.

                          @robibue said:

                          edit: I wanted to attach a spring (instead of using the angular spring hinge) but I believe that springs are fixed and non-movable) and somehow I can't implement this idea.

                          Don't do that. Spring joints are for linear motion, not for angular. Either use angular spring, or since you want to dampen the whole thing, simply change hinge mode to Angular Friction and increase the friction parameter, to say, 4000000.

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            RobiBue
                            last edited by

                            @anton_s said:

                            If you set simulation solver model to iterative 64 passes and update timestep to 1/120, the wobbling should be significantly reduced.

                            Thank you very much Anton, this helped ๐Ÿ˜„

                            @anton_s said:

                            Spring joints are for linear motion, not for angular. Either use angular spring, or since you want to dampen the whole thing, simply change hinge mode to Angular Friction and increase the friction parameter, to say, 4000000.

                            This worked great, although I think I found the solution I was somewhat looking for using servos with an angular limit ๐Ÿ˜„
                            Here's what I was aiming for
                            SU15, MSPhysics 1.0.2, hinged test end product with servos and hinges

                            1 Reply Last reply Reply Quote 0
                            • T Offline
                              TDahl
                              last edited by

                              I'm hoping for advice on how to improve a model that attempts to simulate a thin flat flexible cable that is coiled or wrapped within a hollow rotating drum. Despite hours and hours of experiments, I cannot avoid SketchUp crashing (bugsplat) after about 2 to 2.5 rotations of the drum. I'm using MSphysics 1.0.2 with SketchUp Pro 2017.3.

                              [Update on Wednesday morning: As an experiment I changed the collision shape of the cable strips (see below) from compound to box, and that often avoids the crash. Sometimes the simulation even lives long enough to run 7 rotations clockwise and then 7 rotations counter-clockwise. Gravity can be enabled at about 1/300 time steps and higher, even.]

                              Here is a copy of the model file:
                              Viking Lander for SSAA FCC Animation Bare.skp

                              And an image of the general arrangement:
                              MSphysics Flat Cable Bend Issue.jpg

                              The model is scaled up 10x from some actual hardware I am trying to simulate (scaled in the hope of avoiding numerical issues in the simulation caused by the very thin cable). The cable (in the model) is about 30 inches wide and 0.1 inch thick. I have modeled the cable as a series of about 250 thin strips hinged to one another. One end of the cable is anchored to a hinge on a stationary hub (set to be static, tinted green in the above image) at the center of the drum. The other end of the cable is anchored to a hinge that is on the wall of the hollow gray drum. In its initial configuration the cable wraps three times around the stationary hub. The goal is to drive a motor to rotate the drum clockwise six or so full rotations. The flexible cable is intended to gradually unwrap from around the stationary hub, accumulate loosely around the inner face of the drum after three or so rotations, and then re-wrap about three times around the stationary hub in the opposite direction from the initial conditions. There is one motor controller - click it to the left (-1) to rotate the drum in the clockwise direction.

                              I am not very fussy about the hinge joints between the individual cable segments; the goal is to represent a lightweight cable that can flex a fair amount, with a mild tendency to straighten. I have tried friction and both types of spring hinges, with all sorts of parameter settings. Some hinge types make the model explode (which is comical to watch). Others seem to more-or-less behave OK except the cable is not as flexible as I would like. And of course the crash of the software; I'm not sure what aspect of the physics simulation is causing that - hinges or collisions or what. I have disabled gravity and friction for all active bodies. I have tried various settings of continuous-collision and Update-Timestep; the simulation usually survives longer (in simulated time) with higher time steps (e.g., 1/240, 1/480 etc.).

                              Both the cylindrical stationary hub and the hollow drum are modeled as a set of solid groups or components, with the individual pieces being convex. (The stationary hub's segments have some concavity due to two small raised flanges. I'm not sure if this is causing trouble. I used MSphysics feature to show collision wireframes, and what is rendered looks OK to me. I could delete those flanges.) There are also three thin curvy bend-guards to prevent the flexible cable from being bent too tightly at either end. Those guards are also modeled as a set of convex elements.

                              As a plus I would also like to eliminate the narrow visual gaps between adjacent cable strips (which seemed necessary to avoid corners of adjacent strips colliding and thus preventing joint bends). However, the main goal is to avoid the software from crashing as the simulation executes.

                              1 Reply Last reply Reply Quote 0
                              • A Offline
                                Anton_S
                                last edited by

                                Hello TDahl,

                                First of all, very professional work here, in a sence of understanding how to use the plugin despite the lack of documentation on it. Great job!

                                I'm not sure what is causing the crash. I think that the physics engine has a limit on how much joints it can control at once. I will look into this bugsplat issue when I find the time.

                                Meanwhile, there are a couple of things you can do to improve behavior of cable and performance:

                                1. Because you are relying on a small timestep (1/300), reducing solver model, to 4 iterations for example, would improve the performance by a good factor. Solver model basically controls the stability of joints. If your timestep is small, reducing solver model would alter the stability joints by an unnoticeable factor.
                                2. Specificating the collision shape of "FCC Segment Instance" to Box should improve the performance as well. I assume you already did that for your the edited model, but in case you haven't, here is an easy way to do it for all of them: Because all your cable segments have the same name, you can assign a box shape to one of the segments and use the Assign Props to All with Name button, within the MSPhysics UI, to assign alike properties to all instances with the same name.
                                3. Because all joints are flexible, you can simply rely on a Fixed joint, rather than Hinge. This would make the entire cable more stiff and of course improve performance.
                                  I eddied your model, containing all the addressed suggestions and attached it below.

                                Also, if you change a joint within one of the wire segments, which also adds it to all other component instances, you can re-interconnect the segments with their joint by pasting this command into Ruby Console:

                                id = 646194 # Change this to desired joint ID.
                                instance_name = 'FCC Segment Instance' # Change this to instance name
                                ids = [id]
                                Sketchup.active_model.start_operation('OP', true, false, false)
                                Sketchup.active_model.entities.each { |e|
                                  if (e.is_a?(;;Sketchup;;ComponentInstance) || e.is_a?(Sketchup;;Group)) && e.name == instance_name
                                    e.set_attribute('MSPhysics Body', 'Connected Joints', ids)
                                  end
                                }
                                Sketchup.active_model.commit_operation
                                

                                That's the code I used to interconnect the Fixed joints with their segments.

                                Once again, great work, TDahl!

                                Best regards,
                                Anton


                                Viking Lander for SSAA FCC Animation Bare.skp

                                1 Reply Last reply Reply Quote 0
                                • T Offline
                                  TDahl
                                  last edited by

                                  Hi Anton, thank you for the compliment. Your extension and its physics engine are fantastic and (sometimes) maddening. ๐Ÿ˜‰ One area I really do not understand is how the extension works for connecting joints. In some situations it behaves fine: I click on a joint which turns blue, I shift-click on a body which turns green, done. Repeat the same click and shift-click sequence on another joint and another body, done. That's great.

                                  But other times, joints seem to auto-connect to surprising bodies, or change their connections when I attempt to re-connect different joints. I recall in older versions of the plugin there was some kind of connect-closest-joint feature which I cannot now locate in the GUI. I wonder if there is some remnant of that which activates under certain circumstances? Perhaps joint connections are troublesome when there are many joints and bodies in close proximity (which I am doing lately)? Here is a screen capture with a body selected, showing that dozens of joints have become connected to it:
                                  Zealous Joint Connect Behavior
                                  The kind of maddening behavior I'm experiencing tonight is: I click a joint (turns blue), I shift-click a body (turns green). OK. Do that two or three times with nearby joint-body combinations. OK. Then as a sanity-check return to the first combination: click on the first joint, and automagically it is now connected to some other body or bodies, not the one I had set a few moments earlier.

                                  I must not understand how to operate the connect-joint GUI. I'm on a Mac with OS 10.12.6. When the joint connection tool is activated, the hint along the bottom of the SketchUp workspace window says to use CTRL, SHIFT, or both to connect/disconnect. The CTRL modifier causes a pop-up menu to appear with two choices, Disconnect all joints, and Exit. Is that expected? The SHIFT modifier does not always allow me to select the desired object, which I don't understand. In the following screen capture I cannot select the body which has a dashed-magenta outline:
                                  Unable to select the dashed-magenta body
                                  In case it's hard to see, the dashed-magenta body is just below the green-outline body. I am trying to disconnect the selected (blue) joint from the green-outline body and connect it to the dashed-magenta outline body. Shift-clicking on the dashed-magenta body simply causes the dashed-magenta outline to appear and disappear, with each shift-click. The green-outline body remains green.

                                  Shift-clicking on the green body yields confusing results which would take a page to describe, so I will stop here for now. I really hope to understand how I can be in 100% total manual control of how joints and bodies connect. There must be some limitations in what can connect to what that are not apparent in the GUI. I realize that the dashed-magenta outlines represent potentially-connectable objects. Why are only some objects potentially connected, and not others? (Even for a set of objects that are all at top-level in the model hierarchy.)

                                  By the way, thanks for the tip about using a fixed joint rather than a hinge. However, the fixed joint has behaviors that make me prefer the hinge joint for this application. The fixed joint results in a much floppier flexible simulated cable (at least on my computer) compared to a hinge/angular-spring), and I prefer the somewhat stiffer behavior with the hinge. Also, if the simulation lives long enough for 3 to 5 rotations with the fixed joint the cable strips eventually begin to tilt and oscillate sideways and eventually explode the model (which looks pretty cool but is not exactly the goal!).

                                  1 Reply Last reply Reply Quote 0
                                  • A Offline
                                    Anton_S
                                    last edited by

                                    TDahl,

                                    Connect closest joints option is now a default functionality of joint connection tool. It's difficult to explain the behavior of a joint connection tool. That said, it needs a big overhaul. I will work on it after I finish with my other plugin.

                                    Regards,
                                    Anton

                                    1 Reply Last reply Reply Quote 0
                                    • pilouP Offline
                                      pilou
                                      last edited by

                                      Hello Anton

                                      Can we made yet this sort of thing inside MSPhysics ?

                                      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

                                        Pilou, I think that light animation can easily be achieved with MSPhysics and TwilightRender/Skindigo/Kerkythea. Simply attach a lamp to a BallAndSocket joint, play simulation with record enabled, and then export to desired rendering format. Although in this video, a different approach is used, I'm certain that a rendering software would guarantee better results.

                                        1 Reply Last reply Reply Quote 0
                                        • pilouP Offline
                                          pilou
                                          last edited by

                                          Thx for the answer! โ˜€

                                          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

                                            Pilou,

                                            I just made a demonstration of that in MSPhysics and free Twilight: https://drive.google.com/open?id=0B3qg8f4WrNdHZlp4NUd1N0FNXzg

                                            Free Twilight also allows rendering in High+ mode and large resolutions. I used small resolution just to get it to render fast.

                                            This can also be done with Kerkythea but in my opinion Twilight is a better rendering software. When I have time I will do a tutorial of how to set it all up. It shouldn't be to difficult though.

                                            The model is attached below.

                                            Regards,
                                            Anton


                                            Lamp.skp

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 35
                                            • 36
                                            • 37
                                            • 38
                                            • 39
                                            • 46
                                            • 47
                                            • 37 / 47
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement