Maybe I’m doing something terribly wrong here, but I don’t think so because I’ve poured over the docs and snippets and seem to be doing everything by the book.
I have a bunch of PxCloth actors in my scene. I initialize them the way the cloth snippet shows how to, and then let them do their thing in the simulation. My scene has a ground collider and gravity enabled. I don’t call setTargetPose at all…I just let the cloth actors fall and collide and such. I also enable the eSCENE_COLLISION flag on all my cloth actors.
However, the following settings seem to have issues (and I get the same results for both CPU/CUDA mode):
setLinearDragCoefficient has no effect on cloth, regardless of value. (edit: apparently only works w/setTargetPose)
setAngularDragCoefficient has no effect on cloth, regardless of value. (edit: apparently only works w/setTargetPose)
setting the eSWEPT_CONTACT flag (in combination with the scene eENABLE_CCD flag) causes all collisions to stop working (cloth actors fall through all scene colliders).
enabling inter-cloth collisions (by setting setClothInterCollisionDistance and setClothInterCollisionStiffness to non-zero values) has no effect…no cloth actors collide with each other in a meaningful way no matter what values are assigned. (edit: my rest offset values, solver iterations and inter-collision iterations all needed to be dramatically increased…doing that caused inter-cloth collisions to occur, but lack of point-triangle collisions still makes it an impractical solution for realistic cloth).
enabling self collisions (by setting setSelfCollisionDistance and setSelfCollisionStiffness to non-zero values) seems totally impractical for meshes that aren’t very dense…since it doesn’t seem like any particle-triangle collision tests are performed on the cloth against itself…by the time my collisionDistance is high enough so that particles collide with each other enough to prevent self-intersections, it’s higher than some edge lengths in my meshes which causes lots of jittering. Setting the stiffness lower isn’t a very good solution since then collisions begin to fail.
the various cloth solver frequency settings don’t seem to yield consistent results. For example, increasing stiffnessFrequency has the effect of decreasing all acceleration/velocity in the cloth. A cloth with twice the stiffness frequency will be affected by gravity half as much…so stiffnessFrequency can’t really be used to increase solver accuracy because it changes the nature of the whole sim. Similarly, damping doesn’t seem to be timeStep independent…if I increase the overall number of simulation steps, the effect of damping on the cloth increases as well. The docs seem to suggest damping is dependent on stiffness frequency, and stiffness frequency is defined at a rate per second…so doeesn’t that mean it should be substep independent?
I know PxCloth 3.x is a rewrite of PxCloth 2.x. Is it just in the very early stages of implementation right now? Because unless my setup is very wrong it seems like it’s lacking a lot of core functionality.