Fixed joint

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Fixed joint

Postby aqnuep » Mon Nov 30, 2009 9:25 am

Maybe it's a totally stupid question but why Newton does not have a fixed joint constraint?

I know that such thing can be made using a custom joint but it would be nice to have one baked already in Newton.

I would like to totally decouple scene hierarchy from graphics primitives and implement it in the physics subsystem. Is this not performance wise or why there is no way to do it currently?
aqnuep
 
Posts: 97
Joined: Sat Dec 22, 2007 4:14 pm

Re: Fixed joint

Postby JernejL » Mon Nov 30, 2009 11:26 am

A totally rigid / fixed joint is availible in a compound collision - you can even build compounds and extract pieces out of a compound at a very high speed, the compound works best to reprisent a rigid joint with minimum overhead.

You can also use a very short slider joint for this purpose, but i'm not sure how stable it would work.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Fixed joint

Postby aqnuep » Mon Nov 30, 2009 12:39 pm

Yes, compound collisions were my other idea to solve the problem.
I'm pretty sure that normal joints wouldn't be stable enough for this purpose.
However, I'm a bit afraid that whether in dynamic scenes compound collisions will act as if it should with a fixed joint because of the common mass and inertia.
E.g.: if the two bodies attached are far away, then the center of mass would be a totally fake one not even inside any of the attached bodies.
Also as far as I know, handling of compound collision is done a bit differently than other collisions, e.g. they are duplicated if they are attached to different bodies.
Anyway, I understand this is an awkward use case, so I don't say that I necessarily need it, but it would be a nice addition if it is possible.
aqnuep
 
Posts: 97
Joined: Sat Dec 22, 2007 4:14 pm

Re: Fixed joint

Postby JernejL » Mon Nov 30, 2009 2:26 pm

While the compound is replicated, it's priginal individual compound parts are not and are still shared amongst all compounds (see newtoncollisiongetinfo on how to get the collision pieces back)

Newton supports non-origin centre of mass, so that is not a problem in your case if you decide to break or merge 2 compound pieces (centre of mass is also set per body, not per collision object).

You can also use a compound object for static world geometry, and "break" parts of it away..
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia

Re: Fixed joint

Postby aqnuep » Mon Nov 30, 2009 5:45 pm

Delfi wrote:While the compound is replicated, it's priginal individual compound parts are not and are still shared amongst all compounds (see newtoncollisiongetinfo on how to get the collision pieces back)


Yes? Good to know. For me it was a bit misleading what I've read on the Wiki. Thanks for the clarification.

Delfi wrote:Newton supports non-origin centre of mass, so that is not a problem in your case if you decide to break or merge 2 compound pieces (centre of mass is also set per body, not per collision object).


That on it's own does not really solve the problem as I cannot define two different mass center for the two collisions inside. Especially when combined with inertia related physics, it does really matter if the same rigid body is used for the physics calculations or not. Of course, from collision point of view, and basic physics is satisfactory.

Delfi wrote:You can also use a compound object for static world geometry, and "break" parts of it away..


Yes, I know about it, nice stuff :D. Anyway, in my use case they should be a dynamic objects, having different mass, mass center and inertia.
Btw I'll do some experiments with different approaches and I'll share you the results.
aqnuep
 
Posts: 97
Joined: Sat Dec 22, 2007 4:14 pm

Re: Fixed joint

Postby JernejL » Mon Nov 30, 2009 8:02 pm

aqnuep wrote:That on it's own does not really solve the problem as I cannot define two different mass center for the two collisions inside. Especially when combined with inertia related physics, it does really matter if the same rigid body is used for the physics calculations or not. Of course, from collision point of view, and basic physics is satisfactory.


You are making up problems where there aren't any, a compound still only simulates a SINGLE body made of several pieces to form concave or any other shape.

So if your 2 pieces of a compound are apart, you already have a unrealistic body shape anyway, and a single body can only have one centre of mass.
Help improving the Newton Game Dynamics WIKI
User avatar
JernejL
 
Posts: 1587
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest

cron