4 Replies Latest reply: Jun 22, 2012 1:33 PM by tyree_2 RSS

    How to create a cloth effect on a coat model which Binding bones?

    flymanbox Community Member

      I create a coat model with a single mesh , it can be used to create a  cloth effect  (with Physics (Dynamiks) Xtra of Director 11.5)

       

      BUT, When I create a coat model with a single mesh(Binding bones), the cloth effect Not working properly, just disappeared !

       

      I'd like to kown How to create a cloth effect on a coat model which Binding bones??

       

      Thanks !!

        • 1. Re: How to create a cloth effect on a coat model which Binding bones?
          flymanbox Community Member

          Sorry for my poor English.

           

          In fact, I was working on changing rooms based on Kinect.

          Much like this:

          http://www.youtube.com/watch?v=1jbvnk1T4vQ

           

          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:

          http://free-touch.com/free-touch_Download/Director/cloth_test.zip

          • 2. Re: How to create a cloth effect on a coat model which Binding bones?
            Dee McDee Community Member

            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:

             

            on enterFrame(me)

            ....

            -- 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

            .....

            end enterFrame

             

            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.

            • 3. Re: How to create a cloth effect on a coat model which Binding bones?
              Owen Buddenbaum Community Member

              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

              • 4. Re: How to create a cloth effect on a coat model which Binding bones?
                tyree_2 Community Member

                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