NewtonCollisionSetCollisionMode behavior change

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: NewtonCollisionSetCollisionMode behavior change

Postby AntonSynytsia » Tue Jul 29, 2014 4:36 pm

Julio Jerez wrote:also if you play the sandbox demos BasicStacking.cpp in that demo the floor is a collision tree. and the box fall on the floor and do not jitter.
If it works there is shoulf also work for you, are you passing the face twice to the collision tree?
Some people do that to fake double face but newton does not supports that


Hmm, I used some function that calculated mesh from face. I will investigate it.
AntonSynytsia
 
Posts: 193
Joined: Sat Dec 28, 2013 6:36 pm

Re: NewtonCollisionSetCollisionMode behavior change

Postby Julio Jerez » Tue Jul 29, 2014 4:37 pm

Bird wrote:
There were always some behavior inconsistencies with tree collisions; such as bodies jumping on tree collisions

I have been occasionally experiencing this too in the latest builds ... it's very hard to reproduce though.
-Bird

My suggestion is to have a command were you implement serialization ad when this happen you can just check that file in the sandbox.
and the post to me so that I can check it out.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonCollisionSetCollisionMode behavior change

Postby Julio Jerez » Tue Jul 29, 2014 4:39 pm

AntonSynytsia wrote:Hmm, I used some function that calculated mesh from face. I will investigate it.

do the serialization and load the mesh in the sandbox, it will save lot of time
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonCollisionSetCollisionMode behavior change

Postby AntonSynytsia » Tue Jul 29, 2014 5:03 pm

Ok, here is demonstration with dbug collision enabled:

Image
Image
In the second video, you can see that box collides with the bottom floor, even though the box is noncollidable. As well it sometimes collides with top floor.

Edit:
Imao, Z_AXIS is yaxis and yAXIS is Z_AXIS I will upload a new file.

Edit:
Ok here is the file:
serialized_world.bin
I tested it on demos sandbox and it behaves the same.
Last edited by AntonSynytsia on Tue Jul 29, 2014 5:33 pm, edited 1 time in total.
AntonSynytsia
 
Posts: 193
Joined: Sat Dec 28, 2013 6:36 pm

Re: NewtonCollisionSetCollisionMode behavior change

Postby Julio Jerez » Tue Jul 29, 2014 5:29 pm

Ok I see that the is a bug when the box approaches the edge. I have to fix that, but IO do no see the bug when box is in the middle of the floor

what does that means ConveCollsionMode 0?
why one is Mode 1 and the other mode 0.
and why one you send me?
can you send a file with collision mode set to one and anther with collision node set to zero.

I assume the second on is the one failling
also can you show the sequence of functions call you are calling to set that up?

In any case I see they the one you send me has a bug, what collision mode was that ?
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonCollisionSetCollisionMode behavior change

Postby AntonSynytsia » Tue Jul 29, 2014 5:35 pm

Julio Jerez wrote:In any case I see they the one you send me has a bug, what collision mode was that ?

The box collision mode is 0. I set collision mode via NewtonCollisionSetCollisionMode function.
The floor collision mode is 1. (I didn't touch it)

I updated the file in prior post.
AntonSynytsia
 
Posts: 193
Joined: Sat Dec 28, 2013 6:36 pm

Re: NewtonCollisionSetCollisionMode behavior change

Postby Julio Jerez » Tue Jul 29, 2014 5:49 pm

I think I know what it is, I will debug it tonight.

so to summarize again. collision mode 1 works
when you set collision mode 0 to the box, then is randomly misses collision with collision trees?
but the expected behavior is that it should never collide. Is this right?

if this is the problem, yes I now know what that is and I will fix it tonight.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonCollisionSetCollisionMode behavior change

Postby AntonSynytsia » Tue Jul 29, 2014 5:53 pm

Julio Jerez wrote:I think I know what it is, I will debug it tonight.

so to summarize again. collision mode 1 works
when you set collision mode 0 to the box, then is randomly misses collision with collision trees?
but the expected behavior is that it should never collide. Is this right?

if this is the problem, yes I now know what that is and I will fix it tonight.

You got it right, Juleo.
Thank you very much for looking into it.
AntonSynytsia
 
Posts: 193
Joined: Sat Dec 28, 2013 6:36 pm

Re: NewtonCollisionSetCollisionMode behavior change

Postby Julio Jerez » Wed Jul 30, 2014 8:45 am

fixed, please try again.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonCollisionSetCollisionMode behavior change

Postby AntonSynytsia » Wed Jul 30, 2014 2:11 pm

Yep, I confirm it all works! Thanks for the fix :twisted:
AntonSynytsia
 
Posts: 193
Joined: Sat Dec 28, 2013 6:36 pm

Re: NewtonCollisionSetCollisionMode behavior change

Postby Julio Jerez » Wed Jul 30, 2014 2:41 pm

are you planning to add joints? I am revamping the joint now.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: NewtonCollisionSetCollisionMode behavior change

Postby AntonSynytsia » Wed Jul 30, 2014 2:52 pm

I'm planning to add everything :twisted: :!:

I already have some issues and questions with joints:
  1. Custom joints are destroyed when excessive force is applied. The bodies disappear too. Maybe it has to do with how I implemented custom joints... I will have to investigate this before approving this as a bug. I posted this just to know, if you have idea of what could be going wrong.
    Image
  2. The smaller the parent/child body mass the more flexible the joint is. Why does joint stiffness depend on body mass? Could it be mass independent?
AntonSynytsia
 
Posts: 193
Joined: Sat Dec 28, 2013 6:36 pm

Re: NewtonCollisionSetCollisionMode behavior change

Postby JoeJ » Thu Jul 31, 2014 1:16 am

No idea why the car explodes, i do not have this problem on ragdoll which is 21 bodies.
But for the mass ratio it is common practice to lie a bit to keep it as close to 1:1 as possible.
For the ragdoll i make the feet heavier than they should be, and the upper / lower leg bodies lighter f. ex.
It also helps to keep the inertia uniform. For that i use inertia values from a sphere that has the same mass as the real body.
Those tricks can help a lot on many / long or thin bodies.

EDIT:
One more thing is, you need to set the min/max friction for the joints to the smallest possible values.
This clamps the maximum force newton is allowed to apply to the joint.
Maybe that's enough to prevent the explosions.
In situation where the joint might break in real life, bodies will drift appart and recover slowly - which is much better than an explosion.
User avatar
JoeJ
 
Posts: 1489
Joined: Tue Dec 21, 2010 6:18 pm

Re: NewtonCollisionSetCollisionMode behavior change

Postby manny » Thu Jul 31, 2014 5:44 am

We're also using the CustomJoint to implement a basic ray-cast car. This following video is from an early prototype of an upcoming game. The graphics are all placeholders, it's just a sandbox to test the procedural road generation and AI of NPC drivers (they actually build traffic jams etc.)

Image
http://www.instaLOD.io - InstaLOD - State of the art 3D optimization
manny
Site Admin
Site Admin
 
Posts: 131
Joined: Tue Feb 11, 2014 6:49 pm

Re: NewtonCollisionSetCollisionMode behavior change

Postby Julio Jerez » Thu Jul 31, 2014 5:56 am

wow that video Is very impressive. those are plece holder graphics? I can't wait to see the final. :D

on the joint explosion, it should not explode, my guess is that you are dragging the entire contraction by setting the matrix or just one body from the mouse cursor.
also no the joint are never destroyed only you can call destroy joint or destroy on of the bodies connected to that joint
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron