Compound bodies falling through tree collider

Report any bugs here and we'll post fixes

Moderators: Sascha Willems, Thomas

Re: Compound bodies falling through tree collider

Postby Julio Jerez » Sat Apr 28, 2012 11:42 am

wow this was a very big bug, this was actually tow different bug in one.
the activation deactivation was one, and I am glad you found it.

however it was much worse, like I say in core 300 joint are create at the by the prophase, what the mean is that a body can have many contact joint with zero contact.
This happens if the aabb intersect but they do not collide. so this activate the island.
however is also made the contact cache save the previous position of the joint each time, and this was the worse bug that eluded me for month.
Basically the contact cache saved the position when the contact joint was created not when contact were generate,
this make joint think that contacts never change from the previous step and is told the solve to use the same contact.
In core 200 since contact joints were generate at the narrow phase, this was correct, but no for core 300.
In another thread Bill reported this when working in his lighwave plug gin.
I debug the solver and the collision system never and found any error, there was no error there, it was the contact cache validating contacts inside the AABB but outside the collision shape.
when the collision shape has a non regular aspect ratio the contact could be quite far from the shape and generate an unfamiliar behavior.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound bodies falling through tree collider

Postby Julio Jerez » Sun Apr 29, 2012 8:26 am

the secund bug, compouynd falling trught collsion tree is not a bug it is this
Code: Select all
dgInt32 dgCollisionCompound::CalculateContactsToCollisionTree (dgCollidingPairCollector::dgPair* const pair, dgCollisionParamProxy& proxy, dgInt32 useSimd) const
{
   _ASSERTE (0);
   return 0;
   /*

   dgContactPoint* const contacts = proxy.m_contacts;



I have to refacte that funtion to use the intances, I will do it some time today. and then I will see what is wrong with the caphere cylider and convex shapes.
my guess is that the box featire is a face that is bevy very big, and it is exiting with a solution that is dominated byt round of errors.
I need to add the erro recorvery to that liek I had in core 200.
Julio Jerez
Moderator
Moderator
 
Posts: 12249
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Compound bodies falling through tree collider

Postby Julio Jerez » Sun Apr 29, 2012 10:05 am

Ok compound collision with collision tree is back working.
question you said you switch from chamfered cylinder to cylinder, is that in this version last demo?
In core 300 all close form collision shapes are optimized to use a combination of the geometry definition instead of just the knowledge that the shape is convex.
for example a collision of a capsule is the same as the collision of a line segment that center to center, plus a pos process function the project the contacts points to the surface of the capsule.
the contacts are identical but the line collision is several order of magnitude faster, the problem is that it requires special function call to do the post processing and also to make use of parametric information of the shape.
In Newton a close form shape is one than can be describe by one of a few mathematical expressions and that do not have hard edges.
so far we have: spheres, capsule, chamfer cylinder, tapered cylinder and tapered capsule.
because each require a special function is it possible that one may have a bug. I know I have a bug is the tapered capsule, and I see there is also a bug in the chamfered cylinder. I will fix those.

Cylinder are no close from because they have a hard edge so the go to the general mink sky contact solver. However in the next few days I will also optimize the cylinder by use a partial close form.

In my opinion if core 300 is going to offer a cylinder shape, then it must be some benefic from using it, otherwise is just a check box feature. and I like that peopel actually uys eteh features.
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 5 guests

cron