bullet Collision Shape

26 views
Skip to first unread message

Jayasimha

unread,
Dec 26, 2016, 9:26:55 AM12/26/16
to osgbullet-users

    Hi
          i am loaded two Objects into my Scene Graph one is Static Object and another one is Dynamic Object. for getting Accurate collision detection i am using "btTriMeshCollisionShapeFromOSG(node)" for Static Object and Dynamic Object. i am getting one warning like "btCollisionDispatcher::needsCollision: static-static Collision ! " and there is No Collision Detection.           

         if Dynamic Object Collision shape is " btBoxCollisionShapeFromOSG(node)"  it is able to find Collision Detection without ant warning But it is Not Accurate.

        any one Can Explain why i am getting that warning ? and is There any method for Accurate Collision Detection ?


Paul Martz

unread,
Dec 26, 2016, 12:14:53 PM12/26/16
to osgbull...@googlegroups.com

I’ve seen problems with the triangle mesh collision shape. I don’t think it’s an issue with osgBullet.

 

I know Bullet works well when all collision shapes are convex. I’m not exactly sure why Bullet provides a (potentially non-convex) triangle mesh Shape class that doesn’t behave as other collision shapes. I investigated this issue in the past, convinced myself it was a Bullet issue and not an osgBullet issue, asked about it on the Bullet forum, was told “use convex shapes instead”, and never pursued it further.

 

If I remember correctly, non-convex triangle meshes have some application as a type of ground plane. I think Doug use a triangle mesh for a ground plane at ISU. Doug, do you have any information on this, or are you getting too rusty on it also? It’s been years since I’ve looked at this.

   -Paul

 

 

 

--
You received this message because you are subscribed to the Google Groups "osgbullet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osgbullet-use...@googlegroups.com.
To post to this group, send email to osgbull...@googlegroups.com.
Visit this group at https://groups.google.com/group/osgbullet-users.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Jayasimha

unread,
Dec 27, 2016, 12:42:04 AM12/27/16
to osgbullet-users

hai
          Now  i am using for Static Object "TriMeshCollisionShape" and  Dynamic Object   "ConvexHullCollisionShape". the collision Detection Absolutely accurate but after touching and intersecting frame rate reducing too much about 3 to 5 FPM from 50FPM. 

        Can you tell me what is the reason for this? is it because of any Computation ?

   Note:- i am using " Discrete Collision Detection "

Paul Martz

unread,
Dec 27, 2016, 12:06:36 PM12/27/16
to osgbull...@googlegroups.com

Bullet has a bounding box for each shape. When they don’t intersect, frame rate should be really good because Bullet does almost no work.

 

Once the bounding boxes intersect, Bullet has to do a lot more work, adding and removing collition points and computing constraints on active collision points. The computation time goes up linearly with the complexity of the collision shapes.

 

You might try one of the parallel solvers, but I must admit I’m not an expert in optimizing Bullet collision detection. In the past, I have always contacted Bullet exsperts for advice on this, using the Bullet discussion forum.

 

Also, it has been a long time sinceI did anything with Bullet. Last time I checked, they were developing a Cuda solver that performed collision detection directly on the GPU in parallel. I’m not sure what the status of this work is, or if it would help in your case. But you might want to look into this.

   -Paul

 

 

From: osgbull...@googlegroups.com [mailto:osgbull...@googlegroups.com] On Behalf Of Jayasimha
Sent: Monday, December 26, 2016 10:20 PM
To: osgbullet-users
Subject: [osgbullet-users] Re: bullet Collision Shape

 

 

hai

          Now  i am using for Static Object "TriMeshCollisionShape" and  Dynamic Object   "ConvexHullCollisionShape". the collision Detection Absolutely accurate but after touching and intersecting frame rate reducing too much about 3 to 5 FPM from 50FPM. 

 

        Can you tell me what is the reason for this? is it because of any Computation ?

--

Jayasimha

unread,
Dec 27, 2016, 11:31:58 PM12/27/16
to osgbullet-users
Thank you paul

Jayasimha

unread,
Dec 29, 2016, 8:26:48 AM12/29/16
to osgbullet-users
Hi

   i have one doubt that is every collision World should have only one Dynamic Object or any number of Dynamic objects ?

   in my case i have A320 Aircraft, for this i am loading flaps,rudder,wheels etc and Binding to A320 Aircraft (body). i implemented collision detection with terrain if rudder touching terrain collision not detecting but if body touching the terrain collision is detecting.

  i have one problem i loaded all parts of Aircraft and Bound to the Aircraft body, if am adding all parts are Dynamic it is saying that collision is detected with out touching to the Ground ? can u tell me what will be the reason ?

Paul Martz

unread,
Dec 29, 2016, 4:01:39 PM12/29/16
to osgbull...@googlegroups.com

It sounds like one of your collision shapes has been created with the incorrect transformation. You can verify this by using the debug drawer class, which will render your collision shapes as wireframe. If the collision transform is correct, the sollision shape will align with the visual representation. If the transform is wrong, then your visual representation will be rendered in one part of your scene, and your corresponding collision shape in another part. That will be an indication to you to examine the code for creating the collision shape and its transformation. See the osgBullet example code for how to use this class. Also see the osgBullet example code for how to create collision shapes with correct transformations. The order of function calls is critical.

 

While osgBullet will automatically create collision shapes from OSG Geometry node data, the collision shapes might not be optimal. It is always better to manually model the collision shapes, just as you manually create the visual model itself.

 

Bullet is most efficient when using analytic shapes (implicitly defined with an equation and parameters, such as a plane, box, cylinder, sphere, cone, etc.). However, there is no artificial intelligence in osgBullet to analyze random OSG Geometry node data and determine an analytic shape with parameters for best fit. For this reason, you would have to create the collision shapes manually.

 

You could approximate an aircraft using a cylinder shape for the fuselage, cones for the nose and tail, boxes for the wings, and cylinders for the tires, then assemble these shapes together using a btCompoundShape. You probably do not need individual collision shapes for ailerons, flaps, rudder, etc., and in fact, adding collision shapes for these objects will dramatically slow physics computation because they will almost certainly be in contact with other collision shapes all the time, causing Bullet to constantly spend cycles resolving the constraints.

 

Disclaimer. I am not a Bullet expert. I strongly encourage you to raise these topics on the Bullet discussion forum, where you will almost certainly receive higher quality and more up-to-date information.

Jayasimha

unread,
Jan 3, 2017, 7:35:31 AM1/3/17
to osgbullet-users


On Monday, December 26, 2016 at 7:56:55 PM UTC+5:30, Jayasimha wrote:

Jayasimha

unread,
Jan 3, 2017, 7:35:57 AM1/3/17
to osgbullet-users
Hi

      i am Implementing Bullet for Collision Detection in my Case there are 5 Dynamic Collision Objects and 1 Static Collision Object.
all Dynamic Objects are Touching at a time on static Object i am getting some Contact Manifold points but i am Not getting all Contact Points 
for every Dynamic Object at a Time.

is it Possible to Get All Contacts points by Every Dynamic Object ?


On Monday, December 26, 2016 at 7:56:55 PM UTC+5:30, Jayasimha wrote:

Paul Martz

unread,
Jan 3, 2017, 3:09:22 PM1/3/17
to osgbull...@googlegroups.com

osgBullet does nothing to add or remove contact points. They are all managed by Bullet.

 

I believe Bullet has an interface to query contact points from an object or collision shape. If you use that interface, you should have access to all the contact points that Bullet is tracking. If you believe this isn’t the case, it is an issue that is best discussed in the Bullet forum.

   -Paul

 

 

--

Reply all
Reply to author
Forward
0 new messages