8/23/18 “Rabbit’s Hole”

I have been researching on how to create and add cloth in Unreal 4. This post is about the journey where I found a solution to my main issue, collisions don’t work! I would like to say before I start, I have experience with Unity cloth system and very little in Unreal. So I started like anyone else would by researching…on youtube. I stumble across a lot of tutorials but here are a few that helped me: https://www.youtube.com/watch?v=uTOELBNBt04&t=1003s

https://www.youtube.com/watch?v=OO8v-yzeuBo&t=223s

https://www.youtube.com/watch?v=j34Q9J4Sbmk

The first link is rather old. It explains how to setup the clothing in Autodesk Maya using Nvidia APEX. The newer versions of UE4 has it built in. The workflow is simple. Here is an breakdown: Import model and skeleton> Select “cloth” mesh > Right click and create new cloth data > Right Click and Apply data > Paint the weights of the masks

With that knowledge, I went into the editor and created my mesh…it didn’t turn out so well. The cloth when right through my character. I popped open another tutorial. https://www.youtube.com/watch?v=zK580JmywZQ

I thought I must be missing something. I tried again and I ran into the same issue as before collision issues. It acted like I did not assign the correct physic assets but I did. I decided to go basic and create a flag like this video: https://www.youtube.com/watch?v=kjOq8OB_3AQ&t=10s I followed it and it worked! So something else was off. I started to google “ue4 cloth collision not working” and “ue4 cloth system broke” desperately trying to figure out what could be wrong. I came across some UE4 documentation for help: https://docs.unrealengine.com/en-us/Engine/Physics/Cloth/Overview It didn’t help as I already got a plane to become clothing. So here comes the rabbit’s hole: https://answers.unrealengine.com/questions/456817/constraints-are-broken.html

https://answers.unrealengine.com/questions/667930/clothing-tool-collision-not-working.html

https://answers.unrealengine.com/questions/737608/cloth-collisions-still-not-working-in-418.htmlhttps://answers.unrealengine.com/questions/688363/clothing-tool-ignores-physic-asset.html

https://answers.unrealengine.com/questions/661274/cloth-goes-through-collision-like-its-nothing.htmlhttps://answers.unrealengine.com/questions/121075/cloth-physics-not-colliding-with-worldcollision-ac.html

https://answers.unrealengine.com/questions/737608/cloth-collisions-still-not-working-in-418.html?sort=oldest

 

One of the best answers, I found was here : https://answers.unrealengine.com/questions/688363/clothing-tool-ignores-physic-asset.html

It looked like it had to do something with scale of the character. I dug a little deeper into the project scene. I found in the editor there is a way display the cloth physic colliders. When displayed, the colliders were all exploded and pushed out. I began re importing and trying to see if my mesh was broken. Over and over again…

I discovered the issue. Remember something about the scale? Well, we had to scale the characters down due to their sizes being too large. I had to create a new rig that I scaled down in Maya and reimported it. It worked! I have tried to work around this by using Nvidia APEX: https://developer.nvidia.com/clothing  It didn’t work. The only real solution to keep the scale was to create a nCloth simulation in Maya and create a custom rig to bake that data to bones. Bad news, I will have to retarget all the characters animations regardless of what solution I use.

The moral of the story is NEVER scale your skeleton mesh in the editor! or never scale if you are planning to use the cloth system in UE4.