Hair
Hairstyles as loose FBX files with a .ulhair description.
Hairstyles work like clothing: a small text file per style and a mesh.
ini# Hair/Female/yn_long_waves.ulhair
DisplayName: Long Waves
Gender: Female
MeshId: Hair/Female/yn_long_waves.fbx
Material.Transparent: Hidden
| Key | Meaning |
|---|---|
| (file name) | The style's id, used by presets (HAIR Hairstyle) and the character creator |
DisplayName |
Name in the creator |
Gender |
Female, Male, or leave it out for either |
MeshId |
The mesh, relative to a Meshes/ folder in any enabled mod |
Material.<slot> |
The material for one FBX material slot; Hidden hides that slot (Daz helper surfaces) |
Files are found anywhere under Hair/. A Thumbs/<id>.png next to the .ulhair gives the style a picture in the creator.
The mesh is a Genesis 8 fitted hair exported from Daz Studio as FBX. Hair colour and thickness come from the character's appearance and are applied by the game.
Textures
A style brings its own pictures the way clothing does, beside its mesh:
textMeshes/Hair/Female/yn_long_waves.fbx
Meshes/Hair/Female/Textures/yn_long_waves/Default_BC.png colour
Meshes/Hair/Female/Textures/yn_long_waves/Default_M.png opacity mask (the strands)
Meshes/Hair/Female/Textures/yn_long_waves/Default_N.png normal map (optional)
Each FBX material slot looks for <slot>_BC.png (also without an exporter's _1 suffix), then Default_BC.png. The pictures go on the hair material: the slot's Material.<slot> line, Material.* for every slot, or the base game's hair material when the file names none. The character's hair colour tints _BC, so paint it light grey with the strands' shading and let the game colour it. _M is what makes cards look like strands: white is hair, black is nothing.
Hair that moves
Hair that hangs below the head can swing. The game looks for bones named hairdyn_<chain>_<k> in the hair's skeleton: each chain starts under head, runs down the hair, and ends with a bone hairdyn_<chain>_end that carries no weight and only marks the tip. Those chains follow the head, sway with gravity and the character's movement, and slide over the body instead of passing through it. A style without such bones simply follows the head.
The base game's styles get their chains from Tools/HairCards/rig_dynamics.py (Blender). That pass also runs body_fit.py first, which pushes out any part of the hair modelled inside the body. Run both on your own styles, or skin cards by hand to bones with these names.
Tuning one style
A .ulhair can change how its own hair moves with Physics.<Key> lines:
iniPhysics.Gravity: 0.3 # a stiff updo: barely moves
Physics.Stiffness: 10
Physics.Collider.Male.Chest: bone=chestLower radius=16 offset=0,-1,8.8
Settings and colliders for every style (.ulhairphysics)
HairPhysics/*.ulhairphysics in every enabled mod, Key: value lines; a later mod's line replaces the same key. The base game's file is ul_Base/HairPhysics/Default.ulhairphysics.
| Key | Meaning |
|---|---|
Stiffness |
Pull back toward the modelled shape, per second, at the root of a chain |
TipStiffness |
Fraction of that pull left at the tip (1 = as stiff as the root) |
Damping |
Velocity kept per 1/60 s (0–1) |
Gravity |
Fraction of real gravity, acting relative to the modelled pose: a style made hanging keeps its shape upright and falls toward the floor when the head bends |
MaxAngle |
Degrees a segment may turn away from its modelled direction |
Thickness |
cm the hair keeps off every collider (the chains run down the middle of a lock) |
Friction |
Share of its sliding hair touching the body or the ground loses each frame (0–1): keeps a loosely sprung braid on the shoulder |
Ground.<Name> |
bone=<bone> below=<cm>: the hair rests on the plane under the lowest of these bones, each below cm under its bone. Standing that is the floor under the heels; lying down, the floor or bed under the head and back |
Collider.<Name> |
bone=<bone> [to=<bone>] radius=<cm> [offset=<out>,<forward>,<up>]: a sphere on a Genesis 8 bone, or a capsule between two bones. The offset is in cm from the bone: out away from the body's midline (a left and a right collider share the same numbers), forward toward the face. radius=0 removes a collider |
Collider.Male.<Name> |
Replaces Collider.<Name> on a male body |
The collider sizes are for the base figure. In the game each one grows or shrinks with the wearer's own morphs, measured on the skin around it, so a fuller chest or broader shoulders push the hair out as far as they reach.