Cloth Mapper
- Digital500 JPY

Cloth Mapper is an alternative for the Unity “Edit Cloth Constraint” feature. It allows you to paint a greymap which can be applied then to the cloth.
When should Cloth Mapper be used?
・ Unity loses your current cloth constraints when you change something in the mesh topology. ・ Unity loses cloth constraints also when updating from Unity 2018 to 2019. ・ You don't like the Unity “Edit Cloth Constraint” feature, because it’s not user friendly. ・ You want to always have a backup of your cloth constraints. ・ You have to “Edit Cloth Constraints” often and need some repeatable results. ・ You want to test your cloth with different “Max Distance” settings.
How Cloth Mapper works
Unity stores the cloth vertices in an own structure which is different from the mesh structure. The Cloth Mapper script iterates through each vertex of your cloth component and tries to find the according vertex in the mesh component. When found, it uses the UV-coordinates to read the grey value in your greymap and multiplies it with the max distance value setting. You can also define an optional fallback texture for the cases when the first greymap returns black. Limitations: ・ In some cases, the according mesh vertex cannot be found and the assignment fails. The log shows you a result. ・ The mapping process can take some time. It depends on the amount of vertices.
How do I create a greymap?
You can use any texture painting software of your choice. Import your FBX of your cloth and paint the regions in black, which should stay in place. Paint white for regions which the maximum distance setting will be applied to. All grey values between black and white will be converted in proportion. When finished, export the texture to your Unity project. The texture size depends on the amount of vertices. A size of 256x256 or 512x512 should work fine for the most cases.
Contents
・ Unity 2019 package file with prefab and scripts
Terms of service
・ Commercial use: Allowed ・ Redistribution: Not allowed ・ Modification: Allowed ・ Making the software available to someone other than the buyer: Not allowed ・ Distributing parts of, or the whole software after any revisions, modifications (adjustments), whether it's paid or free: Not allowed ・ Distributing parts of, or the whole software as one's work, whether it's paid or free: Prohibited
Support
For support or bug report, join my Discord server: discord.gg/uMbn6EhaSN
Update history
2021/10/13 - ver1.00 ・sales start