Jump to content
  • Advertisement
Sign in to follow this  
562538332

How to make a Physx TriangleMesh into a simulation dynamic

This topic is 1061 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In physx, PxTriangleMeshGeometry that are attached to a simulated PxRigidDynamic  must not be SIMULATION_SHAPE.

In other word, you can't set the a simulated PxRigidDynamic with a SIMULATION_SHAPE TriangleMesh. 

That is very annoying! If i want a TriangleMesh to be SIMULATION_SHAPE,  that the PxRigidDynamic is attached to must be KINEMATIC,  and the Physx would not simulate the RigidActor for me.

I want the PxRigidDynamic with TriangleMesh to be SIMULATE, NOT KINEMATIC, and TriangleMesh is also being used into collision.

HOW TO SOLVE IT.

 

Share this post


Link to post
Share on other sites
Advertisement

There's a good reason for those restrictions... triangle meshes are really computationally expensive for collision detection! It's only feasible to use them if you can assume that they're static and/or assume that there will never be tri-mesh vs tri-mesh collisions.

 

For dynamic objects, you're supposed to use convex decomposition to convert the triangle meshes into an array of convex hulls (polytopes).

Share this post


Link to post
Share on other sites

There's a good reason for those restrictions... triangle meshes are really computationally expensive for collision detection! It's only feasible to use them if you can assume that they're static and/or assume that there will never be tri-mesh vs tri-mesh collisions.

 

For dynamic objects, you're supposed to use convex decomposition to convert the triangle meshes into an array of convex hulls (polytopes).

Does the Havok Engine or Bullet Engine also have that restriction? 

Share this post


Link to post
Share on other sites

In PhysX, I am pretty sure you can use something like "ComputeConvexDynamicShape" from arbitrary triangle cooked mesh to have a fully dynamic actor defined by triangle shape. It will do the decomposition for you.

Share this post


Link to post
Share on other sites

Collision between triangle meshes is not well defined and slow. I think Havok does not have that restriction and in Bullet you can use the GImpact shape. How well that will work is a totally different story though.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!