Determinism problems and bodies that go to sleep too soon

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Re: Determinism problems and bodies that go to sleep too soo

Postby Sweenie » Sat Dec 28, 2013 11:52 am

Hi.

NewtonInvalidateCache did the trick. :)

Also, the bodies don't fall asleep on their edges now, but I have an issue that is driving me nuts.
I get bad penetrations bugs and I don't know if it's my rendering engine or newton that is causing it.
Image

I serialized the world, could you check if something is wrong with it?
maybe it's the mass matrix or something.
http://www.svenberra.net/world.bin
Last edited by Sweenie on Sat Dec 28, 2013 11:59 am, edited 1 time in total.
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Determinism problems and bodies that go to sleep too soo

Postby Julio Jerez » Sat Dec 28, 2013 11:54 am

can you show me the image from a different angle? I can not see what is going on
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Determinism problems and bodies that go to sleep too soo

Postby Sweenie » Sat Dec 28, 2013 12:00 pm

Uploaded a new picture, refresh the browser :)
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Determinism problems and bodies that go to sleep too soo

Postby Julio Jerez » Sat Dec 28, 2013 12:47 pm

the collsion system use some small penetration to calculate contacts, I believe the value is defined by const
DG_RESTING_CONTACT_PENETRATION dgFloat32 (1.0f / 256.0f)
in a metric system this is about 4 millimeters
what this means is that when tow objects collide any contact penetration smaller that that is considered no penetration

because this is an abolsute value, what it mean is that for a small objecv that penetration will look bigger than for a smaller object.

in your image the top penetration seem a lot more than that, but when I load the .bin file I do no see that kind of penetration, with or with auto sleep
badImage.png
badImage.png (777.89 KiB) Viewed 4113 times

are you sure it is no an illation because of eth wire frame crossing?

also the penetration can be controlled by setting the contact thickness beteeen the materials
void NewtonMaterialSetSurfaceThickness (const NewtonWorld* const newtonWorld, int id0, int id1, dFloat thickness);

if you set the to 1/256 then the collision will have zero penetration, however remember that contact are consider to have zero thickness if the are with in a distance of DG_RESTING_CONTACT_PENETRATION
along the contact normal.

also It has being a long time since I test that feature I believe it is still value, if not I fixed it. It is a matter to add that to the actual penetration in the place that is use, but I believe it should still work.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Determinism problems and bodies that go to sleep too soo

Postby Sweenie » Sat Dec 28, 2013 2:47 pm

are you sure it is no an illation because of eth wire frame crossing?

It's definitely penetrations and no illusion.

Maybe it's always been like that and I just don't have noticed until now... but it's so clearly visible that it feels strange that I haven't noticed before. :|

Does this tolerance constant also apply for separation as well?
Because on this stack of boxes which are 1x1x0.3 units in size I also get some gaps between the boxes...
You can see the blue box in the gap between the red and green box.
Image
Sweenie
 
Posts: 498
Joined: Mon Jan 24, 2005 7:59 am
Location: Sweden

Re: Determinism problems and bodies that go to sleep too soo

Postby Julio Jerez » Sat Dec 28, 2013 6:04 pm

No I think that's how is has always being.
Try to sync to an older version, and do the same test, you will see it will exhibit the same behavior.
Maybe different pattern of gaps and interceptions because of the differences between version, but the same behavior.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Previous

Return to Bugs and Fixes

Who is online

Users browsing this forum: No registered users and 12 guests

cron