A place to discuss everything related to Newton Dynamics.
Moderators: Sascha Willems, walaber
by sova » Sat Oct 13, 2012 2:53 pm
Hi, Julio, I am slowly analyzing Newton collision mechanism ...
I noticed when the objects were on top of each other, the contact points could move a bit messy, because of what top object was trembling slightly (I disabled autosleep).
I think discreteness is harmful to simulation in all physics engines.
What do you think if the form of the moment, when two bodies are in the contact with each other, is not the instantaneous absolutely elastic collision, but it is rather stiff spring.
With a little penetration at the point of contact the body is pushed with a small force, which increases with the dept of contact.
The idea is that in this case the top object will tremble with a much larger period, allowing the engine to make more steps during the calculation of the forces for long-term body contact.
I think it should increase the stability.
btw, in the real world, the surface of a lot of subjects behaves like a stiff spring...
Another idea of the calculation of collisions for convex polyhedron is to build a table or a tree which can quickly determine support vertex and a points of contact, but I can not explain this now ...
-
sova
-
- Posts: 23
- Joined: Mon Mar 05, 2012 8:58 am
by Julio Jerez » Sat Oct 13, 2012 3:46 pm
sova wrote:I think discreteness is harmful to simulation in all physics engines.
I do not knwo what thios means.
Autosleep in newton is for save time not for getting stability.
for all well beheave scenes (no too lareg mass rations and reasonble inertia matrix) the engine should have zero jitter with auto sleep on in all cases.
what are you doing, that is showing this behavior?
as for support vertex of convex polyghedrum, newton already uses a partion that yield better than log (n) time complexity but more important is cache coherance friendly
in fact the exact time complexity is k * log (n/8) which for most normal hulls (under hundred vertex) comes to be almost constant time becuase of the large devider.
the function is this: dgVector dgCollisionConvexHull::SupportVertex (const dgVector& dir, dgInt32* const vertexIndex) const
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by sova » Sat Oct 13, 2012 4:33 pm
Sorry I was wrong.
When I drop small convex on big box, simulation is ok...
When I drop convex on a big sphere, I have jitter... because sphere returns only one contact point.
Its' ok for me)
-
sova
-
- Posts: 23
- Joined: Mon Mar 05, 2012 8:58 am
by Julio Jerez » Sat Oct 13, 2012 4:48 pm
That is correct, sphere salway return only on contact point.
Bear in mind that Netwon is a rigid body simulator. the asumption that bodys are 100% ridid impose severe restriction on edges cases.
-a sphere will not collide at a single point instead it will generate a contact patch because of deformation.
-consevation of momentum with a static bodies, breaks consevation of momentum, since the static body move zero disatance after collision whic mean it take zero momentum with is imposible.
-there are some other restriction but since the engine is designed for real time simulation, we have to life with them.
are you using core 300 from svn?
can you make a video of what you have?
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
by sova » Sat Oct 13, 2012 5:42 pm
Julio Jerez wrote:are you using core 300 from svn?
can you make a video of what you have?
yes, yes)
http://www.youtube.com/watch?v=TyLOJorlJqII use sphere as floor only for understanding the collision mechanics.
-
sova
-
- Posts: 23
- Joined: Mon Mar 05, 2012 8:58 am
by Julio Jerez » Sat Oct 13, 2012 8:05 pm
Oh I see you ar eusing a big sphere like a lareg planet.
The will cenrtally no work because the engine do no have the knowledge of surface curvature. A sphere will be a sphere regealess of size.
you can hoewver make a planet but using a custum static collision plane an din the callback return and patch of faces. base on fth curvature of the section intesected by the aabb.
I think thare are people who had done unlimited resultion planets with newton using that trick.
-
Julio Jerez
- Moderator

-
- Posts: 12426
- Joined: Sun Sep 14, 2003 2:18 pm
- Location: Los Angeles
-
Return to General Discussion
Who is online
Users browsing this forum: No registered users and 2 guests