MSPhysics 1.0.3 (16 October 2017)

Re: MSPhysics 0.9.9 (22 December 2016)

Postby Anton_S » Tue Feb 14, 2017 11:14 pm

@Faust, I don't know. I need to look deeper into that.
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby faust07 » Thu Feb 16, 2017 6:02 pm

OK, thank you.
Have tested MSPhysics "Export Replay to Images" with the new SketchUp Make 2017 M2 (windows 7) and got a similar result as with M1 (windows 10) as mentioned in an older question.
The example is a GIF of exported frames with an original resolution 1920x1080.
0

faust07 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby SynSuka3D » Fri Feb 17, 2017 4:52 am

3

SynSuka3D 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby Anton_S » Fri Feb 17, 2017 6:25 am

faust07 wrote:Unfortunately, changing the Update Rate from 1 to 3 is not useful when camera, joints, emitter, etc. are based on scripts that use the OnUpdate function. Programmed objects become 3 times faster. The appearance of emitted objects no longer fits to the image rate. The weight of the emitted objects or the lifetime seems to change.
For the joints based on pivot points, an option independent of the Update Rate in the user interface seems to be useful for fixing at the pivot point. If this is possible...

The "update rate" option controls the amount of times the simulation is to be updated per frame.
An update rate of 3, for example, tells the newton world to update 3 times a frame.
Now, to answer your question, the behavior of onUpdate event was changed in 0.9.9; instead of being called one time every frame, it was changed to be called every time the world is updated. Thus, it is updates "update rate" times every frame. To fix your problem, use onTick event instead of onUpdate. It is triggered only once every frame. See this link for all the events: http://www.rubydoc.info/github/AntonSyn ... odyContext

faust07 wrote:OK, thank you.
Have tested MSPhysics "Export Replay to Images" with the new SketchUp Make 2017 M2 (windows 7) and got a similar result as with M1 (windows 10) as mentioned in an older question.
The example is a GIF of exported frames with an original resolution 1920x1080.

The "Export Replay to Images" uses SketchUp's view.write_image function to export view into a 2d graphic. I don't think I have control over how the image is exported. Perhaps it's a SketchUp related bug. Or, since it also doesn't render fully with Indigo, it could be your hardware, not having enough memory/processing power (not much of an expert in this), to export a full image. Try exporting replay of a simple model, with only a few geometric objects, with resolution set to 1920x1080, and see if it exports properly.
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby Anton_S » Fri Feb 17, 2017 6:33 am

faust07 wrote:Should make my question more precise:
The reason for the loose behaviour of the joints is the update rate in MSPhysics UI - Simulation - Update Rate = 1 (seems the best for my large model).
If I change this from 1 to 3, the servos remain more stable in the pivot but the spring no longer brings the steady up and down movement.
Have now tried to modify all settings at the Spring Joint, but do not get the desired result.
What can I do?
Thank you in advance, Anton!

I will fix that improper behavior of a spring joint.

Edit: Actually the spring joint works as expected. It was the oscillator function not considering the update rate. I will change the oscillator function to multiply by elapsed time (in seconds), rather than frame, which are two different things.

Edit2: Here is the new oscillator function: You can edit the MSPhysics/common_context.rb and replace the last method with this new one:
Code: Select all
# Get oscillated value of a sine curve.
# @param [Numeric] frequency Number of sine periods per second.
# @return [Numeric] A value ranging between -1.0 and 1.0.
def oscillator(frequency)
  inc = frequency * 2 * Math::PI
  Math.sin(inc * MSPhysics::Simulation.instance.world.time)
end

Note that you will have to retweak the oscillation frequencies for your birdy.
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby Anton_S » Fri Feb 17, 2017 7:08 am

luckyvac wrote:HI,

Here is the robot hand with 22 servo.

Best regards

luckyvac

Luckyvac, this arm is very unstable with MSPhysics. This could be tweaked to be a bit more stable, but it won't be suitable to play a guitar. A programmers approach to creating a guitar would be to fake the arm and finger movements with animation rather than using the actual simulation. But that, then requires a lot of time. What I suggest you do, is look for a different software online, that emulates arm movements and guitar sounds. I'm positive that such software exits.
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby faust07 » Fri Feb 17, 2017 3:16 pm

Thanks, Anton for the explanations.
The Indigo renderer update/halt time difference seems not to be a MSP or hardware problem. I've tested it with different model sizes on different machines. I'll try to ask this in the Indigo forum. In the SkIndigo Render Settings one can set the halt time a few seconds longer than the before tested update time and all is fine.

The incomplete results of the view.write_image function in SketchUp 2017 I will report in the SketchUp Community Forum.

I hope my problems with Servos I can demonstrate in the following examples more dramatically. A mode to hold connected objects in the pivot position would be fine.

The tests with the Update Rate I did only to improve that. No need to change the oscillator script. For non real time simulations (large models with much MSP-objects) the oscillators based on frames are better than based on world time. (on the end the film with 30 frames per second brings the "real time" feeling).
0

faust07 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby luckyvac » Fri Feb 17, 2017 4:03 pm

Hi Anton,
Thank you for your reply. Since I am French I do not speak English well.

I did not understand everything ... the hand is unstable ?

https://www.youtube.com/watch?v=uJerEEx-btw
funny ? ;-)

I do not find :-) She works well my hand ;-). I like sketchup + msphysic because I understand what I do. Other software is too complicated for me. You will have time for: "The table with angles and times must be converted to a Ruby Hash".

At the moment I try this function of time:
********************************************************************************
ft = 9,75 -7,91*cos(6,28*world.time) -0,88*cos(18,84*world.time)
-0,32*cos(31,4*world.time) -0,16*cos(43,96*world.time) -5,27*sin(3,14*world.time)
********************************************************************************
Here is the Fourier series that works :-) youpi !
-9.75+7.91*Math.cos(6.28*world.time)+0.88*Math.cos(18.84*world.time)+0.32*Math.cos(31.4*world.time)+0.16*Math.cos(43.96*world.time)+5.27*Math.sin(3.14*world.time)
************************************************************************

it does not work. What to do? thank you


Thank you very much, Best regards.
luckyvac
1
Last edited by luckyvac on Tue Feb 21, 2017 10:51 pm, edited 3 times in total.
User avatar
luckyvac 
Premium Member
Premium Member
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby SynSuka3D » Sat Feb 18, 2017 4:46 pm

1

SynSuka3D 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby faust07 » Tue Feb 21, 2017 12:20 am

Another problem with a servo and a non-collision object. After the fall of the candle a strange behavior of the flame arises. Collision, gravitation, etc. do not seem to be completely canceled. The joint oscillates in high frequency, which can even lead to a crash. What can I do?
0

faust07 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby Istvan N » Thu Feb 23, 2017 6:16 pm

faust07 wrote:Another problem with a servo and a non-collision object. After the fall of the candle a strange behavior of the flame arises. Collision, gravitation, etc. do not seem to be completely canceled. The joint oscillates in high frequency, which can even lead to a crash. What can I do?


Poorly connected the groups together. I added "Ball and Socket" joint in a new group, and a new "Up vector" to green axis. This disables the rotation.

Try it now:
Test_03.skp
0

Istvan N 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby Anton_S » Sat Feb 25, 2017 5:28 am

Hello, luckyvac,

I added a small script to your guitar to play the sound and control arm/wrist movements based on the table of values you provided in your earlier post. It turns out, it works very well! Great job with getting those angle values! It must have taken you a lot of time. You can download your attached model below.

When I said the hand was too unstable, I meant the MSPhysics version of a hand, not the real one. I apologize if you misunderstood and took it as an offence. In MSPhysics, a hand with 22 servos will not work well. It will be very unstable. Your guitar, however, requires only two servos; one for the arm and the other for the wrist - and it is very stable. So anyway, download the model below and see how it goes. Later, we could create an emulator that would play the real midi notes for the Blowin in the Wind song.

Regards,
Anton
3

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby jakub89 » Sat Feb 25, 2017 11:11 am

Hi,
I have a problem with gears using MSphysics. Is there any way how to fix it?

0

jakub89 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby faust07 » Sat Feb 25, 2017 1:49 pm

Thanks, Istvan. Now it works like desired. Much joints for a little candlelight...
0

faust07 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby Anton_S » Sat Feb 25, 2017 11:04 pm

jakub89 wrote:Hi,
I have a problem with gears using MSphysics. Is there any way how to fix it?


Hi, Jakub,

If you enable the collision wireframe for your model, which can be done by opening MSPhysics UI, activating the Simulation tab, and, enabling the Collision Wireframe, you will see that the collision generated for the gears is improper. All sub collisions of dynamic (movable) shapes must consist from separate convex sub-groups. That said, your gears are concave. To fix it, either split the teeth in separate sub-groups/components, or use this plugin to draw gears instead: viewtopic.php?t=46319

Regards,
Anton
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby Anton_S » Sun Feb 26, 2017 12:32 am

faust07 wrote:Much joints for a little candlelight...

Faust07,

There are better ways for doing a candlelight. You could use particle effects or have a sequence of fire models that would hide unhide at a particular frame, that is, a repeating animation. The particle effects is the best approach as it always unique and easier to make. Besides you could also add a trailing smoke. An example is attached below.

Regards,
Anton
2

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby jakub89 » Sun Feb 26, 2017 2:45 pm

Anton_S, thanks for fast response. I'll try it.
0

jakub89 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby faust07 » Sun Feb 26, 2017 5:29 pm

Hi, Anton. Thank you very much. Again a great example of the particle effect and of a script to learn efficient programming. If we could do the smoke with emitters then there is a chance to render the simulation of the candle.
0

faust07 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby faust07 » Mon Feb 27, 2017 1:35 am

Have found a solution for the problem of SketchUp 2017 animation export of SketchUp 2016 MSPhysics models. Start SUp 2017 and import the SUp 2016 MSPhysics file with the .skp-import funktion. All scene data with layers, stiles, shadows etc. are lost, but the export of animations even of large models works. To open a SUp 2016 MSPhysics model directly and export the simulation from Replay brought the incomplete images. The underlying cause of the problem I could not find unfortunately...
0

faust07 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby chri » Mon Feb 27, 2017 10:10 pm

jakub89 wrote:Hi,
I have a problem with gears using MSphysics. Is there any way how to fix it?



hi jakub89
Please, take a look at the following example.
The study of this example may help you with the problem of collision with the group and the subgroup.

Chri
0
User avatar
chri 
 

SPGears plugin

Postby chri » Wed Mar 01, 2017 9:32 am

HI

SPGears plugin
0
User avatar
chri 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby faust07 » Fri Mar 03, 2017 12:00 pm

After tests with the late discovered Cenvexify (Fredo6 - Fredo Tools) here some problems with the relatively large torus segments with the usual MSP user interface settings.
0

faust07 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby Istvan N » Sat Mar 04, 2017 3:34 am

faust07 wrote:After tests with the late discovered Cenvexify (Fredo6 - Fredo Tools) here some problems with the relatively large torus segments with the usual MSP user interface settings.


Hello Faust07. I copied the slices into a new model and it works well. Always try this solution in such cases.

Convexify_02.skp
0

Istvan N 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby faust07 » Sat Mar 04, 2017 2:00 pm

Thanks again, Istvan. Good to know. It seems to be a similar problem as the frame export in MSP Replay in SUp 2017 using SUp 2016 models. The solution was to copy the content or to import the model into a new model.
BTW, thanks for your shape loader extension! :thumb:
1

faust07 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby faust07 » Wed Mar 08, 2017 4:52 pm

Hi Anton,
during extensive physics calculations, MSPhysics reduces interim phases during image reproduction. Partially over 5 frames, the content remains the same. This can lead to pretty jerky videos. It would be helpful if this setting, at least for exporting the images in Replay, could be turned off?
0

faust07 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby delchrys » Tue Mar 14, 2017 3:45 am

Hello all,

i'm new to msphysics and intermediate at sketchup 2016, and can't get my model to work the way i want.
Is there someone who can point me in the right direction???

I like to reproduce this type of device and then make it animate in sketchup.
https://www.youtube.com/watch?v=MO2Dy7PM7Gs
http://4.bp.blogspot.com/-4t0Ghm1M8VQ/Vh1EDse0mTI/AAAAAAAAAKo/Yo5RzwcT2xs/s1600/HU_1.png


For now i have made some parts already but i want to begin animating already, but can't get it to work.
Someone who wants to help.
I need the parts to be connected and when a cylinders move like a slider, the rest of the parts have to follow.

Kinde regards and thanks,

Bert.
(The Netherlands)
0

delchrys 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby Anton_S » Tue Mar 14, 2017 8:35 am

Hello, Faust,

faust07 wrote:After tests with the late discovered Cenvexify (Fredo6 - Fredo Tools) here some problems with the relatively large torus segments with the usual MSP user interface settings.

Istvan N wrote:I copied the slices into a new model and it works well. Always try this solution in such cases.

Even after copying, the issue still persists. Moving some split shapes toward the center, the original position where they fell through the mesh, made them fall through again. Hate to say that, but it's the bug of the physics engine that MSPhysics is using. Until the physics engine is updated, this is how it will remain and even for the upcoming version 1.0.0. To fix it, have the floor shape be a static box, or a static compound. Or just ensure that the objects don't fall at those places.

faust07 wrote:during extensive physics calculations, MSPhysics reduces interim phases during image reproduction. Partially over 5 frames, the content remains the same. This can lead to pretty jerky videos. It would be helpful if this setting, at least for exporting the images in Replay, could be turned off?

So, you export replay into images and some images remain undesirably the same for 5 consequent frames? Is that what it is? Could I have a test model? You could PM it to me if you want to.

Regards,
Anton
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby faust07 » Tue Mar 14, 2017 10:21 am

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.
0

faust07 
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby Anton_S » Sun Mar 19, 2017 2:50 am

Hello, Bert Broek,

Here is the hydraulic torque wrench with MSPhysics:
delchrys - hydraulic torque wrench.skp

The center of rotation might need some adjusting but it works as good as the model is.

Regards,
Anton
1

Anton_S 
PluginStore Author
PluginStore Author
 

Re: MSPhysics 0.9.9 (22 December 2016)

Postby pilou » Mon Mar 20, 2017 12:17 am

How to "past" the little box falling on the big box as sson as it touches it?
GIF_how_past.gif
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: ohmza1232560 and 8 guests

Visit our sponsors: