You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a question about physics simulation using GPU.
First, I confirmed that the physics simulation works as expected by using b3GpuNarrowPhase::registerConvexHullShape with the physics engine. This is based on the implementation found in the demo scene (OpenCL > Box-Box).
Next, I attempted to register a concave shape using an arbitrary mesh with the physics engine as follows:
// GpuConvexScene.cpp// Line: 229int colIndex = -1;
if (gUseInstancedCollisionShapes)
{
//colIndex = m_data->m_np->registerConvexHullShape(utilPtr);
b3AlignedObjectArray<b3Vector3> b3verts;
b3AlignedObjectArray<int> b3idxs;
size_t vlen = sizeof(tetra_vertices) / sizeof(float);
for (size_t i = 0; i < vlen; i+=3) b3verts.push_back(b3MakeVector3(tetra_vertices[i], tetra_vertices[i+1], tetra_vertices[i+2]));
vlen = sizeof(tetra_indices) / sizeof(int);
for (size_t i = 0; i < vlen; i+=3) b3idxs.push_back(tetra_indices[i]);
float scale[3] = { 1.0f, 1.0f, 1.0f };
colIndex = m_data->m_np->registerConcaveMesh(&b3verts, &b3idxs, scale);
}
When I executed this code, all objects passed through the ground and fell downward, without any physics simulation or collision occurring. Upon further inspection, it seems that collision pairs in the broad phase can be obtained.
Does the current version of Bullet (version: 3.25) support GPU-based simulation when shapes are registered using registerConcaveMesh?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I have a question about physics simulation using GPU.
First, I confirmed that the physics simulation works as expected by using b3GpuNarrowPhase::registerConvexHullShape with the physics engine. This is based on the implementation found in the demo scene (OpenCL > Box-Box).
Next, I attempted to register a concave shape using an arbitrary mesh with the physics engine as follows:
When I executed this code, all objects passed through the ground and fell downward, without any physics simulation or collision occurring. Upon further inspection, it seems that collision pairs in the broad phase can be obtained.
Does the current version of Bullet (version: 3.25) support GPU-based simulation when shapes are registered using registerConcaveMesh?
Thank you for your assistance.
Beta Was this translation helpful? Give feedback.
All reactions