Bullet convex in ODE

bobef
Posts: 3
Joined: Wed Dec 07, 2005 1:13 pm

Bullet convex in ODE

Post by bobef »

I've compiled ODE that was in here: bulletode_trimesh_src.zip to get convex support but my convexes don't collide with the ground nor with trimesh, but they collide with boxes and with other convexes. Maybe I need to #define something before I compililing it? Maybe it has something to do with that when I create a dynamic (moving) trimesh it also doesn't collide with the ground?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

Apparently the demo adds the uninitialized vertices to the convex shape!

You can fix this by replacing test_convex_trimesh.cpp line 283 from

Code: Select all

		for (int k=0;k<VertexCount;k++)
into

Code: Select all

		for (int k=0;k<ConvexVertexCount;k++)

Thanks for the bug report, and please tell if this fixes the convex-mesh.
Erwin
bobef
Posts: 3
Joined: Wed Dec 07, 2005 1:13 pm

Post by bobef »

Well I am glad that I did a bug repport but actually my test was using only cones/cylinders... I said convex because as much as I understand the cone/cylinder shape is converted to convex hull and passed to ODE in this form... And actually I didn't even compiled the ODE tests because I already have my own testsuit. I just replaced the .dll with the one compiled with bullet (I also added few C wrappers to it because I am using D (http://www.digitalmars.com/d) and is not compatible with C++ unlike C). I am going to compile the tests now and see what happens.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

Well I am glad that I did a bug repport but actually my test was using only cones/cylinders... I said convex because as much as I understand the cone/cylinder shape is converted to convex hull and passed to ODE in this form...
When using Bullet's GJK with ODE, it will use the actual cone and cylinder, box and sphere. No conversion will happen for shapes using 'dCreateConvex'. The dxConvex encapsulates the different types and keeps a pointer to the actual GJK shape.

Collisions involving dxConvex are all handled by GJK, even for the trimesh. It just passes the contact points to ODE.

Erwin
bobef
Posts: 3
Joined: Wed Dec 07, 2005 1:13 pm

Post by bobef »

I wasnt able to compile the examples using dll. When I compile them staticly linked they work as expected. So still when I use bullet shapes they don't collide with the ground or with trimeshes of ODE. The only difference I can see from the examples is that I am using ODE as dll... It is strange to me because they collide with everything else... Hopefully I will solve this in future because Bullet+ODE is cool. By the way any chance to use continuous physics in ODE via Bullet?