Debugging Bullet and debugDrawWorld questions?

duser
Posts: 16
Joined: Wed Feb 02, 2011 6:48 pm

Debugging Bullet and debugDrawWorld questions?

Post by duser »

Hi,

[using Bullet 2.77 in a C++ application]
I was just curious if there were any debugging tools for bullet (besides the debug draw).
Would there be anything that can display the locations the hit points for raytests and convex sweeps (realtime visually or numerically, hopefully both)?

Also, I have been attempting to use "debugDrawWorld" and am only able to render the "DBG_DrawWireFrame" and "DBG_DrawAabb".
According to "btDebugDraw", there are several other modes in the "DebugDrawModes" enum. None of which I can get to work. Is there a way to get the other modes to work?

The draw wire frame does not accurately draw the collision volume used for the mesh (looks like it just passes in an array of verticies in no apparent order).
Would there be any possibilities as to why it would not accurately draw the collision volume (collision volume is a convexhull)?

Any answers or referrals to a topic with solutions to these would be greatly appreciated.

Thank you for your help.
DragonGeo2
Posts: 16
Joined: Sat Dec 18, 2010 1:30 am

Re: Debugging Bullet and debugDrawWorld questions?

Post by DragonGeo2 »

Hmmm it's very strange that you claim that the debug drawer is not drawing your collision volumes correctly because it works fine for me. I'm using the btDynamicsWorld::debugDrawWorld function to perform the drawing, and I'm using (DBG_DrawWireframe | DBG_DrawAabb) as my debug flags in the debug drawer. Did you make sure to define a working version of the drawLine function? You might wanna post some code here so we can help you more.
duser
Posts: 16
Joined: Wed Feb 02, 2011 6:48 pm

Re: Debugging Bullet and debugDrawWorld questions?

Post by duser »

Thank you for your response and yes I have a working version of "drawline".

Would it have anything to do with using convex hulls or compound objects?
For example, I have a ghost object, created by using a convex hull and 8 points (rectangle). When I see it drawn on the screen, it draws 2 faces properly, but then it only draws 2 lines (from a top/right corner of the "front" to the bottom/left corner of the "back" and from the bottom/left corner of the "front" to the top/right corner of the "back").
Do convex hulls draw the same as other collision shapes (eg: btBoxShape and btSphere shape)?
I ask because I also have other shapes in the application and they seem to draw properly, but anything that is a convex hull shape results in what I've described prior.

Aside from the collision meshes (and more importantly), does anyone know of any remote debugger or bullet ability that can create a visual display for ray tests, convex sweep tests, and contact tests?
An example of what I am looking for is like what PhysX has.

Thanks
(I am sorry, but unfortunately I am unable to disclose code)
Paril
Posts: 18
Joined: Tue Feb 22, 2011 4:14 am

Re: Debugging Bullet and debugDrawWorld questions?

Post by Paril »

Yeah, convex meshes draw differently, since they only contain the vertices and not the faces (so the visual isn't as accurate as, say, a trimesh or a box).

I noticed the same issues when drawing my objects. Drawing a box as a convex mesh will make an oddly shaped double-connected pyramid or something.

-P
duser
Posts: 16
Joined: Wed Feb 02, 2011 6:48 pm

Re: Debugging Bullet and debugDrawWorld questions?

Post by duser »

Thank you Paril for the confirmation.

But does anyone know of any remote debugger or bullet ability that can create a visual display for ray tests, convex sweep tests, and contact tests?
An example of what I am looking for is like what PhysX has.

If I were to do a convexSweepTest, is there anything currently in bullet that will draw the sweep test?
(eg: sweep test with sphere, drawer will draw a sphere at "from" transform and draw sphere at "to" transform and draw a line(s) that connect the shapes)


Thanks again.