SketchyPhysics 3.5.6 (26 January 2015)

Moderator: CPhillips

Re: SketchyPhysics 3.5.2 (September 24, 2014)

Postby pilou » Tue Oct 14, 2014 12:42 am

I'm speaking about the simulation tool, not animation tool. Press the Physics Toggle Play button and wait till the body is cut. As soon as it cuts, press the Physics Toggle Play button once again to pause. From there on you can 'save as' the model, but don't press the reset button, until you do say the model as another model, for instance, cut2.skp


Alas it's that I make but when i Reload the "save as" that is again the start of the simulation!!! :o
idem with your Cut2 file !
A very vicious thing! :)
alas.jpg
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: SketchyPhysics 3.5.2 (September 24, 2014)

Postby Anton_S » Tue Oct 14, 2014 2:37 am

Pilou, I re uploaded the cut2 file.

One thing to remember is that after you save as, unhide all bodies and delete all the temporary hidden split bodies that were part of the original body. I already did this in the new cut2 file.
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.2 (September 24, 2014)

Postby vlkster » Thu Oct 16, 2014 4:00 pm

Ok, i'm having a problem with the control panel/sp inspector. when i name a hinge, using " or ' i don't get a slider bar in the control panel. If i leave off the " or ' than i get a error"script error: undefined local variable or method..."

any help?

thanks
john
0

vlkster 
 

Re: SketchyPhysics 3.5.2 (September 24, 2014)

Postby Anton_S » Thu Oct 16, 2014 7:46 pm

@vlkster, are you saying that you wrote slider("or') in the controller?
If so, then you got it wrong! The quotation marks surrounding the string must be the same!
You may eigher use a double quote (") or a single quote ('), but you cant use a combination of both.
This is what it should look like, slider("or") or slider('or').
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.2 (September 24, 2014)

Postby vlkster » Thu Oct 16, 2014 8:33 pm

Anton_S wrote:@vlkster, are you saying that you wrote slider("or') in the controller?
If so, then you got it wrong! The quotation marks surrounding the string must be the same!
You may eigher use a double quote (") or a single quote ('), but you cant use a combination of both.
This is what it should look like, slider("or") or slider('or').



No i did the way that you have shown.
slider("or") or slider('or')

so i don't know
0

vlkster 
 

Re: SketchyPhysics 3.5.2 (September 24, 2014)

Postby Anton_S » Thu Oct 16, 2014 10:01 pm

vlkster wrote:so i don't know

Is your hinge connected to the object ? Can you upload the model so I could investigate?
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.2 (September 24, 2014)

Postby Anton_S » Thu Oct 16, 2014 10:46 pm

Trobius wrote:Oh, actually I did think of something else that I would like to see:

Could you create a function which would allow you to retrieve the "parent" of an emitted object? (eg, toucher.getEmitter?)

I added $sketchyPhysicsToolInstnace.getEmitter(grp). This will return the group from which the body group was emitted, or nil if grp wasn't emitted.

Once I post an update, use this technique to get body emitter:
Code: Select all
onTouch { |toucher, speed, pos|
  emit_grp = sp_tool_instance.getEmitter(toucher.group)
  emit_body = simulation.findBody(emit_grp)
}
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby vlkster » Fri Oct 17, 2014 1:11 pm

[/quote]
Anton_S wrote:Is your hinge connected to the object ? Can you upload the model so I could investigate?

https://drive.google.com/file/d/0B3sm21 ... sp=sharing
Don't make to much fun of my model, just messing around to get a feel for SketchyPhysics.

john
0

vlkster 
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby faust07 » Fri Oct 17, 2014 1:25 pm

Hi Anton, thanks for resolving the significant errors in Sketchy Physics! A dream has come true. I tested an older large Model (was running but regularly crashed in version 3.2) with animated vehicles and animated camera and it runs almost flawlessly. To change I had only connected mirrored groups or components, whose collision geometry the new Physics (3.5) misinterpreted. The import of Replay Data into Twilight 1.5 and 2.0 seems to be working very well too. My goal is to simulate a futuristic urban space (WIP) with animated vehicles, aircraft, ships, people and cameras, which seems possible now. There is only the problem of time (leisure and rendering speed) ... Once again Thank you! :thumb:
0

faust07 
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby Anton_S » Fri Oct 17, 2014 4:22 pm

vlkster wrote:Don't make to much fun of my model, just messing around to get a feel for SketchyPhysics.

Nice rail car! :thumb: There are few things need to be done though.
  • Your controllers are set to hinge in the rear wheels. The command hinge doesn't exist. In the controller section, you don't write the name of of the joint, but rather the command -- what joint is supposed to do, when is the wheel supposed to spin. In the controller section, the basic command is slider. Replace hinge in both controllers with slider("hinge"). There you will have some sort of a vehicle :)
  • Hinges are not good for motor purposes. I'd suggest using motor joints.
  • Your rail needs to be covered with faces on both sides, and set to staticmesh, and needs to be smoother.
  • Your car needs to be set to convexhull or convexhull2 collision.
I uploaded your model with such improvements! FYI, I purged unused definitions and materials. The model size is much smaller now.
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby Anton_S » Fri Oct 17, 2014 4:37 pm

faust07 wrote:Hi Anton, thanks for resolving the significant errors in Sketchy Physics! A dream has come true. I tested an older large Model (was running but regularly crashed in version 3.2) with animated vehicles and animated camera and it runs almost flawlessly. To change I had only connected mirrored groups or components, whose collision geometry the new Physics (3.5) misinterpreted. The import of Replay Data into Twilight 1.5 and 2.0 seems to be working very well too. My goal is to simulate a futuristic urban space (WIP) with animated vehicles, aircraft, ships, people and cameras, which seems possible now. There is only the problem of time (leisure and rendering speed) ... Once again Thank you! :thumb:

Thanks for feedback faust07! Since SP3.5, mirrored bodies no longer unflip when simulation starts. I tested this improvement in quite a few cases, but never found where collision was improper. Could you share a piece of model where the collision geometry is misinterpreted? I will see what I could do to fix it.

And GL with urban space 8-)
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby pilou » Fri Oct 17, 2014 6:09 pm

Except the case of the "save as" that is not yet resolved for me for mysterious reason
how works the "explode volume" ?
It's just scripting or there is a Menu / Button for apply this function to a selection of Groups / Components ?
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby vlkster » Fri Oct 17, 2014 6:36 pm

Anton_S wrote:
vlkster wrote:Don't make to much fun of my model, just messing around to get a feel for SketchyPhysics.

Nice rail car! :thumb: There are few things need to be done though.
  • Your controllers are set to hinge in the rear wheels. The command hinge doesn't exist. In the controller section, you don't write the name of of the joint, but rather the command -- what joint is supposed to do, when is the wheel supposed to spin. In the controller section, the basic command is slider. Replace hinge in both controllers with slider("hinge"). There you will have some sort of a vehicle :)
  • Hinges are not good for motor purposes. I'd suggest using motor joints.
  • Your rail needs to be covered with faces on both sides, and set to staticmesh, and needs to be smoother.
  • Your car needs to be set to convexhull or convexhull2 collision.
I uploaded your model with such improvements! FYI, I purged unused definitions and materials. The model size is much smaller now.


Thats awesome!!! thank you for your help!! that solves the mystery for me.

thanks again

John
0

vlkster 
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby Anton_S » Fri Oct 17, 2014 6:46 pm

Pilou wrote:Except the case of the "save as" that is not yet resolved for me for mysterious reason
how works the "explode volume" ?
It's just scripting or there is a Menu / Button for apply this function to a selection of Groups / Components ?

Its just scripting. Would of been helpful if I could understand which part you are confused on.
Here are the steps I would like you to follow, on how to save broken rocks. Please reply on those that don't work or you're confused on.
  1. Open a model and select a group you want to be broken.
  2. Open the SP UI, and paste this code in the scripted field: onStart { split(self, 2) } This piece of code will split body when simulation starts. Change 2 to higher value if want to split body into more pieces. Make sure the scripted checkbox is checked.
  3. Press physics toggle play button to start simulation. You will see that your body got split into pieces.
  4. At desired frame, press physics toggle play once again to pause simulation. You may either press it right away after simulation starts to maintain full form or when pieces of rocks fall and rest on floor - Its up to you.
  5. Once simulation is paused, go to (Menu) > File > Save As and give it a different name (don't overwrite the default model).
  6. Now you may press physics reset, and close the current model without saving it.
  7. Open the new saved model, and there you will see cut rocks at desired locations.
  8. Now, before you use them it is essential to erase all hidden temporary pieces of rocks. So, enable view hidden geometry option, and delete all hidden pieces of rocks.
  9. From there, you may use the left over rocks for your purpose.

The sketchyphysics split method was meant for ingame effects, not for saving purpose. A plugin could be developed that will split body into multiple pieces though. It's very simple and I will create it for you.
0
Last edited by Anton_S on Fri Oct 17, 2014 9:15 pm, edited 1 time in total.

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby Anton_S » Fri Oct 17, 2014 8:08 pm

Ok, here is split to pieces plugin.

Usage: Select group/component to split and apply the menu option.
Access: (Menu) Plugins > Split to Pieces

ams_SplitToPieces.rb
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby pilou » Fri Oct 17, 2014 8:20 pm

The plugin works fine! :fro:
I will now study your very detailed explanation! ;)

0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby Anton_S » Fri Oct 17, 2014 8:42 pm

Pilou wrote:The plugin works fine! :fro:
I will now study your very detailed explanation! ;)

Very well. No need to study the detailed explanation if you plan to use the plugin. One thing to remember, when you use the plugin, set all pieces to convexhull2 for proper collision generation. By default, all collisions are boxes, derived from the groups' bounding box.
0
Last edited by Anton_S on Fri Oct 17, 2014 8:51 pm, edited 1 time in total.

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby pilou » Fri Oct 17, 2014 8:51 pm

Alas again! :shock:

drama.jpg
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby Anton_S » Fri Oct 17, 2014 8:57 pm

Pilou wrote:Alas again! :shock:

drama.jpg

So you are saying that whenever you 'save as' the model with original positions is saved, but not with the current positions, right?
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby pilou » Fri Oct 17, 2014 9:01 pm

...right ?

I save like you said before when i had press again the Toggle Play Button so the blocks on the ground exploded visible!
Exactly! :)
0
Last edited by pilou on Fri Oct 17, 2014 9:04 pm, edited 2 times in total.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby Anton_S » Fri Oct 17, 2014 9:03 pm

Pilou wrote:
...right ?

Exactly! :)

I can't seem to reproduce this. It works on myne, Win7, SU2014.

What SU version are you using? I can see you're using Win8.
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby pilou » Fri Oct 17, 2014 9:05 pm

Yes Windows 8.0 + SU 2014 0. 49 000 - I don't want 8.1
and SketchyPhysics 3.5.2 :)

I will install 3.5.3 but I am confiant in the result! ;)
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby Anton_S » Fri Oct 17, 2014 9:13 pm

Before I try it on my Win8, I would like you to clarify. So you pressed play, paused at desired time, saved as, reset simulation, close the model without saving it again, opening the saved model, and you have your rocks at current locations.

If you did save after the 'save as' then here is your problem... Saving after the 'save as' will overwrite the 'saved as' model.
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby pilou » Fri Oct 17, 2014 9:17 pm

Bingo! All works fine with the 3.53 !!! :enlight: :thumb: :fro:

The problem is resolved and was in the N° of version of SketchyPhysics (for me) ! :ugeek:
You rocks! 8-)
resolved.jpg
0
Last edited by pilou on Fri Oct 17, 2014 9:24 pm, edited 1 time in total.
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby Anton_S » Fri Oct 17, 2014 9:23 pm

Pilou wrote:Bingo all works with the 3.53 !!! :enlight: :thumb: :fro:

Great! Just a side note: Viewing the picture, I see that all pieces have box collisions. Set their collision to Convexhull2 for proper collisions generation.
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby pilou » Fri Oct 17, 2014 9:25 pm

Thx for the Hint of the Convex Hull2! :enlight:
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby Anton_S » Fri Oct 17, 2014 9:27 pm

I'm glad it's resolved 8-)
0

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby pilou » Fri Oct 17, 2014 9:37 pm

Your plugin "Split" is excellent! :enlight:
It's a part of the "physic" engine or your own cooking?

split01.jpg
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
pilou 
Top SketchUcator
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby Anton_S » Fri Oct 17, 2014 10:38 pm

Pilou wrote:Your plugin "Split" is excellent! :enlight:
It's a part of the "physic" engine or your own cooking?

split01.jpg

Just copied code snippets from SketchyPhysics and some cooking of course :lol:
1

Anton_S 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics 3.5.3 (October 16, 2014)

Postby Anton_S » Sat Oct 18, 2014 11:07 pm

Okay, I've fixed enough bugs. Moving to MSPhysics now!

By improving SP, I learned quite a lot, especially the ideals and approaches to take when writing MSPhysics.

It's now up to Chris Phillips and other interested in such plugin to enhance and add features. I will no longer keep supporting SketchyPhysics as I am quite busy with College and need to make some progress in MSPhysics. Other than that, I won't mind answering questions on how to properly use SP.
1

Anton_S 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to SketchyPhysics

Who is online

Users browsing this forum: No registered users and 9 guests

Visit our sponsors: