Clothing Support
The default way clothing is applied is by setting MeshPart.TextureID
on body parts to the clothing's asset ID. This results in textures not supporting transparency and taking on the background color the of asset.
Character rigs must also be UV-wrapped to support clothing. In the repository is a Dogu15 rig UV-wrapped by UnitingMatrixXCV.
A solution that allows for transparency with body part colors is to use a SurfaceAppearance
in each body part with SurfaceAppearance.ColorMap
set to the clothing's asset ID. This solution still has problems though such as shirts not being able to overlap the pants on the torso.
This solution is not applied as the default because SurfaceAppearance.ColorMap
is not a scriptable property. So all clothes used must be generated as SurfaceAppearances before runtime and cloned into the characters when needed.