has rigidbody collision with btBvhTriangleMeshShape improve?

mickey
Posts: 107
Joined: Fri Sep 19, 2008 6:08 pm

has rigidbody collision with btBvhTriangleMeshShape improve?

Post by mickey »

Hi

I'm using the latest bullet 2.74-beta-1 and have my "shoot sphere" set to:

setCcdMotionThreshold(1);
setCcdSweptSphereRadius(0.2f);

and scaled my btBvhTriangleMeshShape.

But nevertheless, when I start shooting the sphere with a velocity between 500 - 1000 units, it will penetrate every so often.

Here's a youtube video showing it: http://www.youtube.com/watch?v=E-N7vRqh_WQ

The sphere's velocity is set to 800 units in the video.

Besides penetrating, it will sometime get stuck.

I'd like to have zero penetration is that possible? I use the same scene with PhysX and it was able to handle it very well, there were not penetration at all.
Toadcop
Posts: 11
Joined: Mon Feb 22, 2010 10:13 pm

Re: has rigidbody collision with btBvhTriangleMeshShape impr

Post by Toadcop »

yep. same question here. what we can do to make meshes unpenetratable ? (primitevs don't get penetrate at any speed) meshes are very vulnurable to penetration at all.
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: has rigidbody collision with btBvhTriangleMeshShape impr

Post by sparkprime »

There is no satisfactory way to avoid this at present. Reduce the speed of your objects, or don't use triangle meshes.
Toadcop
Posts: 11
Joined: Mon Feb 22, 2010 10:13 pm

Re: has rigidbody collision with btBvhTriangleMeshShape impr

Post by Toadcop »

or don't use triangle meshes.
ok. (i have been waiting for this ^_^)
so is where a good way too generate primitive array out of the tri mesh ? (or something nearby what would represent it)
i think it's kind "trivial" task at least it's used in most (older) games... but i don't have direct idea how it would be best implemented in bullet.
any stuff on this topic is very appreciated. (generating primitives according to given trimesh)
+ would this not lead maybe to some other more serious problems ? (potential)
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: has rigidbody collision with btBvhTriangleMeshShape impr

Post by sparkprime »

You can just add a margin to them, I think that will thicken them up but will leave you with floating objects. There is also convex decomposition but it often yields hulls that are so thin that they get tunnelled through and you end up with a spasming object that is jammed between convex hulls.
Toadcop
Posts: 11
Joined: Mon Feb 22, 2010 10:13 pm

Re: has rigidbody collision with btBvhTriangleMeshShape impr

Post by Toadcop »

extra margin seems not to help at all... so i think i need to search the web for solutions =)
but tnx for reply !
RyanFavale
Posts: 9
Joined: Mon Jan 17, 2011 11:10 pm

Re: has rigidbody collision with btBvhTriangleMeshShape impr

Post by RyanFavale »

Any findings on this?
I am generating a minecraft like terrain procedurally with btBvhTriangleMeshShape's where I have a ton of little flat planes. Once my capsule comes in contact with a 90 degree angle triangle edge, like if you were going to walk off the edge of a building, it gets stuck. I tried fiddling with the mesh margin but there doesn't seem to be any good margin to use. A margin too thick won't let me even stand on a flat plane without getting stuck.