Dynamic Character Primer
This document is meant to briefly give you a solid footing on the concepts behind the dynamic character system.
A Part is a mesh file named to represent some visual aspect of a character.
- Ex. arm_left_bare could be a part (probably named "Bare Left Arm") that would be used to render a character with no clothing on their left arm.
A Slot is a collection of parts that conceptualizes some section of a character. Only one or zero (if allowed) parts can be selected at any given time in each slot on a character.
- Ex. "Left Arm" could be a slot containing arm_left_bare and arm_left_robot. This would allow a character to have either a plain human left arm or a robotic left arm.
A Division is a collection of slots that conceptualizes a higher-level region of a character. Divisions are only used for organizational purposes when interfacing with HSL.
- Ex. "Upper Body" could be a division encompassing slots "Torso," "Left Arm," and "Right Arm."
A Layer is a Texture equivalent of a slot. Layers are stacked, as in Photoshop.
A Piece is a Texture equivalent of a part. Only one or zero (if allowed) pieces may be selected for any given layer.
- Ex. An "I Heart Mom" tattoo (in i_heart_mom.dds) could be a piece in a tattoo layer.
A Texture Bank is a collection of layers. Each material may reference one or zero texture banks, so any given part file may use several texture banks. The name of a texture bank used by a material is determined by taking the material name and removing the ~dt2_ or dt2_ prefix (so a mesh mapped with a material named ~dt2_lower_body or dt2_lower_bodywill use a texture bank named lower_body). If a material name doesn't begin with ~dt, the material is considered non-dynamic, and a texture bank will not be referenced.
A slot that is conceptually a child of a part. All of the parts in a subslot share whatever texture bank(s) is/are on the "parent" part, and add no new texture banks to the mix. This allows for more visual options without increased overhead of additional texture switches (all meshes with identical materials on a character will internally be stitched together into a single draw call). Subslots cannot themselves have subslots (you will find this isn't needed).
- Ex. A pouch subslot may exist beneath a utility belt part. There may be several types of (geometric) pouches to choose from that all map to the utility belt texture.
|Note: Parts, slots, subslots, and divisions are specified in .par files. Layers and pieces are specified in .dtb files (DynamicTextureBank), which are texture bank specifications.|
The following flow chart documents how the various terms we just defined relate to each other: