- Home /
Adding clothes to a character rig in game
I can import characters including clothes from Makehuman. I can enable and disable clothes in game to change it's outfit. But I want to add additional clothes which are not already included with Makehuman characters and are in separate prefab. These additional clothes could be having bones/rigs attached with them or not. But I want to Instantiate the cloth on a button click and then add it to the animated character and it's rigs too, so that it matches with the animation and will look like the character is wearing that dress/cloth. Any idea how can I do that?
Answer by Cherno · Aug 21, 2014 at 09:32 PM
It's possible, and it's pretty easy. Here is everything you need:
The script itself
http://answers.unity3d.com/questions/44355/shared-skeleton-and-animation-state.html
A little bit of extra cautionary information from myself:
http://answers.unity3d.com/questions/668332/weightless-bones-dont-get-added-to-skinnedmeshrend.html
If any parts of the body show through and worn clothes, you could try using a seperate material for each limb and making that one transparent when it is covered.
Thanks. It works. However, I didn't understand what you suggested about see through problems. But I would rather modify the cloth meshes a little bit.
When, say, a shirt covers the underlying arm mesh, it's possible that the mesh of the arm clips through the cloth mesh when the arm is angled in a certain way, at the shoulders or the elbow. This can be alleviated by just making the part of the underlying mesh invisible if it's supposed to be covered.
Your answer
Follow this Question
Related Questions
How to Make a Character Wear Clothes from 3rd Party Sources? 0 Answers
Blender Animation Rig 0 Answers
Animate rig bones game objects. 0 Answers
Importing problem 1 Answer
3ds Max exported rigged model, how to put skeleton as child of rigges Object? 0 Answers