Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Apr 25, 2012 9:42 am 
Offline

Joined: Fri Apr 18, 2008 2:20 pm
Posts: 154
Hi,

I have derived a custom shape from btConcaveShape in order to create a collision shape for our streamed-terrain (similarly to what btHeightFieldTerrainShape does).

It all works perfectly, however, I am facing the same issue I had in the past when we relied on the btBvhTriangleMeshShape shape, i.e. the "internal edge" problem.

I understand the workaround based on btAdjustInternalEdgeContacts() only works with TRIANGLE_SHAPE_PROXYTYPE type shapes.

Is there a way I can solve this ?

Thanks,
Greg


Top
 Profile  
 
PostPosted: Fri May 04, 2012 8:08 am 
Offline

Joined: Fri Apr 18, 2008 2:20 pm
Posts: 154
nobody ?


Top
 Profile  
 
PostPosted: Fri May 04, 2012 3:50 pm 
Offline

Joined: Sun Apr 29, 2012 3:22 pm
Posts: 10
As far as I know, there is no other internal solution in bullet.

There is only btInternalEdgeUtility ( btAdjustInternalEdgeContacts ) addressing the internal-edge problem in bullet.

And btInternalEdgeUtility works with (from) btBvhTriangleMeshShape and btScaledBvhTriangleMeshShape shape types only.

So, I think, if you use other collision shape type for your collision, then you have to understand what modifications btInternalEdgeUtility does on the contact points to handle the internal-edge problem, and you have to write a similar one for your custom shape.

Probably the difference for your custom shape can be only at the area how you gives input to the real functionality of btInternalEdgeUtility, because you have a concave shape and btBvhTriangleMeshShape is a concave shape too, and probably you have vertices and edges like there are in btBvhTriangleMeshShape, so you will have to feed the functionality of btInternalEdgeUtility from the database of your custom shape, and you will have the same functionality.

Of course, you have to call your version of btAdjustInternalEdgeContacts for your custom shapes and the original version of btAdjustInternalEdgeContacts for btBvhTriangleMeshShape in your custom material callback, if those coexist in one scene.


Top
 Profile  
 
PostPosted: Thu May 10, 2012 3:14 pm 
Offline

Joined: Fri Oct 07, 2011 2:41 pm
Posts: 6
Location: Brighton, UK
This reply might be a bit late for you but I solved that issue for my use-case and posted about it here: viewtopic.php?f=9&t=7498


Top
 Profile  
 
PostPosted: Fri May 11, 2012 7:21 am 
Offline

Joined: Fri Apr 18, 2008 2:20 pm
Posts: 154
Thanks you guys for your answers, really appreciated.

I haven't solved this issue yet; so any suggestion is still welcome :)

Indeed, a clean solution would be to add some kind of support for btConcaveShape-derived class, into the existing built-in Bullet internal edge detection routines.

Don, I will try to adapt your source code to my class. I created a custom terrain shape in order to support terrain tiles streaming, but I can't foresee any big issue with that. Thanks for sharing your code, it will really help (I am not such a physic engine expert, just a simple user - might reach the power user stage once I have manage to adapt your code :))

I will keep you informed on the results.

Thanks once again guys !


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: Google [Bot] and 4 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