Delta UVs and Clothing Masks

Delta UVs

The Atlas clothing material uses Delta UVs to project delta textures from the base character body onto clothing so that clothing will react to the body fat slider. They are also used so that multiple articles of clothing can react the same way to the same masks.

Delta UVs are written to the second UV channel of a clothing asset by using the Clothing Wizard (Found in the AtlasDevKitContent tool repo)

The clothing HDA will also write vertex colors and Body Distance UVs.

Any clothing asset will need these UVs and vertex colors to work properly with our shrink mask and body fat system.

A properly processed piece of clothing will display vertex colors if “Display Colors Attributes” is toggled on in Maya

../_images/deltauvs001.png

UVs will look like this on a properly processed mesh:

../_images/deltauvs002.png

Clothing Masks

Clothing masks give us the ability to mask out the player skin where it intersects with the armor, shrink one piece of clothing into another, and mask out other armor meshes where they intersect with the armor. They also carry the information that tells what “layer” a piece of armor is on. The layer number lets the engine know the hierarchy of which armor pieces are going to mask which.

The shrink mask texture is a layered mask texture that is set up like this:

  • R = Skin Mask (Human UV0) <- Human skin opacity
  • G = Shrink Mask (UV1)
  • B = Clothing Mask (UV1) <- Opacity

The clothing layer is displayed as a small gray square at the lower left corner of the texture

Currently we have 9 layers:

  • layer 0 = boots, gloves small = 0% gray
  • layer .1 = torso extra small = 1% gray
  • layer 1 = pants small = 5% gray
  • layer 2 = torso small = 10% gray
  • layer 3 = gloves small = 15% gray
  • layer 4 = pants big = 20% gray
  • layer 5 = boots big = 25% gray
  • layer 6 = torso big=30% gray
  • layer 7 = gloves big = 35% gray
  • layer 8 = hats = 40% gray

Masks should be named as “T_HM(HF)_ArmorSetName_ArmorPiece_M”