ODE Breakable Joints?

Blitz3D Forums/Blitz3D Userlibs/ODE Breakable Joints?

JoshK(Posted 2004) [#1]
Are these implemented?


JoshK(Posted 2004) [#2]
Ah, no they are not. But it seems pretty easy to do. If the difference in inertia or torque exceeds a certain threshold, the joint breaks.


JoshK(Posted 2004) [#3]
Dang, how can you disable collision between certain objects? I have a chair made out of like 9 subunits, and as long as the chair is in one piece, I don't want it colliding with itself.


JoshK(Posted 2004) [#4]
I think instead of trying to make group of joints act like a solid object, you just use a solid, and if it encounters a large force, destroy it and spawn a bunch of separate subobjects. So breaking isn't really directional or anything, it just kind of shatters the whole thing, and spawns a bunch of subunits.


Erroneouss(Posted 2004) [#5]
Are you talking to yourself?


JoshK(Posted 2004) [#6]
Eat me.


Eric(Posted 2004) [#7]
Halo,

Refering to your Chair Object, I am a little confused about when you say, "I have a chair made out of like 9 subunits, and as long as the chair is in one piece, I don't want it colliding with itself." I don't quite understand that... Anyhow, These 9 sub units are they connected with joints? Can you describe how you have them connected..Is this one RigidBody with many Geometries? I thought that your could have all the pieces connected with Joints and then free all the Joints when too much force is exerted.

I believe in Tokamak, Breakage is handled when you have one RigidBody composed of multiple Geoms. When a threshold is reach the Geoms become RigidBodies and react Accordingly.


JoshK(Posted 2004) [#8]
What I am saying is if you have a chair made out of pieces, the pieces might overlap a little, so they are colliding, and bouncing around. Since they use rigid non-moving joints, you know the chair is never going to collide with itself, just with the floor and other objects. Once the chair breaks, then the separate pieces do collide.

But making objects out of lots of stuck-together pieces is inefficient. My log from the DB forums:




Okay, here is how breakages work:

I started by taking a chair mesh and separating it out into about 9 sub-objects, and connecting them with rigid joints. This worked well when I wanted to break the chair apart, but the solid object was a little unstable, and it was a lot of overhead for a single chair...9 sub-objects and about as many joints.

Most objects like a chair will be one solid piece, with a "health" key. If the entity's health falls below 1, whether it be by an explosion, a fall, or a crowbar, the entity disappears. If a "fragment" key is specified, a fragment entity will be spawned in the exact same place. You can specify multiple fragment entities with "fragment1", "fragment2", etc. So in the case of the chair, I would load one solid-piece chair for the unbroken object. I would have a separate mesh with just the back of the chair, and another with the seat and legs. When the chair is broken, the 2 fragment pieces are spawned in its place, looking just as though the original chair had broken in half. I might add fragment keys to the bottom piece, so that it could be further broken down into the individual legs.

So any mesh can fragment into one or more meshes, which in turn can fragment themselves:

Mesh ----> Fragment 1 ----> Fragment 1
           Fragment 2 ----> Fragment 1 
                      ----> Fragment 2 ----> Fragment 1
                      ----> Fragment 3


The advantage is solid objects are really solid, and lower overhead.

The plank on the left fragments into two pieces, show on the right:



JaviCervera(Posted 2004) [#9]
Josh, to set which geoms can collide with others, use the functions:

dGeomSetCategoryBits(geom, bits);
dGeomSetCollideBits(geom, bits);

Those are form the C API, the one I use. Don't know if they are implemented in the Blitz wrapper.

The category bits set the category of a geom. The collide bits indicates with which categories of objects it can collide. These are "flags" values, so the list of categories should be power of two. For example:

Const GROUP_PLAYER = 1
Const GROUP_WORLD = 2
Const GROUP_BROKENSTUFF = 1

For example, a geom which belongs to the GROUP_BROKENSTUFF category, would collide with GROUP_PLAYER and GROUP_WORLD, but not with other GROUP_BROKENSTUFF geoms.


Wayne(Posted 2004) [#10]
Not in the ODE wrapper I have.
Dang now I want more added to the wrapper.


Erroneouss(Posted 2004) [#11]
Does ODE Physics have a logo?
I need one for my application.

I have searched their website and couldn't find one, other than the large bolt with ODE written on it... It's too large and its not much in the way of cool logos...


Damien Sturdy(Posted 2005) [#12]
theduck, youre not allowed to actually say you use ODE IIRC. you just need that ODE sig thing stamped on any source or documentation you do.


Erroneouss(Posted 2005) [#13]
Huh? Where would I find the sig?

Wouldn't they want you to say its using ODE Physics to get more people into it? Seems odd..


JoshK(Posted 2005) [#14]
It says you can't claim the author's name. It does't say anything about whether you can say "uses ODE" or something.


Erroneouss(Posted 2005) [#15]
ODE Lisence:

"Neither the names of ODE's copyright owner nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission."



I assume that means I can't say the name of the guy to promote my product, because everyone knows he is good 'n famous 'n such, to get more copies sold/distributed ect.

Ahhhh... What the heck? I'll just email him.