Replies: 9 comments
-
What tutorial? Please provide complete instructions how to build and reproduce your issue (including operating system, compiler, build system (premake, cmake), build system flags (double precision, 32/64 bit etc) etc etc. When using pybullet, the easiest way to use Bullet, those files all work just fine. |
Beta Was this translation helpful? Give feedback.
-
@erwincoumans Operating System: Windows 7 |
Beta Was this translation helpful? Give feedback.
-
Since you mentioned its fine in pybullet, I delete the source and rebuild everything. |
Beta Was this translation helpful? Give feedback.
-
Not sure if this should be closed just because your problem is fixed. It seems that with your former setup, one could break something. Can you post your reproduction code here? |
Beta Was this translation helpful? Give feedback.
-
Then, if somebody finds this when similar problems occur , s/he can investigate more and maybe contribute to resolving the potential error. |
Beta Was this translation helpful? Give feedback.
-
@benelot the code is the original RigidBodyFromObjExample in the ExampleBrowser. |
Beta Was this translation helpful? Give feedback.
-
@benelot am facing this issue. Even on multiple rebuilds. Compiler : gcc 5.4.0 Seems to be an issue while reading the |
Beta Was this translation helpful? Give feedback.
-
@erwincoumans after skimming through some code, I found This seems to be adding vertices to an array, over all faces of a shape. This leads to possible duplicates in this case, where a vertex which is shared by many different faces will be added multiple times to this vector. I think this is not the intended structure? |
Beta Was this translation helpful? Give feedback.
-
We use the same indices for vertex positions, normals and uv coordinates, so the combination has to be unique. Since we don't know if the indices point to the same vertex (pos, normal, uv) we duplicate all vertices to make sure they are unique. If you are sure the combination (vertex position/normal) can be shared, the code can be optimized. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been testing the importer these days.
In the tutorial, the imported mesh is stored in
GLInstanceGraphicsShape
then, the following code is used to create convexhull from the mesh.
const GLInstanceVertex& v = gfxShape->m_vertices->at(0); btConvexHullShape* shape = new btConvexHullShape((const btScalar*)(&(v.xyzw[0])), gfxShape->m_numvertices, sizeof(GLInstanceVertex));
However, I find out that many imported files failed to create a proper convex hull.
That is , the object is not interacting with the world.
For instance, the "teddy.obj" in the tutorial doesn't work, but "sphere8.obj' works.
And even when if works, the AABB seems strange too.

Is this an issue of the importer (but the shape seems ok visually) or btConvexHullShape?
Beta Was this translation helpful? Give feedback.
All reactions