Weird behavior when colliding

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Weird behavior when colliding

Postby arkdemon » Sun Feb 02, 2014 12:39 pm

Hello everyone. I see several times weird behaviors when an object collides at high force another one: it starts to fly in a strange way or when it collides a static sphere, it starts to tremble or jitter.

Is it normal?

Thank you for your answers
My name is arkdemon and I don't approve this message :D
User avatar
arkdemon
 
Posts: 90
Joined: Sat Jan 18, 2014 12:38 pm

Re: Weird behavior when colliding

Postby JoeJ » Sun Feb 02, 2014 2:21 pm

Is it you who applies this 'high force'?
You need to take care forces stay as low as possible.
For the 'face another object torque' from last topic you need to set a maximum length for the torque vector.
So that the object can rotate itself at reasonable speed but not much more.
Keep in mind that in reality huge forces would destroy involved bodies, and that's not possible for rigid body simulator, thus bad simulation.
User avatar
JoeJ
 
Posts: 1489
Joined: Tue Dec 21, 2010 6:18 pm

Re: Weird behavior when colliding

Postby arkdemon » Sun Feb 02, 2014 2:47 pm

Hi
No it's not about the "face another object" thing. It's just that I am applying big amounts of gravity :P
Keep in mind that in reality huge forces would destroy involved bodies, and that's not possible for rigid body simulator, thus bad simulation.

Ok I will try to keep it in mind

Thank you for your answer

PS: for the sphere is it normal that it jitters when an object goes on it (the center of the sphere is the gravity)?
My name is arkdemon and I don't approve this message :D
User avatar
arkdemon
 
Posts: 90
Joined: Sat Jan 18, 2014 12:38 pm

Re: Weird behavior when colliding

Postby JoeJ » Sun Feb 02, 2014 3:28 pm

So you have a big static sphere, and gravity goes to its center like a planet?
For a perfect sphere there is only one contact point with convex objects, while in reality it would be a small aera due to compression.
But again - because bodies are rigid, it's only a point and thus the objects never come to rest (but i would not call that jitter - the sphere is static, yes?)
You can raise angular damping, or try dry rolling friction joint - but it sounds using a tesselated sphere would be the best solution.
User avatar
JoeJ
 
Posts: 1489
Joined: Tue Dec 21, 2010 6:18 pm

Re: Weird behavior when colliding

Postby AntonSynytsia » Sun Feb 02, 2014 3:40 pm

There are couple of solutions I have experienced with to keep the simulation stable while applying high forces:
  1. Call NewtonUpdate(world, timestep) with a smaller timestep. I think 1/120.0 of a second would be great.
  2. Or use the exact solver model: NewtonSetSolverModel(world, 0)
AntonSynytsia
 
Posts: 193
Joined: Sat Dec 28, 2013 6:36 pm

Re: Weird behavior when colliding

Postby Julio Jerez » Sun Feb 02, 2014 5:00 pm

I think the problem is that he try to get an object stable resting on a sphere.
a sphere is an analytical shape that will only generate a single contact.

like Joe say he testing the limits of a rigid body simulator. in reality if you have an object resting on the surface of a large sphere, the curvature of the surface makes and small patch act as a flat plane.
in collision system that uses a sphere as a collision primitive has not knowledge of the sphere curvature, so regardless of the size it will be treated as a sphere.

It is possible to add that information to a collision system, but that's a functionality that will only be useful for such a special case that is no worth doing all the work.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Weird behavior when colliding

Postby JoeJ » Sun Feb 02, 2014 5:14 pm

arkdemon wrote:PS: for the sphere is it normal that it jitters when an object goes on it (the center of the sphere is the gravity)?


Sounds a little like the sphere is dynamic and moves on collision. Then you move the gravity center to the new sphere position and so on.
This is wrong, because if the sphere attracts another body by gravity or magnetism, also the other body would attract the sphere and you'd need to calculate that too.
I can imagine that this can cause jitter (as always, when you do something wrong with physics).
User avatar
JoeJ
 
Posts: 1489
Joined: Tue Dec 21, 2010 6:18 pm

Re: Weird behavior when colliding

Postby arkdemon » Sat Feb 08, 2014 8:56 am

Hello everyone. Thanks for answering (sorry for the time I took to answer, I had something important to do).
I will change my formulas when possible.
My name is arkdemon and I don't approve this message :D
User avatar
arkdemon
 
Posts: 90
Joined: Sat Jan 18, 2014 12:38 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest