MSPhysics
A realtime physics simulation tool, similar to SketchyPhysics.
MSPhysics

MSPhysics is a real-time physics simulation extension for SketchUp.

MSPhysics allows doing physics simulation of groups and component instances, where each object can be assigned a specific shape, specific states, density, contact properties, magnet properties, script, and more. These features allow complex interactions between objects and the physics world. The parameters of the physics world, such as gravity, update timestep, and solver model, can too be adjusted.

MSPhysics also allows interconnecting objects with joints (constraints) for establishing mechanical interactions between objects. MSPhysics has 14 joints: Hinge, Motor, Servo, Slider, Piston, UpVector, Spring, Corkscrew, BallAndSocket, Universal, Fixed, CurvySlider, CurvyPiston, and Plane. Each joint can be assigned its specific properties, such as minimum and maximum position/angle limits, as well as controllers for controlling position, angle, speed, linear or angular friction, and other. The controllers themselves can be stimulated with a use of a slider controller, keyboard key(s), joystick, and/or a desired script. This flexibility allows creating and inventing many things, such as vehicles, robots, and instruments.

MSPhysics also comes with a reliable Replay animation tool, which allows recording simulation and exporting to SkIndigo, KerkyThea, or a sequence of images.

In many ways, MSPhysics resembles its predecessor SketchyPhysics. First of all, MSPhysics is not a new version of SketchyPhysics. MSPhsyics is written entirely from scratch, integrating the latest Newton Dynamics Physics SDK and heavily basing on a C++ extension. Both are capable of achieving same things, in one way or the other; however, MSPhysics is significantly faster and goes further, especially with a lot of the features described above. MSPhysics has a by far more advanced and a well documented scripting API, allowing users to write more proficient scripts for their models. Another difference is having advantage over user input. In SketchyPhysics there was a struggle in creating keyboard and mouse controlled games. Whenever simulation would run, there had to be an active control panel window to redirect user input, that is to prevent the interference of SketchUp's keyboard shortcuts. In MSPhysics, however, the control panel is not necessary. MSPhysics utilizes AMS Library, which on the Windows side, allows taking control over user input and switching SketchUp fullscreen. Imagine playing FPS games in SketchUp, in fullscreen mode, without having various keyboard commands taking control over the simulation. All that is possible with MSPhysics.

Huge credit goes to Julio Jerez for writing the Newton Dynamics physics engine; as well as, to those who contributed in making this project a reality.

Requires additional plugin, AMS Library 3.5.0+, in order to run.

See MSPhysics homepage for wiki links and other.

Reviews

Martha's picture

I love this plugin but why is it not listed as compatible with SU 2018? I've not run into any issues yet; are there any?

afola m's picture

its greath to use for animation.
i love it.
Cheer
Florindo

thanks...

NOT COMPATIBLE WITH SKETCHUP 2018 PRO SO.

Can you give any insight when this extension will be compatible with SU2018?

Thanks -

Антон, помогите, пожалуйста! Скачиваю модели сделанные с помощью плагина, запускаю, а они разлетаются к чертям во все стороны... Как это исправить?

I'm using a mac, and I love this extension. It totally repurposes Sketchup. It is so user-friendly, has great functionality, and is so versitile. Occasionally glitchy. First time using this, motors and hinges wouldn't work (works now, though). Anton Synytsia, thank you for keeping this plugin free!

Bong D's picture

thank you, great works.

Hello

Is there a way to get (log) data about moving parameters (speed, acceleration, position etc) for particular object?

Best regards

Hi Anton I get notify to update MS Physics through Extension Ware house and when I click to update I get a failure saying unable to read extension archive? Help I also want to learn more about MS Physics:: Common Context and Body Context where do I go to learn more about them?

Hi
I have installed MS Physics and AMS Library for sketch 8 on windows 7 32 biy and the UI is not displaying properly
the buttons as (generate slider controller for servo) is hidden

thanks

Hello,

I am using this pluggin, it is really great! I have a question: is there a set_force() or a set_torque() routine in the Body class that would work in the local space rather than in the global?

Thanks for the answer

hi i am using sketch up 2017 and i can't find compound with cd in collision properties
i need help asap

Anton_S's picture

I disabled Compound from CD shape in this release do to its instability. You can use Fredo6's Convexify Plugin to break down your concave shape into convex hulls. Group them together and set the top level shape to Compound.

You can find Fredo6's Convexify plugin at SketchUcation.

hello again i wonder about servo control i use key to move servo and it keep retract is it anyway to make it not retract?

Anton_S's picture

You can a key_slider command for that.

http://www.rubydoc.info/github/AntonSynytsia/MSPhysics/MSPhysics/CommonContext#key_slider-instance_method

i foung it thx a lot!
it is amazing extension have a lovely day

Why do joints constantly break apart from each other? Is there some sort of fix for this?

Anton_S's picture

Please see two of these videos:

https://www.youtube.com/watch?v=NLeGfJd8aQg
https://www.youtube.com/watch?v=_Ob_YDzzhcw

They will help you with figuring out the cause.

noice

Anyone know how to stop objects from breaking apart from each other? i'm using this to simulate gears, and lever mechanisms and things seem to slowly shake themselves to pieces and fall apart. thanks

same problem.

anyone have a solution to this? this problem renders this extension USELESS!!! everything falls apart and goes off camber. frustrating

I have installed MSPhysics but unable to find it in my SketchUp 2017. Could you direct me to where it is?
Cheers

Zoltan S.'s picture

Hello !
I will try MSP in hope that it's not as desperating to use as Sketchyphysics with the awful features:
1_impossible hierarchy, you are obliged to redo every thing again and again, for example a car, you are challenged to redo each and every joint four times
2_not all human are courageous enough to reach the end of even a simple model
3_strange physics, with interpenetrating objects when they are real size, but they dont (or less) if you make them a km wide. Why the hell?
4_you cannot tell the mass or rigidity of an object. Why take the term "physics"
You see me very hopeful to try anything else
Zoltan

xtian170174's picture

Hi,

The UI size issue started on mine too SU2016
Had a look for a fix or a mention and it's here on this page, still looking for other instances

If I get SU2017, it also means a new computer, so ...

xtian170174's picture

I've located what I reckon is the UI file, "dialog.html"
...it's in e.g. C:/Users/~/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/MSPhysics/html/
I'm wondering if there's an edit I can perform to handle this issue...?

xtian170174's picture

The location e.g.,
C:/Users/~/AppData/Roaming/SketchUp/SketchUp 2016/SketchUp/Plugins/MSPhysics/css/

...has the file,
"dialogue.css"

In here edit the line for overflow to read either 'scroll' or 'auto',
html {

overflow: auto;

Then when you open the UI it should have the means to control it and access the full area of the dialogue...

...At this point - look at dialogue settings in the UI and ensure they are set to 1.0
- this may have been altered because it is similar to the editable scale of the joints associated with Edit Joints Scale [who wouldn't want to set the size to a preferred default in advance of adding joints...].

This has worked for me, hope it may serve the same in other instances :)

Anton_S's picture

But all the overflow tag does is adds scrollbars, which is not desired for the UI dialog, as it should automatically scale to encapsulate the entire content.

Could you indicate which operating system you're using and version, so that I know the environment to explore the issue in?

Also, The joint scale option should automatically adjust the scale of the newly added joints to the preset default. I'm not sure why, as you implied, it doesn't work on yours.

Perhaps all these could be occuring due to overwrite issues. Sometimes when installig the extension, it fails to overwrite/add all the files. Could you try a fresh install by deleting the original versions and installing the new one from scratch? The instructions on doing that are listed at MSPhysics main post: http://sketchucation.com/forums/viewtopic.php?f=323&t=56852#p516427

I'm working on version 1.0.0, in which I already made a lot of core improvements, and it may address the issues you're experiencing. So, stay tuned until it is released.

Also if you want to contribute to the project, you can submit bugs/pull requests to the project's github page: https://github.com/AntonSynytsia/MSPhysics. At the moment, the master commit contains version 0.9.9.

xtian170174's picture

Apologies - forgot to mention
- it's Windows 7 Home Premium with SU2016 using MSPhysics 0.9.9 December 22 2016, just had a rollback [the hardware is probably a little dated for continual use of Win10]...

xtian170174's picture

Hi Anton,

I concur - although the scale options 0.05, 0.1, 0.25, 0.5 etc - 1.0, appear similar and could be easily mistaken one for the other if the user thinks they'd like to always use a certain size joint - the word 'dialogue' is the giveaway, but an oversight will see the user check it out and then find themselves locked out...
The user error is in supposing that the toolbar icon is for [selected] individual adjustment and the UI dialogue adjustment if for setting a [universal] default/template size - just that once done, the UI dialogue size is too small for the contents and so this overflow fix I posted helps get it back to normal...

...I have to admit I went like a bull in a china shop because my immediate experience was everything falling away, then some semblance of solidity using the static object setting, but still I want items that perform only in strict settings [hinge & piston movement] and they continue to move through other components, so I've been test clicking - checking boxes and noting results...
I've also visited the wiki and watched a few videos, still getting to grips with it, I'd like to post a video of my model in action too though so any pointers are much appreciated :)

xtian170174's picture

Having got everything neat looking, I am still seeing my components move through each other - I pasted the script,
# Paste this script into 'body1'
onStart {
@joint = MSPhysics::Fixed.new(this.world, this, this.get_matrix, this.group)
# Disconnect joint when the applied force is reaches or passes the desired
# breaking force.
#@joint.breaking_force = 50000
}

onTouch { |toucher, point, normal, force, speed|
# Check if the touching body is 'body2' and connect only if the joint is
# not already connected.
if toucher.group.name == 'body2' && @joint.valid? && !@joint.connected?
@joint.connect(toucher)
end
# Once the joint is connected it can be disconnected with @joint.disconnect command.
}

...just to see a difference in performance, but it still seems the same ...
- I aim to click on a component and by moving it with the mouse in this way, to see other connected components respond with their limited range of movement and especially without being able to move through each other - This would see their properties as hinges and piston types come to the fore and then a single mouse click/drag operation would 'ripple' through all the components, multiple hinges adjusting accordingly...., so I guess I'm asking if this is a MSPhysics capability...?

gwbi C.'s picture

i'm using sketchup 2016,isn't does not work anymore?
i can't install it.......

Anton_S's picture

It should work with all SU versions. You must delete original MSPhysics versions prior to attempting to install new one. Refer to instructions at MSPhysics homepage for uninstallation/installation details: http://sketchucation.com/forums/viewtopic.php?f=323&t=56852

Al K's picture

Hi Anton!
After installing Ver0.9.9 the RESET command does not work. After I push RESET all the shapes stay on their places and does not return to the starting positions. Version 0.9.8 worked fine. I am using SU2017 Make.

Anton_S's picture

Hello, Al K,

The RESET command works well for me on SU2017, 64bit. You do know that there are two commands one is the STOP command, which neglects to reset the position, and the other is the RESET command, which does reset the positions. Are you sure your clicking the right command. If you are, then try reinstalling MSPhysics by deleting MSPhysics and AMS Library from the plugins folder and installing the new ones again. The instructions are described here: http://sketchucation.com/forums/viewtopic.php?f=323&t=56852#p516427

Best regards,
Anton

plz uptdate to skecthup 2017

2017 :(

Dude, we really need some turtorials for this. I can't say that it's a great extension, because it's not doing what I want to do. And it doesn't seem to be compatible with my version of SketchUp. So an update and some turtorials would be greatly appreciated.

Thanks.

Franck W's picture

Great extension.
I have a problem with UI on screen. I can not resize it, and it is too small, I can not see complete list of tabs, not than complete content below tabs.

How do I change UI size?

Thanks,

xtian170174's picture

Hi, I might have solved this - please the check this thread...

I have downloaded this, and it looks great. But, when I run a simulation, everything just goes into freefall. How do I fix this?

Bryan K's picture

I have installed this plug-in and the potential looks great, however, the UI is not displaying properly. There are no tabs, only text links to what would be the tabs and the rest of the interface is also not displaying correctly.

Any ideas?

Thanks.

Parvan B's picture

Hi!
I am an architecture student and I want to make tensegrity structures, but I can't figure out how to do anything and I can't find any tutorials. Any help/suggestions welcome.
Thanks!

Pancho

Anton_S's picture

Hi Parvan,

You can watch these tutorials, created by Samuel Ketner: https://sites.google.com/a/gc.k12.va.us/mr-ketner-s-technical-drawing-class/home/sketchup

Anton

Parvan B's picture

It seems that I can't access these tutorials - I may need permission for my account. Does anyone have the same problem?

Anton_S's picture

Oh jees. I didn't know that. Have you tried reading this little wiki page: https://github.com/AntonSynytsia/MSPhysics/wiki

Anton_S's picture

Hi, the author posted them on YouTube. You can view them here: https://www.youtube.com/user/samketner/videos?sort=dd&view=0&shelf_id=0

Cameron T's picture

I got the plugin, and I've been looking for a plugin like this for a year or so, because SketchyPhysics isn't supported anymore. I made things like destroyable brick houses now, and I can probably figure the rest of the plugin out. I tried making a wrecking ball with it, but the links in my chain kept on falling through each other. Then I made railroad bogies, and the wheels sprang out of the truck. Does the bouding box have to do with this? Can I make the group "ignore" that box?

Anton_S's picture

Hello Cameron,

There are various aspects that can be responsible for an improper behavior. I will list a few things you can do to prevent it:
1. Reducing simulation timestep in the simulation settings can prevent chains from breaking apart easily. This can be done by opening MSPhysics UI via that MSPhysics toolbar, selecting Simulation tab, and changing Update Timestep, to 1/4 for instance. As well as, increasing the density of all chains, that is, selecting all chain links, right-clicking and selecting MSPhysics->Material->Steel, might make the links stronger.
2. Sometimes, the delinking of chains or having the wheels being forced out from underneath the vehicle's body could be a result of collision shape, or the bounding box, as you mentioned. You can inspect the collision of all bodies by opening MSPhysics UI, selecting Simulation tab, and checking "Collision Wireframe" within the Debug Draw section. This will draw the actual collision shapes of all bodies when you run simulation. If in case the collision is responsible for undesirable effects, you can change the collision shape of an object. A compound collision shape, or a collection of fixed convexhulls, would be the best for a body of a vehicle. Breaking the body into subgroups, that is the convexhulls, would help MSPhysics calculate a proper collision shape. If you want to avoid breaking down an object into subgroups, you can disable the collision of a body, all at once. This can be done by opening MSPhysics UI, activating Body tab, selecting the desired group, and unchecking the "Collidable" property. This is the same as the "nocollision" property in SketchyPhysics.

If none of these aspects resolve the issues in your models, the best way I could help you is by emailing me the model, to anton.synytsia@gmail.com, so I can inspect whats wrong.

Hope this helps,
Anton

28224 users
Size:
7.96 MB
Version:
MSPhysics (1.0.3); October 16, 2017
Number of Views: 
28182
Category: 
OS Compatibility: 
Languages: 
Extensions: 5
I write extensions that use Microsoft Windows API, as well as, integrate and code physics engines.