Skip to content

dh.avatar

Extension: .dh-avatarType ID: dh.avatar

An avatar is the top-level definition for a wearable character. It extends dh.object — meaning it has a patches list — and adds avatar-specific properties.

PropertyTypeRequiredDescription
$type"dh.avatar"noType identifier
namestringnoDisplay name
descriptionstringnoDescription
inheritsstringnoBarcode of the avatar to inherit from
propertiesobjectnoKey-value pairs of float properties (e.g. mass, height)
patchesarraynoList of patches to apply (see below)

The type is inferred from the file extension — $type is not needed in source files. The compiler adds it automatically during builds.

avatar.dh-avatar
{
"name": "Custom Mayu",
"inherits": "tech.azuki.mayu:avatar.dh-avatar",
"properties": {
"height": 1.42
},
"patches": [
{
"$type": "dh.import-model",
"path": "models/body.glb"
},
{
"$type": "dh.set-rig",
"target": "Armature",
"path": "rigs/humanoid.dh-rig"
},
{
"$type": "dh.set-material",
"target": "Body",
"slot": 0,
"path": "materials/skin.dh-mat"
},
{
"$type": "dh.import-object",
"path": "accessories/glasses/glasses.dh-obj",
"parent": "Head"
}
]
}

Patches are the building blocks of avatars and objects. Each patch applies a specific operation — importing a model, setting a material, linking an armature, etc.

Here’s a quick overview. For full details, property tables, and examples for each patch, see dh.object — Patch Reference.

Patch TypeWhat it does
dh.import-modelImport a 3D model (GLB/FBX)
dh.import-objectImport another dh.object definition
dh.remove-objectRemove an object from the hierarchy
dh.set-materialAssign a material to a mesh slot
dh.set-blendshapeSet a blendshape/morph target value
dh.set-transformSet position, rotation, or scale
dh.set-parentReparent an object
dh.set-rigApply a rig definition to an armature
dh.armature-linkLink armatures for bone-to-bone matching or attachment

dh.avatar extends dh.object. The only difference is the properties dictionary for avatar-level metadata. Everything about patches, hierarchy, and inheritance works identically.

Think of it this way: an object is a reusable building block (an accessory, outfit piece). An avatar is the root-level thing that represents a complete character.