Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Adding a cape to a character
#1
Hi,

What would be the best way to add a cape to a character and use collision so that the cape doesn't move through any part of the character? The cape is a separate mesh so it is not attached to the rigged character or animation. Do I have to do it the Unity way or is there a way to use the characters mesh?

Thank you!
Reply
#2
(23-07-2017, 07:29 PM)GenPhiGames Wrote: Hi,

What would be the best way to add a cape to a character and use collision so that the cape doesn't move through any part of the character?  The cape is a separate mesh so it is not attached to the rigged character or animation.  Do I have to do it the Unity way or is there a way to use the characters mesh?

Thank you!

Hi there,

You should use primitive colliders to approximate your character shape. Note that this is not the "Unity" way, but the "realtime" way no matter what engine you use. It is an enormous waste of processing resources to use the actual character mesh as a collider (and not even feasible most of the time, except for extremely simple meshes in very controlled situations).

Even better would be for you to skin the cloth to the same skeleton used by the character and make use of skin constraints which would prevent the cape from going past its skinned pose. This way you could ensure that the cape does not get into weird tangled/clipped states with the character body when high-speed animations are played (somersaults, sudden accelerations, etc). This (skinned mesh + simulation on top) is how character clothing is implemented in 99% of games.
Reply
#3
(24-07-2017, 05:03 PM)josemendez Wrote: Hi there,

You should use primitive colliders to approximate your character shape. Note that this is not the "Unity" way, but the "realtime" way no matter what engine you use. It is an enormous waste of processing resources to use the actual character mesh as a collider (and not even feasible most of the time, except for extremely simple meshes in very controlled situations).

Even better would be for you to skin the cloth to the same skeleton used by the character and make use of skin constraints which would prevent the cape from going past its skinned pose. This way you could ensure that the cape does not get into weird tangled/clipped states with the character body when high-speed animations are played (somersaults, sudden accelerations, etc). This (skinned mesh + simulation on top) is how character clothing is implemented in 99% of games.

Thank you for the response and thanks for pointing me in the right direction.  I've been using Mixamo to rig and animate the characters and didn't have good luck with rigging when I had extra material.  But... I've rebuilt the model with the cape attached but I am having some crazy stretching issues no matter what setting I use.  I followed the steps in the skirt example you have but it doesn't appear to be working.  I wonder if you mind doing a video tutorial on this subject?

 
Reply
#4
(28-07-2017, 02:46 AM)GenPhiGames Wrote: Thank you for the response and thanks for pointing me in the right direction.  I've been using Mixamo to rig and animate the characters and didn't have good luck with rigging when I had extra material.  But... I've rebuilt the model with the cape attached but I am having some crazy stretching issues no matter what setting I use.  I followed the steps in the skirt example you have but it doesn't appear to be working.  I wonder if you mind doing a video tutorial on this subject?

 

Hi,

We have a character clothing video tutorial in the making, but it will take some time for it to be ready. 

If by stretching issues you mean the cloth is too elastic, you can just increase the amount of distance constraint iterations in your solver, or use tether constraints. If you are seeing strange, spiky/messy cloth you're most likely running into scaling issues: non-uniform scaled cloth mesh, different scales for your cloth and your topology, etc.

It is not an uncommon error to simulate a cloth mesh several times smaller or bigger than the visual mesh, that will cause all sorts of visual artifacts. The easiest way to get rid of scaling problems is to ensure all your meshes have a uniform scale of 1 when exported, and control the size of your character using the "scale" parameter the unity mesh import settings.

cheers,
Reply
#5
(28-07-2017, 07:57 AM)josemendez Wrote: Hi,

We have a character clothing video tutorial in the making, but it will take some time for it to be ready. 

If by stretching issues you mean the cloth is too elastic, you can just increase the amount of distance constraint iterations in your solver, or use tether constraints. If you are seeing strange, spiky/messy cloth you're most likely running into scaling issues: non-uniform scaled cloth mesh, different scales for your cloth and your topology, etc.

It is not an uncommon error to simulate a cloth mesh several times smaller or bigger than the visual mesh, that will cause all sorts of visual artifacts. The easiest way to get rid of scaling problems is to ensure all your meshes have a uniform scale of 1 when exported, and control the size of your character using the "scale" parameter the unity mesh import settings.

cheers,

Scaling was the problem.  Thank you!  Now I have another issue.  When I select Skin Radius in the Particle Editor, it is not painting.  The color is a of the object is solid and doesn't change when I paint.

It's probably something simple, but I am not seeing it.

Thank you again for the help!

Edit: Nevermind. I figured it out... it was something simple. Thanks again! Still would love a video on this subject to better understand how to keep the mesh from going through the body.
Reply