SketchyPhysics3 Release Candidate 1

Moderator: CPhillips

SketchyPhysics3 Release Candidate 1

Postby CPhillips » Thu Mar 26, 2009 11:21 pm

This version is basically done. But needs a bit of testing and bug fixing before it can be a 3.0.

There are a few new features and a bunch of fixes.

The first new feature is a new fixed joint type. Its handy when connecting thrusters or magnets to other bodies. The second feature is the fixed joint is also breakable. The third is that bodys can now have no collision. What this is useful for will become apparent latter on.

Also a few new script commands.
Code: Select all
setVar("foo",1.0)

will set the variable "foo" to 1.0.
Code: Select all
getVar("foo")

will now be equal to 1.0.

Variables will be saved until the simulation is reset. And they are global. That means any object can see them. So a formula in say a thruster can get and set a variable that a servo also uses (for example).

Most of the fixes were to get the Mac WebDialogs to behave. So there may be bugs there. On Mac you can apparently still loose a fields contents if you dont click away from the field before you select an object in Sketchup.

I also removed the copy on double click feature. It was seldom used and was getting in the way of other features.

Demos to follow...

Changes:
Added Fixed joint type.
Made fixed joint breakable.
Added ablity for objects to be nonsolid via nocollision flag
-Removed copy on doubleclick option.
-Removed copy menu item.
Added Mac dynlibs to installer.
Fix blurry buttons on Mac
Suppress key sound on Mac control panel.
Fixed some of the Mac WebDialog focus problems.
Added image export option to SketchyReplay
Fixed bug where sliders wouldnt show up for some fields.
More error and type checking on formulas.
Added setVar and getVar commands
Added getSetVar() command. Not totally thrilled about the name or the concept.
Added frame number to status bar while running.
Fixed bug in webdialogs to do with "hard spaces"

Windows installer:
http://sketchyphysics2.googlecode.com/f ... taller.exe

Mac (and Windows) version as a Zip:
http://sketchyphysics2.googlecode.com/f ... -Fixed.zip

Edit Mar 30:
Updated Mac version with missing .bundle file.
0
Last edited by CPhillips on Tue Mar 31, 2009 2:05 am, edited 1 time in total.
Reason: Updated link to Mac version with missing .bundle file.

CPhillips 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics3 Release Candidate 1

Postby xrok1 » Fri Mar 27, 2009 2:13 am

i love how it saves the position of the camera at start, i was just thinking that would be great before i installed the new ver. :D

PS the new breakable joints aren't too bad either. :lol:
0
“There are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

http://www.Twilightrender.com try it!

xrok1 
 

Re: SketchyPhysics3 Release Candidate 1

Postby CPhillips » Fri Mar 27, 2009 2:39 am

I forgot I added that. Its actually a fix. It used to work, but broke at some point in the distant past.
0

CPhillips 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics3 Release Candidate 1

Postby Alienizer » Fri Mar 27, 2009 4:57 am

Perhaps not the right place to ask this question (to CPhillips) but, what is the reason for not having a "weight" attribute?
0
I'm from Mars and moved to Earth to alienize you. Unfortunately, I became humanized.

Alienizer 
 

Re: SketchyPhysics3 Release Candidate 1

Postby shareck » Fri Mar 27, 2009 2:51 pm

can someone tell me how do i use image export option thats been added to sketchy replay?
0

shareck 
 

Re: SketchyPhysics3 Release Candidate 1

Postby CPhillips » Fri Mar 27, 2009 8:41 pm

No weight because objects dont have materials yet. Thats planned for SPIV.

Image export is in the Plugins->SketchyReplay->Export animation dialog.

Note Replay still doesnt support emitted objects.
0

CPhillips 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics3 Release Candidate 1

Postby Alienizer » Fri Mar 27, 2009 11:33 pm

CPhillips wrote:No weight because objects dont have materials yet. Thats planned for SPIV.


I'm confused CPhillips. What do materials have to do with the weight of an object? If we make a box and assign 12lb to it, then it doesn't matter if it's solid or hollow, or what material it is, isn't it??
0
I'm from Mars and moved to Earth to alienize you. Unfortunately, I became humanized.

Alienizer 
 

Re: SketchyPhysics3 Release Candidate 1

Postby CPhillips » Fri Mar 27, 2009 11:58 pm

I wish I could just say I weigh 180 and have it be so. :)

In short the physics engine doesn't support absolute weighting of stuff.

In physics as in real life the weight (mass) of something is determined by how much stuff in it and how dense it is. Steel is denser then wood so it weighs more. Thats why the physics engine uses materials.
0

CPhillips 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics3 Release Candidate 1

Postby Wacov » Sat Mar 28, 2009 2:13 pm

I think mass is determined by density and volume, but weight is determined by mass and gravity. Objects in a weightless environment still have mass... but maybe you could insert a tool that tells you an object's weight, in the thruster power it would take to make it neutrally 'bouyant' in the air?

Oh and can you make the camera reset remember the field of view setting?
0

Wacov 
 

Re: SketchyPhysics3 Release Candidate 1

Postby CPhillips » Sat Mar 28, 2009 8:11 pm

Maybe. But I dont know how to change the fov.
0

CPhillips 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics3 Release Candidate 1

Postby Wacov » Sat Mar 28, 2009 8:49 pm

Camera/Field of view

Drag like the zoom tool or type a number... but I'm not sure if that's what you mean...
0

Wacov 
 

Re: SketchyPhysics3 Release Candidate 1

Postby CPhillips » Sat Mar 28, 2009 9:32 pm

I guess so. But when I do that the simulation resets. How does it get changed in the course of a simulation. I need to know so I know when to save it.
0

CPhillips 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics3 Release Candidate 1

Postby Wacov » Sat Mar 28, 2009 9:56 pm

It isn't! That's the problem! It resets to the default 30 degrees, when the simulation started at 70. This happens in MotorSketch Mesa, at least to me.
0

Wacov 
 

Re: SketchyPhysics3 Release Candidate 1

Postby CPhillips » Sun Mar 29, 2009 2:08 am

Ah. I see. Yeah Ill fix.
0

CPhillips 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics3 Release Candidate 1

Postby =Physicsguy= » Sun Mar 29, 2009 2:33 am

Is it possible to alter variables within the simulation? I mean being able to control it with keyboard or joystick. I don't want a consistent position. Is that possible? If so, can you give me a script example?
0

=Physicsguy= 
 

Re: SketchyPhysics3 Release Candidate 1

Postby CPhillips » Sun Mar 29, 2009 2:36 am

Be a little more specific..
0

CPhillips 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics3 Release Candidate 1

Postby =Physicsguy= » Sun Mar 29, 2009 3:12 am

I mean like the setvar and getvar scripts. Can it be alterable during the simulation?
0

=Physicsguy= 
 

Re: SketchyPhysics3 Release Candidate 1

Postby CPhillips » Sun Mar 29, 2009 3:33 am

Still not following. What is get/setVar not doing?
0

CPhillips 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics3 Release Candidate 1

Postby =Physicsguy= » Sun Mar 29, 2009 3:43 am

I might not be right. When you wrote that it will retrieve the variable, i thought you could change the variable, like on a control panel slider. it is like two joints controlled with the same name.
0

=Physicsguy= 
 

Re: SketchyPhysics3 Release Candidate 1

Postby Alienizer » Sun Mar 29, 2009 4:15 am

CPhillips wrote:I wish I could just say I weigh 180 and have it be so. :)

In short the physics engine doesn't support absolute weighting of stuff.

In physics as in real life the weight (mass) of something is determined by how much stuff in it and how dense it is. Steel is denser then wood so it weighs more. Thats why the physics engine uses materials.



I understand what you are saying CPhillips, but without density, mass, weight or whatever we call it, some simulations can not be done properly. If you collide a ball of steel with a ball of wood, both of the same size (not mass), the simulation is very incorrect, they both propel in equal force, and that's way wrong. It doesn't matter for gravity as object of different weight will fall at the same speed, but when they collide, it's a new ball game. Material should not be used for this purpose, an object should have a "Mass,Density or whatever" attribute that we can set, regardless of what material we use. Material is for the look.

Take a look at your demo of the car you just did. When the whole car hit the wheel of another, it breaks off, at the same rate as if a wheel hit that wheel. Not very realistic don't you think? Not just for your car demo, but for other simulations. Say, a pool table where the 9 ball is made of gold, then what? it act just as the rest of the balls, that's just not right! We should be able to drop a rock on a piece of wood and have it react realistically. I piece of wood can't just hit a rock and make it fly off the ground!
0
I'm from Mars and moved to Earth to alienize you. Unfortunately, I became humanized.

Alienizer 
 

Re: SketchyPhysics3 Release Candidate 1

Postby Wacov » Sun Mar 29, 2009 11:02 am

The physics material would be entirely separate from the SketchUp material; so you'd be able to set a box to behave like wood, but it could be painted as steel. These materials would be like templates, with settings you can modify, like density and friction. Maybe a material manager could be implemented? The UI's kinda crowded.
0

Wacov 
 

Re: SketchyPhysics3 Release Candidate 1

Postby Alienizer » Sun Mar 29, 2009 5:14 pm

Wacov wrote:The physics material would be entirely separate from the SketchUp material; so you'd be able to set a box to behave like wood, but it could be painted as steel. These materials would be like templates, with settings you can modify, like density and friction. Maybe a material manager could be implemented? The UI's kinda crowded.


If it's going to work that way, then it'll be perfect, as long as we can make our own material of course. Do you know for sure that's how it'll be, or you're just guessing?
0
I'm from Mars and moved to Earth to alienize you. Unfortunately, I became humanized.

Alienizer 
 

Re: SketchyPhysics3 Release Candidate 1

Postby Wacov » Sun Mar 29, 2009 6:06 pm

That's how it SHOULD be IF it's implemented. That's (I think) how it works in the newton physics playground, so the same kind of thing could be done with SP.
0

Wacov 
 

Re: SketchyPhysics3 Release Candidate 1

Postby Alienizer » Sun Mar 29, 2009 6:13 pm

Wacov wrote:That's how it SHOULD be IF it's implemented. That's (I think) how it works in the newton physics playground, so the same kind of thing could be done with SP.


Makes perfect sense to me.
0
I'm from Mars and moved to Earth to alienize you. Unfortunately, I became humanized.

Alienizer 
 

Re: SketchyPhysics3 Release Candidate 1

Postby warriorcat » Sun Mar 29, 2009 9:30 pm

Hey,how do you make magnets and thrusters work? I can't seem to make them work.
0

warriorcat 
 

Re: SketchyPhysics3 Release Candidate 1

Postby =Physicsguy= » Sun Mar 29, 2009 9:52 pm

For an uncontrollable thruster, check the box placed next to thruster in the UI. Then put in a simple value like 5000 in the strength field. If it is a big object, then the number must be increased. A controlled thruster code(placed in strength field)will be like this: -(controller)*value. A simple example will be -(key('space'))*5000. You can replace space with any character on the keyboard. If you have a joystick, you can put in just A or B or X or Y for the buttons. You can also put in lefty or leftx, being y axis and x axis respectively. You can do the same with right in the place of left, for the right stick(if you have one) Remember that if you don't have a joystick, you can still control the lefty and righty with the keyboard. Lefty is w/a/s/d, and righty for the arrow keys. For magnets, check the magnet box in the UI. Then enter a value. Create another object and check the magnetic box. The magnetic object will cling to the magnet. Try a higher value. You can also control magnets. Hope this helps!
0

=Physicsguy= 
 

Re: SketchyPhysics3 Release Candidate 1

Postby warriorcat » Mon Mar 30, 2009 2:07 am

Thanks
0

warriorcat 
 

Re: SketchyPhysics3 Release Candidate 1

Postby CPhillips » Mon Mar 30, 2009 2:25 am

=Physicsguy= wrote:I might not be right. When you wrote that it will retrieve the variable, i thought you could change the variable, like on a control panel slider. it is like two joints controlled with the same name.


Ok, I think I understand. Right now you can only get variables that have been set. That may change at some point.

What var did you want to change?
0

CPhillips 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics3 Release Candidate 1

Postby CPhillips » Mon Mar 30, 2009 2:30 am

Alienizer wrote:
Wacov wrote:The physics material would be entirely separate from the SketchUp material; so you'd be able to set a box to behave like wood, but it could be painted as steel. These materials would be like templates, with settings you can modify, like density and friction. Maybe a material manager could be implemented? The UI's kinda crowded.


If it's going to work that way, then it'll be perfect, as long as we can make our own material of course. Do you know for sure that's how it'll be, or you're just guessing?

Yes that is more or less how it works. If it was just a matter of setting mass it would be easy, but it also has all the other properties of a material like friction.

Part of the problem is that you need to setup material to material values. So if you have wood and ice you have a wood/wood table and a ice/ice table and a wood/ice table. Then if you add say steel then you need all those plus steel/steel and steel/wood and steel/ice. As you can see it adds up to a lot of tables to fill in. The UI is going to be tricky.
0

CPhillips 
PluginStore Author
PluginStore Author
 

Re: SketchyPhysics3 Release Candidate 1

Postby Alienizer » Mon Mar 30, 2009 2:52 am

CPhillips wrote:Yes that is more or less how it works. If it was just a matter of setting mass it would be easy, but it also has all the other properties of a material like friction.

Part of the problem is that you need to setup material to material values. So if you have wood and ice you have a wood/wood table and a ice/ice table and a wood/ice table. Then if you add say steel then you need all those plus steel/steel and steel/wood and steel/ice. As you can see it adds up to a lot of tables to fill in. The UI is going to be tricky.



Why the need for material to material values? If one material has more friction than another one, it shouldn't make any difference what material it comes into contact with, because both material will then be evaluated to simulate the proper friction, say, rock(friction=10) on glass(friction=1) will slide more than rock(friction=10) on rock(friction=10)
0
I'm from Mars and moved to Earth to alienize you. Unfortunately, I became humanized.

Alienizer 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to SketchyPhysics

Who is online

Users browsing this forum: No registered users and 1 guest

Visit our sponsors: