Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Preparing character for Obi cloth
#1
As I dig into the details I want to again thank you for such impressive work. I am fairly new to modeling (Maya) and have some questions about preparing Model/Clothes to work with Obi Cloth. I am creating my character with a trenchcoat from scratch (Using CharacterCloth manual as a guide). Forgive me in advance if the questions stray toward modeling.

-I assume I need to make a common rig for trenchcoat/character (Using Maya). This association of meshes to bones is what I believe causes Unity to add SkinnedMeshRenders in both meshes upon import (Obi requirement). Is this the correct approach to add cloths (i.e. Maya), as opposed to no skinning or Wrap Deformer tool.

-The CharacterCloth example has a separate skinned mesh for the character and trenchcoat. The unity characters for optimal performance manual page emphasizes that multiple skinned meshes is not desired. Is this a real issue that you just accept if you want clothing to move. I assume Unity Cloth has the same requirements.

-In your CharacterCloth example does it hurt performance to show parts of human mesh that are always covered by trenchcoat (ie. back)? Honestly I do not know how to correct this issue if it is a concern.

-Out of curiosity what exactly keeps the characters leg from going through the trenchcoat tails if he kicks backward. Is it Obi cloth simulation or is it inherent in the skinned mesh, because I assume the legs due not influence the trenchcoat. Really asking to get a better picture of how all the pieces work.
Reply
#2
Quote:-I assume I need to make a common rig for trenchcoat/character (Using Maya).  This association of meshes to bones is what I believe causes Unity to add SkinnedMeshRenders in both meshes upon import (Obi requirement).  Is this the correct approach to add cloths (i.e. Maya), as opposed to no skinning or Wrap Deformer tool.
- Correct. Unity only creates a SkinnedMeshRenderer if your mesh has some sort of skeletal skinning applied (Skin->Bind Skin->Smooth Bind, in Maya). You should skin your character mesh and your cloth mesh to the same skeleton. Then in Unity, add ObiCloth to the cloth mesh only.


Quote:-The CharacterCloth example has a separate skinned mesh for the character and trenchcoat.  The unity characters for optimal performance manual page emphasizes that multiple skinned meshes is not desired.  Is this a real issue that you just accept if you want clothing to move.  I assume Unity Cloth has the same requirements.

- Again, correct. An alternative tough, would be to use the same mesh for both body and cloth. This can be done bon in Unity and in Obi. Some characters are better done this way -for instance, a guy with a shirt and jeans, pretty close to his skin, that only needs to add some movement added to them to make the animation come to life- as the amount of non-cloth surfaces is very small.

However if your character cloth can separate significantly from its body and reveal skin underneath it, or if it's just a few parts of the mesh that you want to simulate -say less than 20% of the triangles- then the benefit of using separate SkinnedMeshRenderers outweighs the costs. All of this applies both to Obi and Unity's cloth.


Quote:-In your CharacterCloth example does it hurt performance to show parts of human mesh that are always covered by trenchcoat (ie. back)?  Honestly I do not know how to correct this issue if it is a concern.
- If you mean if it's costly to have invisible geometry inside a character (underneath its clothing), yes it has some skinning and rendering cost. However for just a few characters onscreen it is negligible. In some games though, were there are many characters on screen at once and performance is paramount, triangles that are always covered are removed from the final mesh.

FIFA soccer games come to mind: player clothing is done using the equivalent of Obi's skin constraints, and parts of the players not seen are not modeled at all: chest, thighs, shoulders, etc. Only the cloth on top of it all is part of the mesh.


Quote:Out of curiosity what exactly keeps the characters leg from going through the trenchcoat tails if he kicks backward.  Is it Obi cloth simulation or is it inherent in the skinned mesh, because I assume the legs due not influence the trenchcoat.  Really asking to get a better picture of how all the pieces work.
- Obi simulation. The trenchcoat particles are colliding against capsule colliders in the legs. This must be however fine-tuned in a per-character basis, and depending on your character animation set it might be problematic (fast somersaults, spins, etc). Using local-space simulation helps keeping the cloth movement controllable during high-speed animations and reduces the chance of clipping.

You can combine both approaches, though: skin constraints for parts that are close to the character skin (shirt sleeves, pants, etc) and that only collide with the skin directly underneath them, and colliders for cloth that can collide with parts of the body far away from its initial position (capes, trench coats, scarfs, etc).
Reply