SketchyPhysics 3x June 27 version.Moderator: CPhillips
96 posts
• Page 1 of 4 • 1, 2, 3, 4
SketchyPhysics 3x June 27 version.Here is a new Experimental version. Its major feature is the new scripting system so it is primarily for users who are comfortable with script. It is work in progress code and possibly very buggy. You guys let me know.
Because this is not even an alpha I am putting a notice not to upload to 3dwarehouse. But PLEASE post models to these forums. I need to know how you are using the scripts so I can figure out how they will ultimately turn out. Documentation for this release is going to take a while. I will start with examples in the next post. Chris http://sketchyphysics2.googlecode.com/files/SetupSketchyPhysics3x-Jun27.exe No Mac version yet but there will be soon.
Re: SketchyPhysics 3x June 27 version.Here is an example using the new scripting system. It uses the "ontouch" event to create joints between objects. The wheels on the car will connect with a hinge the first thing they touch, in this case the box. The spheres will connect with a ball joint everything they are touching the first frame. That allows them to connect to anything they are touching in the chain.
The nice thing about joints made this way is that you can copy them and they still work as expected. Please, register (free) to access all the attachments on the forums.
Re: SketchyPhysics 3x June 27 version.This example adjusts linearDamp to make bodies act like they are in space. Also shows that objects can be started in motion.
Please, register (free) to access all the attachments on the forums.
Re: SketchyPhysics 3x June 27 version.Simple breaking objects. The breaking interface is really a work in progress. Sometimes objects breaking can cause Sketchup to crash.
Please, register (free) to access all the attachments on the forums.
Re: SketchyPhysics 3x June 27 version.In the ontouch event, is the speed the speed of the collider at impact... and pos the point of impact?
And thanks for those demos! Here's my first proper model with it, copyable ragdolls! You can't freeze them normally, but you could probably set them to freeze on frame 1, after the joints have connected.Please, register (free) to access all the attachments on the forums.
Re: SketchyPhysics 3x June 27 version.Chris, how DO you freeze objects in script? Has that been added yet? I've tried frozen=true and frozen(1), but no luck.
Re: SketchyPhysics 3x June 27 version.Since this version is unstable, it would be best if you created a method that stops the simulation, after an amount of time, if something strange happens, or the ismulation gets laggy(breaking feature).
Re: SketchyPhysics 3x June 27 version.
Yes.
Re: SketchyPhysics 3x June 27 version.
Doesn't look like I have hooked that up yet.
Re: SketchyPhysics 3x June 27 version.
There isn't a "magic bullet" for that. I need to find all the different ways it can break and then tackle them one at a time. Post any code you find that breaks the sim and I'll put the right error checking in.
Re: SketchyPhysics 3x June 27 version.Pretty nice cloth demo. Once again, totally copyable! I love the scripted joints
![]() Please, register (free) to access all the attachments on the forums.
Re: SketchyPhysics 3x June 27 version.That's a nice representation of cloth, Wacov!
Re: SketchyPhysics 3x June 27 version.Thanks guys! One thing I'm finding with the cloth is it tends to collide with itself. That seriously slows stuff down, and it's not really neccessary for a semi-realistic simulation. Can we have object-specific collision detection? So, give the choice to either collide with everything, collide with everything except '...', or collide with nothing but '...'. Keep it pretty intuitive, so using a string finds objects of that name, a var for specific objects, and let us put them into an array if needed.
So, on the cloth, I'd name all the bars the same, and tell them to collide with everything except each other. You might also be able to make a crude fluid flow effect by creating spheres that only collide with the static mesh.
Re: SketchyPhysics 3x June 27 version.I love the new Script field and script but I was wondering is there any way you can control a scripted joint with a slider or key.
Have A Good Day!
Re: SketchyPhysics 3x June 27 version.Just a little test. Hit Play and see what happens
Please, register (free) to access all the attachments on the forums.
Re: SketchyPhysics 3x June 27 version.YES!! The simulation finally registers in-simulation created objects!
Re: SketchyPhysics 3x June 27 version.
In the physics engine you would need materials to do that. So don't expect it until SPIV. One thing you could do that might speed things up is to change the connect script to something like this.
Re: SketchyPhysics 3x June 27 version.
Not yet.
Re: SketchyPhysics 3x June 27 version.Will we be able to embed sound files anytime soon?
Re: SketchyPhysics 3x June 27 version.I tried something similar to javixp's line generator, but the groups I generated are not registered.
Please, register (free) to access all the attachments on the forums.
Re: SketchyPhysics 3x June 27 version.I dont know about the sound. I havent touched that code in a while, but I will see if it still works and let you know.
Re: SketchyPhysics 3x June 27 version.Tracks'n'Treads are much easier. I realy like the new version!
Please, register (free) to access all the attachments on the forums.
Re: SketchyPhysics 3x June 27 version.Me too! Self connecting joints are a feature I have been trying to achieve since version 1. I HATE the JCT. Its hard to explain, tedious to use and is the reason you cant copy jointed objects. Its THE major reason I started SPIV. So, I am really glad it turns out to be possible in SP3.
![]()
Re: SketchyPhysics 3x June 27 version.Here is an example of a very simple camera system.
The first example puts the camera eye at the position of the sphere and looking at [0,0,0]. The second example finds the cone in the scene and looks at that. Note you can drag the cone and the camera will follow. The @simulation.camera.set commands parameters are location of the eye, the target and the "up" direction. The camera is the same as the camera in the Sketchup API: http://code.google.com/apis/sketchup/do ... amera.html Please, register (free) to access all the attachments on the forums.
Re: SketchyPhysics 3x June 27 version. Now we can create multi-roll games! ![]()
Re: SketchyPhysics 3x June 27 version.
Thanks, now it's much better (After a few times playing the animation it becomes kinda slow). PhysicsGuy, well done I like your boxes creator, but there are too much boxes and it'll make the simulation laggy.
Re: SketchyPhysics 3x June 27 version.It's only half-SP related, but how do you move the ends of a script-created line using script? I've given up trying to replace existing lines on-the-fly, I figure it'd be easier to make them at the beginning of the simulation (or, if possible, before it), then move them every frame. They'd just be there to hold the faces for cloth, and something else I've got planned
EDIT: Figured it out! Took alot of searching around, the API documentation isn't all that helpful I'm SURE this one's overcomplicated, but it's the only way I could find. EDIT: Hopefully, I've fixed the problem Please, register (free) to access all the attachments on the forums.
Last edited by Wacov on Tue Jun 30, 2009 5:42 pm, edited 1 time in total.
SketchUcation One-Liner AdvertsArtisan Organic Toolset - a set of powerful organic modeling tools.
Premium Members get 20% discount!
96 posts
• Page 1 of 4 • 1, 2, 3, 4
|