How to attach the object to a character?

How to attach the object to a character? (clothes)

that it moves with the character?

I put on my pants. how to get them to repeat the movement of the legs. Pants must bend with the foot where the knee or where the tailbone.

We need to do a separate animations for clothes?

How to do that I would like cloak moved while running?

How to make clothing that would not cut into the character? (Add physics?)

Hi,
do you want a real physics simulation of clothes like in https://youtu.be/sTzA4QR-9Os? This is extremely complicated and probably way to slow for most games.
The “standard” way is to include clothes in your model. Most modelling tools like Maya or 3ds max provide cloth simulations. You can use them to include the cloth movements in your animation.

Yes. Thanks but will it work this effect in jmonkey? (the cloth)

Hi
The usual way is :
If you want cloth to blend with movement of body parts then yes you need to rig and animate cloth. For doing this you need to attach cloth to character rig and do “weight_paint” on cloth in your 3D Editor so that the cloth will follow the movement of the character rig.(Blender has an auto weight paint option which will lessen the painful work of weight painting )

there is an other ugly way :wink:
you can cut and separate the cloth for each bone ex: for pants you need to cut it to 4 separate part (left_upper_leg, left_lower_leg , right_upper_leg, right_lower_leg)
https://wiki.blender.org/uploads/3/30/RST.21.png

the attach each part to it’s corresponding bone in JME using the AttachmentsNode this way each cloth part will follow the corresponding bone Transform.

Btw: for the realistic cloth simulation like in the video, there is two ways 1-real time simulation which is very CPU consuming 2- using baked soft body animation. for the second one the game engine should support vertex animation but jme does not support it but i am using a very simple trick to use baked soft body animation in jme . you may see this :

3 Likes

Thanks, whether it is possible to change the speed of the animation?

Yes . you can change it both in jme or in blender.
for jme :
see https://jmonkeyengine.github.io/wiki/jme3/advanced/animation.html#animation-channel-properties

Like this