MSPhysics 1.0.3 (16 October 2017)
-
Windows 10 SketchUp 15 Pro
-
@synsuka3d said:
findBody("name") and findGroupByName("name") ==> version MSPhysics ????, please.
SynSuka3D here are various ways to get bodies and groups in MSPhysics:
- body = simulation.get_body_by_name(name)
- body = simulation.get_body_by_group(group)
- group = simulation.get_group_by_name(name)
- group = this.get_group # get group by body
See extended docs here: http://www.rubydoc.info/github/AntonSynytsia/MSPhysics/MSPhysics/Simulation
Ralphxyz, it works on mine. It strange that it doesn't work on yours. Can you open MSPhysics/main.rb and uncomment
#UI.messagebox
info, on line 21. After you start SU a messagebox box should display with a list of libraries and their loaded IDs. Then post the library names that have their IDs set to zero if there's any. The ID of zero indicates that library failed to load. -
"Error Loading File MSPhysics/main.rb
Could not find included file 'MSPhysics/main.rb'I have main.rb in both MSPhysics folders but it is not found!!
-
Hey Ralphxyz,
Okay, first of all, did you extract MSPhysics_0.7.0 into the plugins folder properly? You said you have main.rb in both MSPhysics folders, what do you mean by both? There should be only one MSPhysics folder in the plugins folder. And that one folder should be named "MSPhysics". Refer to the first post of this thread to see how the MSPhysics related content in the plugins folder should look. Please elaborate more if I misunderstood.
Now, the error you just posted might also mean that you didn't uncomment the requested line in main.rb properly. Here is the main.rb file with the uncommented line. Place and overwrite the original file that is located in ../Plugins/MSPhysics/ folder. After you start Sketchup, a messagebox should appear listing all library names and their IDs. I would like you to post me at the forums which libraries appear with a zero ID (if any).
-
Thanks for the replies
re: two MSPhysics:
C:\Users\Ralph\AppData\Roaming\SketchUp\SketchUp 2015\SketchUp\Plugins\MSPhysicC:\Users\Ralph\AppData\Roaming\SketchUp\SketchUp 2015\SketchUp\Plugins\MSPhysic\RubyExtension\MSPhysics
did you extract MSPhysics_0.7.0 into the plugins folder properly? I "think" that is the problem.
-
Yep, the files are extracted incorrectly.
If you downloaded from github, only the files within the RubyExtension folder should be placed into the plugins folder. The rest are not necessary. In fact downloading from github is not necessary at all. You can download from the first post of this thread instead as it only contains the necessary files.
Once you download, place MSPhysics folder and MSPhysics.rb into the Plugins folder. It should be:
C:\Users[SomeUser]\AppData\Roaming\SketchUp\SketchUp 2015\SketchUp\Plugins\MSPhysics/
C:\Users[SomeUser]\AppData\Roaming\SketchUp\SketchUp 2015\SketchUp\Plugins\MSPhysics.rbIf that's not clear I guess a series of images or a video would be a better alternative for describing how to download plugins...
-
I downloaded from your reference once again and unzipped directly to the plugins folder.
Now:
Error Loading File C:/Users/Ralph/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/MSPhysics/main.rb
Error: #<LoadError: 126: The specified module could not be found. - C:/Users/Ralph/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/MSPhysics/win64/2.0/msp_lib.so>
C:/Program Files/SketchUp/SketchUp 2015/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:45:inrequire' C:/Program Files/SketchUp/SketchUp 2015/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:45:in
require'
C:/Users/Ralph/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/MSPhysics/main.rb:24:in<top (required)>' C:/Program Files/SketchUp/SketchUp 2015/Tools/extensions.rb:197:in
require'
C:/Program Files/SketchUp/SketchUp 2015/Tools/extensions.rb:197:inload' C:/Users/Ralph/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/MSPhysics.rb:119:in
register_extension'
C:/Users/Ralph/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/MSPhysics.rb:119:in<module:MSPhysics>' C:/Users/Ralph/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/MSPhysics.rb:101:in
<top (required)>' -
The extracted path is correct now. The error suggests that your system is missing certain libraries that MSPhysics relies on. I had a few reports similar to yours and I can't figure out what is causing the load error. The only thing that comes to mind is checking whether all other libraries, that msp_lib.so relies on, load properly. To do that, I want you to download main.rb in this post and place it into MSphysics folder, press 'yes' to overwrite the original file. When you start Sketchup, a messagebox will appear listing loaded libraries with their corresponding identifiers. Before pressing "Ok", I want you to see if there are any libraries that have their identifiers set to zero. If there are, please list their names here at the forums so that I could attempt to make them compatible on your system.
-
Hello Anton !!!
I am not an advanced user of MS Physics and SketchyPhysics in the sense that I do not use a code script(one reason is that because I do not really understand how to use it...), but I've used both almost from the beginning...
And I want to say that you did a great job with both !! Thank you very much !I really like to use all objects as they are like in the real world ...but ..
I have a problem with frozen objects..
- I noticed that if an object falls near a frozen one the seccond will fall without being touched...
and ...
how to use emitter objects? I do not understand the definition on how to use these objects ... how to increase their life ? I have to use a code script? I'd like a box where you specify this ..
Thank you !!!
-
Thanks again for the help!! Oh I am using Windows 10.
Sorry for the delay in answering I do not use this computer everyday.
-
Hello Cristyan, thank you for your valuable feedback. The one, and probably the most important, thing that MSPhysics lacks is the instructions and tutorials. Once I get MSPhysics more stable, I would work on tutorials. Meanwhile, I'll try to answer your questions on the post.
The freze thing is a bug. Instead of unfreezing on contact, it unfreezes when bounding boxes overlap. I will fix that bug by the next release.
The emitter dialog is also a bug. I don't even know how I forgot to add the lifetime input-box into the dialog. I probably did, it just not displayed in the dialog, which is a bug. However, as you already do in your model, you can control emitting with script. If you control emitter with script, enabling emitter in the dialog is not required because this means that you will emit same object twice - one with script and the other with the dialog, which I assume isn't necessary. You can disable dialog emitting by settings emitter controller to zero or making it empty. Regardless, I assume you want to emit the pellets sideways as opposed to frontwards in your model. For that case, you change the emitting direction to xaxis rather than yaxis. On the other hand, once I get the emitting bug fixed, you could emit via dialog and the script won't be necessary.
Here is your model with dialog controllers turned off and the emitter script adjusted to shoot sideways rather than frontwards:
emit_test.skp
Once I get those tiny bugs fixed, I will create a tutorial video on emitters and thrusters. -
Hello Ralphxyz, now it's more clear why MSPhysics starts with error on your platform. The SDL libraries that MSPhysics library requires failed to load. I will create a version that does not depend on SDL libraries because compiling them to work on all Windows platforms might be impossible... All SDL libraries do is allow playing sounds in simulation, which is a feature and not a necessity. Anyway, I'll inform you when I get the next version released.
-
Hello !!
Thank you very much for your quick response!
I saw that the file you have posted it was saved in SketchUp 2013 version, I'm using a lot this release but unfortunately the updated versions of some extensions do not work on version 2013... and about a month I started using version 2016 (what I like about this version is the Panel Trays with the auto hide function ..)-
a question - MS Physics is working better on the 2013 version ?
-
"I assume you want to emit the pellets sideways as opposed to frontwards in your model"
nop ... the truth is that I wanted to do something like a pipe under the water with bubbles that come out ... and see the effect
but it's not working because of air density which make these "bubbles" to jump up..Can you halp me how to make a strong chain what ... I'm doing wrong .. ? I want to use MS Physics .. but it seems that it is more fragile ..
Thank you !!!
chain MSPhysics and SketchyPhysics.skp
-
-
Christyan,
I posted it as 2013 version because I wasn't sure which SketchUp version you used. And you do know that you can open SU2013 models with SU2016?
The most recommended version is the latest SU version, which is SU2016 64bit.
To get the bubble effect, you can simply add buoyancy plane. Its accessible in (Extensions) MSPhysics->Create Buoyancy Plane. Once you add it, you can move it over your emitters. You can also control density of the buoyancy, as well as, of the emitted objects for the best effect. By default the density of buoyancy is ~1000 kg/m^3, which is the density of water. While the default the density of bodies is 700 kg/m^3, which is the density of wood. You can adjust them to anything you want.
The chain thingy is a weakness in the physics engines. You can make artificial chains though. You can connect them with ball&socket joints. And the most fastest and efficient way to do it is by copying them. After that some adjustments to joint and simulation properties might be necessary for the best effect. I will post a sample model and a tutorial shortly after.
-
Cristyan, here is a demo of the artificial chain I wrote in the prior post about: MSPhysics Chain.skp
A YouTube tutorial demonstrating how I copied and connected the chain pieces might come another time.Upgrade to the latest MSPhysics 0.7.1 as it might behave improperly in prior versions.
The latest version also fixes the emitter dialog. The unfreeze bug still remains though. What you could do for the moment is shift the frozen body away from any other unfrozen closely positioned objects to prevent the instant unfreeze.
Ralphxyz, I made MSPhysics work without SDL in case the system doesn't support it. Upgrade to the latest version and this time MSPhysics might work on yours.
-
Thanks Anton_S, where is the "latest" version? Just to be sure.
-
The download link to the latest version is in the first post of this topic.
-
Hello !!
--- "And you do know that you can open SU2013 models with SU2016?" - YES
here I have a file (Domino.skp )with one of the first experiment with SketchyPhysics from 2007 and I noticed that SketchyPhysics it is much faster than MS Physics in many other applications It has to do with NewtonDynamics ? can you increase the threads ?
SketchyPhysics - about 40 seconds and MS Physics - around 3 minutes and 10 seconds--- "The chain thingy is a weakness in the physics engines." - ok ... but "my chain" behave more real than that with joints even if it breaks...
in the prior post the file "chain_psihics2_normal.skp"
I have created (SketchyPhysics)two types of chains one longer and one shorter plus two copies of those with another 2 bodies (frozen state)under and these chains behave quite real and after touching the bodies they no longer break...perhaps this is one of the weaknesses of weakness in the physics engines (the chain needs to know that it is currently moving) and this maybe happens even in MSPhysics.
--- file : dominox.skp what I can do about this ?? Small bodies entering in others even if I change the world scale ... it happens even with large bodies... (the idea creating this type of domino effect is from here https://www.youtube.com/watch?v=y97rBdSYbkg )
Now that I have started ..maybe I'm a pain in the axx with these questions ... sorry if I ask inappropriate questions ...
Thank you !!!
a file with one of the first experiment with SketchyPhysics from 2007
-
@anton_s said:
The download link to the latest version is in the first post of this topic.
Thanks,
Error Loading File main.rb
Error: #<LoadError: cannot load such file -- C:/Users/Ralph/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/win64/2.0/msp_lib_no_sdl.so>
C:/Program Files/SketchUp/SketchUp 2015/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:45:inrequire' C:/Program Files/SketchUp/SketchUp 2015/Tools/RubyStdLib/rubygems/core_ext/kernel_require.rb:45:in
require'
C:/Users/Ralph/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/main.rb:28:in `<top (required)>'I have main.rb in the C:\Users\Ralph\AppData\Roaming\SketchUp\SketchUp 2015\SketchUp\Plugins folder.
and in the MSPhysics foder.
-
Ralphxyz,
When you get an error, "cannot load such file..." it might mean that the file doesn't exist. Are you sure you downloaded and extracted the latest version 0.7.1? Please check if there is msp_lib_no_sdl.so in C:/Users/Ralph/AppData/Roaming/SketchUp/SketchUp 2015/SketchUp/Plugins/win64/2.0/. If there is I don't know why it brags; if there isn't, try downaloding and installing MSPhysics 0.7.1 again.
Advertisement