class

FHairAsset

A groom: guide curves in the asset's own space, read from a .mhair MDF file

Module
Game
Header
#include "Hair/HairStrands.h"
Namespace
Mowo

Hair "Ponytail" { schema_version: 1 strands_per_guide: 24 // interpolated render strands per guide root_width: 0.004 // ribbon width at the root, world units tip_width: 0.001 clump_radius: 0.012 // spread of a guide's children at the root clumping: 0.35 // how far children pull back to their guide toward the tip Guide { points: [vec3(0, 1.7, 0), vec3(0, 1.65, -0.02), ...] }

Every guide is resampled to kPointsPerStrand points evenly along its length on load, so the simulation and the GPU ribbon expansion work on one fixed layout. BuildChildren then scatters the render strands: each child sits at a jittered root around its guide and follows the inverse-distance blend of the three nearest guides' shapes, pulled toward its own guide by Clumping.

Properties

TypeNameDescription
static constexpr uint32_tkSchemaVersionDefault 1.
static constexpr uint32_tkPointsPerStrandDefault 16.
std::stringName
uint32_tStrandsPerGuideDefault 16.
floatRootWidthDefault 0.003f.
floatTipWidthDefault 0.001f.
floatClumpRadiusDefault 0.01f.
floatClumpingDefault 0.3f.
std::vector<FGuide>Guides
std::vector<FChild>Children

Public functions

ReturnsNameDescription
Ref<FHairAsset>LoadFromString
Ref<FHairAsset>Load
std::stringSaveToString
boolSaveToFile
boolAddGuideAdds a guide from any polyline of at least two points (resampled).
std::vector<Vec3>ResampleEvenly spaced by arc length, root and tip kept exactly.
voidBuildChildren
uint32_tGetStrandCount

Function details

LoadFromString

C++
static Ref<FHairAsset> LoadFromString(const std::string& mdfText, std::string* error)

Load

C++
static Ref<FHairAsset> Load(const std::string& vfsPath, std::string* error)

SaveToString

C++
std::string SaveToString() const

SaveToFile

C++
bool SaveToFile(const std::string& nativePath) const

AddGuide

C++
bool AddGuide(const std::vector<Vec3>& curve)

Adds a guide from any polyline of at least two points (resampled).

Resample

C++
static std::vector<Vec3> Resample(const std::vector<Vec3>& curve, uint32_t count)

Evenly spaced by arc length, root and tip kept exactly.

BuildChildren

C++
void BuildChildren(uint32_t strandsPerGuide, uint32_t seed = 0x5EEDu)

GetStrandCount

C++
uint32_t GetStrandCount() const
Generated from Hair/HairStrands.h via game.json · Nov 5, 2026Version 1.0.0