Modular Character System
  • Overview
  • Setup
  • Demo Scenes
  • System Overview
    • Modular Character
    • Wearable
    • Wearable Set
      • Character Preset
      • Wearable Set Data
    • Wearable Database
    • Character Style
    • Cosmetic Styles
      • Skin Style
      • Eye Style
    • Character Morphs
  • Troubleshooting
  • Asset Updates
  • Reference
    • Scripting Guide
      • Modular Character Manager Functions
        • Wearables
          • EquipWearable
          • RemoveWearable
        • Wearable Sets
          • EquipWearableSet
          • EquipWearablePreset
          • RevertSetToDefaults
          • GenerateRandomSetFromDatabase
        • Materials
          • SetWearableMaterial
          • SetWearableMaterialArray
          • SetEyeStyle
          • SetSkinStyle
          • SetBodyMaterial
          • SetFaceMaterial
          • SetEyeMaterial
        • Character Morphs
          • SetBlendshapeOnAllMeshes
          • UpdateSetMorphValues
          • ApplySetMorphValuesToCurrentSet
          • ApplyCurrentMorphValuesToNew...
        • Face Merging
          • MergeFace
          • UnmergeFace
          • DestroyMergedFace
        • Saving and Loading
          • SaveCharacterPrefab
          • SaveCharacterPreset
          • SaveDataAsJSON
          • LoadCharacterFromJSON
      • Character Style Functions
        • GetAllWearablesOfCategory
        • GetAllNonDefaultWearablesOfCategory
        • GetWearableByName
        • CheckIfDefaultItem
      • Hidden Wearable Manager Functions
        • SetSlotStatusFromManagerType
        • AddWearableSlotToHiddenList
        • CheckHiddenListForWearable
  • Changelog
  • EXTERNAL LINKS
    • Stellar Game Assets Website
    • Join me on Discord
Powered by GitBook
On this page
  • Wearable Types
  • Slot Indices
  • Creating a Wearable Asset
  • Meshes & Wearable Materials:
  • Cosmetic Matches
  • Masks & Variants:
  • Custom Bones
  • Wearable Attachments - Parenting
  1. System Overview

Wearable

The building blocks for the Modular Character System.

PreviousModular CharacterNextWearable Set

Last updated 3 months ago

A Wearable asset holds all of the data and reference for each of the modular pieces and parts that make up a character. Essentially, in addition to providing contextual information, such as slot type and name, the asset holds a reference to the physical mesh and materials available for a given item. Wearables are indexed by type and their category index matches the slot index in a Wearable Set array.

There are three different types of Wearable asset. Each type is treated differently by the Wearable System and as such, contains different data and references:

Wearable Types

Wearable Clothing

There are 14 potential clothing slots, consisting of: face, chest, legs, hands, feet, hair, back, shoulders, earwear, eyewear, head, neck, wrists, and waist, . Of these, the face, chest, hands, legs, and feet are considered mandatory, which means the system will not allow you to remove them completely. If you remove an item equipped in one of these slots, it will be replaced with a default item.

Wearable Cosmetic

Wearable Cosmetics encompass parts that alter a character's appearance. This includes eyebrows, facial hair, and piercings.

Wearable Cosmetics differ from other wearable items in a few ways. Since they need to be configured differently for different face Wearables, they contain a cosmetic match parameter that ensures they are always set up properly. This means that when a face is changed, the cosmetics are also changed behind the scenes to match that face.

Cosmetics can also be merged with the character's face for better functionality with expression blendshapes and phomenes. See the Merge Face function in the Modular Character Manager for more details.

Wearable Attachment

Wearable Attachments are props that can be held in either hand. As they do not use a skinned mesh renderer (at least, not normally), they are equipped differently than Wearable Clothing and Wearable Cosmetics. Instead of rigging them to the armature, they are parented to a transform. For this reason, Wearable Attachments allow for positioning, rotational and scale information to be set when they are instantiated.

Wearable Appendage

A Wearable Appendage is one that becomes part of the character such as tails, horns, and wings. It is more "body part" than apparel and will most often contain custom bones. These are parented to either the head, hips, or spine depending on your configuration.

Variant

A Variant, as the name suggests, is a variation of an existing Wearable that can be automatically swapped in when necessary. For example, if a high-waisted pair of pants is equipped, the existing shirt can be swapped to a “tucked in” variation. The System will automatically swap variants in and out as needed.

Slot Indices

Creating a Wearable Asset

Wearables can be created by right-clicking in a folder and navigating to Create > Modular Character System > Wearables > (Wearable Type).

All Wearables (aside from variants ) have the multiple tabs. The first tab will always be information about the Wearable, such as it's category, name, description and any icons available. Depending on the category you choose, you may get other options (like feet will contain a field for the height of the shoe):

Wearable Clothing and Wearable Appendages contain additional tabs to further define custom bones, while cosmetics, attachments and faces do not need them.

Meshes & Wearable Materials:

This tab is used to assign the actual mesh you will be using for the Wearable. You can also specify the Materials the Wearable can use. Lets talk about that in more detail.

A Wearable Material Region refers to the material array for the mesh. If the mesh uses multiple materials, you will need to specify a region for each, in the same order as the material array.

The Material type is used to determine if the available materials are controlled by the Wearable, or by the Character Style. For instance, if the character is using a pale skin tone, you would want to ensure that the wearable also uses the same skin tone. The material type in this case would be set to Body, name the region something like "Skin", and leave the rest of the fields empty. If the Wearable is controlling the material, you will need to change the type to Wearable and assign available materials. Other types include Face, and Eyes, which are also controlled by the Character Style.

Wearable Material

Wearable Materials are the most annoying part of the process to set up, but they help to keep available Materials extremely organized and accessible. A Wearable Material contains data, mostly for use to reference and for UI applications. You can give the Material a name other than the file name, a linked sprite and a color swatch. Of course, you don't need these, but it's highly recommended to take the time to fill them in.

Cosmetic Matches

Instead of one mesh field, a Wearable Face will contain fields for something called "Cosmetic Matches". These are a special class that links a specific mesh for this Cosmetic to a specific Face Wearable. So if that Face Wearable is equipped, the proper mesh is always swapped in. This is because face shape will determine the shape of these types of meshes. The same materials will apply to all of the cosmetic matches so the process is done seamlessly.

Masks & Variants:

Variants are available for clothing and cosmetics to increase compatibility between slots to each other. If you specify that a Wearable requires, or has, a variant, you will be able to further define the link between the assets. Different variant slots are required based on the Wearable you are creating, and different variants slots are used based on what this Wearable would use.

Likewise, with Masking, different options are presented. Masking works by hiding other wearables if this Wearable will overlap with them in an unflattering way. When this Wearable is removed, the other wearables will become visible again — unless the Wearable replacing this one also masks that slot.

The fields available will change depending on the category of your Wearable. Let's take a look at what one for the Chest looks like.

If, for instance, you set "Masks Neck" to true, any neck Wearable added (or currently worn) will be hidden while this Wearable is equipped.

Variants on the other hand, work a bit differently. Here, you can choose to require a Hand variant (because sleeves might get in the way), but you can also provide variants for other Leg and Shoulder Wearables, or both!

Variants: Lets veer off-course for a minute and discuss Variants, since we're on that tab anyway. If you do choose to make a Variant available for the Wearable you're working with, you'll need to create a Wearable Variant.

The variant only needs two pieces of information: The original Wearable it's linked to, and the mesh which will serve as a variant. Assign them both and then assign this Variant to the slot in the original Wearable.

Sometimes variants don't need to mask the same things as an original. In that case, you can set the "Original Masking" bool to false and specify the masking for this Variant differently.

Custom Bones

Clothing and Appendages can make use of custom bones.

If you set the "Custom Bones" bool to true, you will be presented with fields you need to assign to allow them to work properly. First, choose the bone in the existing armature that your custom bones will be parented to. This can be the Head, Spine, or Hip bone.

Next, you'll want to drag your custom file into the scene and drag the entire custom armature into the "Custom Rig" field (see the outlined below). It doesn't matter if there are more bones than needed. The next field will specify the exact name of the bone that will serve as the start of your custom bone hierarchy, and this bone will be the one parented to the existing rig (see highlighted below).

Lastly, you'll want the position and rotation data for the bone you've just named as it is in the hierarchy. You can automatically populate this data by selecting the bone and clicking "Capture Bone References"

Wearable Attachments - Parenting

Wearable Attachments have a unique tab called "Parenting". This allows you to specify the position, rotation, and scale, when the attachment is parented, and to what transform.

As with the Capture Bone References button in the Custom Bones tab on Clothing and Appendages, you can automatically populate the data by parenting the mesh to the Character in the scene at the position and scale you want it, then selecting it and clicking the "Capture Selected References" button.

Wearable Types
Creating a Wearable Asset
Meshes & Wearable Materials
Cosmetic Matches
Masks & Variants
Custom Bones
Parenting (Wearable Attachments)