RigidBodyFromObjExample

Post Reply
bullseyetroll
Posts: 3
Joined: Mon Jul 10, 2017 6:23 am

RigidBodyFromObjExample

Post by bullseyetroll »

I'm very very new to all the 3D stuffs,

Currently, I'm testing the RigidBodyFromObjExample in the tutorial

the imported obj "teddy bear" should be falling,

but it appears that it remains "floating" in the air.

I've tried different obj files, and only "sphere8.obj" falls as expected.

Is there something I should adjust when import vertex into btConvexHullShape ?

Thx
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: RigidBodyFromObjExample

Post by drleviathan »

bullseyetroll, there appears to be a bug in the code when loading the teddy.obj file. The first thing I noticed was that the inertia tensor of the shape was bad (<0.00966241, 1.25677e+14, 1.25677e+14>). When I examined the shape in more detail I found what appeared to be corrupt data: 9576 vertices, some with very bad values. The teddy.obj file is human readable and doesn't even have 9576 lines, so the vertex data parsed from that file is clearly wrong.

Maybe you should be using the stable version: Bullet-2.86?
bullseyetroll
Posts: 3
Joined: Mon Jul 10, 2017 6:23 am

Re: RigidBodyFromObjExample

Post by bullseyetroll »

Thx for the reply,

I'm currently using bullet3-2.86.1 from https://github.com/bulletphysics/bullet3/releases

so maybe i should fire an issue on github :lol:
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: RigidBodyFromObjExample

Post by drleviathan »

I downloaded the Bullet3-2.86.1 from that link and built on linux in 32-bit mode: the teddy bear moves and collides just fine. My previous attempt from the tip of bulletphysics/master was in 64-bit mode, so I rebuilt Bullet3-2.86.1 in 64-bit and reproduced the bug: the teddy bear was static.

Yes, I think a github issues should be filed specifying that it is the 64-bit mode that is broken.
bullseyetroll
Posts: 3
Joined: Mon Jul 10, 2017 6:23 am

Re: RigidBodyFromObjExample

Post by bullseyetroll »

I delete everything and compile it with 64bit again ... and magically it works.
I'm wondering how to reproduce this bug..
Post Reply