Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sun Jan 08, 2017 5:11 pm 
Offline
User avatar

Joined: Sat Jun 04, 2016 10:34 pm
Posts: 8
Location: Edinburgh
Hi,
I have skeletal mesh animation and the transition to bullet-controlled rag doll animation working and now want to improve the collision detection/response between the rag doll's rigid bodies and the static world mesh.

For simple test purposes, I have a chain of 3 rigid body capsules, with 2 ball-joint constraints connecting them.
My world mesh consists of a btBvhTriangleMeshShape and it is very common for applied impulses to push and trap the ragdoll's capsules on the "underside" of the mesh landscape.

Are there any general configuration pointers that will allow me to improve this collision interaction?

I've searched the forum and came up with the following similar query:
[Solved] RagDolls penetrating static TriangleMeshShapes
This suggests increasing the maximum number of sub-steps for each simulation step to improve matters. I'm currently using maxSubSteps=10, with the default fixedTimeStep = 1/60th
As increasing the number of sub-step iterations has a performance implication, I also want to explore any other config changes that may improve matters.

So any advice will be much appreciated.

Thanks.


Top
 Profile  
 
PostPosted: Mon Jan 09, 2017 2:52 am 
Offline

Joined: Sat May 18, 2013 1:36 am
Posts: 25
Location: NY
First make sure your physics world is scaled correctly.
Objects below a certain size will easily fall thru.
You need to implement constant collision detection.

I had no problems after I used these solutions.

https://www.youtube.com/watch?v=y1B6OzYVJGo


Top
 Profile  
 
PostPosted: Mon Jan 09, 2017 9:21 pm 
Offline
User avatar

Joined: Sat Jun 04, 2016 10:34 pm
Posts: 8
Location: Edinburgh
Thanks for taking the time to reply. It's much appreciated.

The scaling advice is a good pointer, although my rigid bodies are around the 0.5 to 2 unit size, which I believe conforms to the "good practice" pointers found in the bullet manual. That said, my test landscape mesh does have comparitively large triangles, so that could be an issue - I'll experiment a little.

What has helped somewhat, is adding constraints with the "disable collision detection" flag set and controlling interpenetration with angular limits. This reduces the problem to an extent.

I'll try the continuous collision detection and see if that helps without too much of a performance hit and report back with results.

Cheers.


Top
 Profile  
 
PostPosted: Sat Jan 14, 2017 7:34 pm 
Offline
User avatar

Joined: Sat Jun 04, 2016 10:34 pm
Posts: 8
Location: Edinburgh
For anyone who is interested, implementing per rigid body CCD, has not improved the interpenetration issues I'm experiencing.

I have set up CCD on each of the RBs in a 3 RB/2 hinge constraint chain, so RB + hinge + RB + hinge + RB.
Each RB has a capsule as its collision shape.
I have also set the swept sphere and motion threshold as follows:
Code:
   pBody->setCcdSweptSphereRadius( localExtents.m_floats[ localExtents.minAxis() ] * 0.5f );
   pBody->setCcdMotionThreshold( 0.0001f );

So this gives a very small motion threshold and sets the sphere radius to half the smallest RB bounding box extent.
Unfortunately, this has produced no visible difference to the capsule/static BVH triangle mesh interpenetration.
Using different values for the swept sphere radius, e.g. minimum capsule extent x 1.0f, 0.2f or 0.01f, produces no improvement.

There's a video of the behaviour at:
https://www.youtube.com/watch?v=hft6FcH6sUQ
for anyone who is interested.

So if anyone has advice on where to look next, I'd be most appreciative.

Cheers.


Top
 Profile  
 
PostPosted: Fri Apr 14, 2017 4:16 pm 
Offline

Joined: Fri Apr 29, 2016 2:41 pm
Posts: 35
how did you implement ccd per object?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group