Sorry for my poor English.
In fact, I was working on changing rooms based on Kinect.
Much like this:
Therefore, clothing models need to bindings skeleton, so that you can control joints with human actions.
At the same time, some clothes need cloth simulation, especially skirts.
Current results, binding a skeleton model cannot simulate the correct cloth effects.
I’m guessing that binding a skeleton model, conflict with cloth simulation.
Therefore, I need to think of other ways.
here is my test file:
You could try using a rigid body proxy as the anchor for the skirt, and each frame update the position and orientation of the anchor by getting the worldTransform of the corresponding bone:
-- get world transform of bone
tBone = pMember.model("woman").resource.getBoneID("Pelvis")
tempTrans = pMember.model("woman").bonesPlayer.bone[tBone].worldTransform
-- make fine adjustments (e.g.)
tempTrans.translate(3.3 * tempTrans.xAxis)
tempTrans.rotate(tempTrans.position, tempTrans.zAxis, 90)
-- set position & orientation of anchor
anchorRB.position = tempTrans.position
anchorRB.orientation = tempTrans.axisAngle
To prevent the skirt intersecting the legs, you may want two more rigid bodies (one for each thigh) that are updated according to the femur bones. Setting the cloth's enableCollision property to true should have the cloth collecting around the legs instead of passing through them.
cloth simulation with physx has nothing to see with bones
for a coat, theorically you should:
- make an independent model for the coat
- create a box proxy for each bone and on each frame match each proxy position/speed/momentum (linear and angular) with bones... as mac dee explains
as a coat is a complex shape, you can expect a buggy result
i wouldn't use the cloth simulation for a coat, it's a too complex shape... i'd manage the coat with bones, not with physx
i'd use cloth simulation for a more simple shape, like superman's cape
you could indeed animate your clothing with bones. as a seperate object with its own skin or as part of the model with bones for movement