Log inGet started

Avatars: making, changing, wearing and fixing a character

Updated December 1, 2026

The avatar toolbox does all of it. zero avatar in the shell lists its tools, and zero avatar <tool> --help (or describe_tool { tool: "avatar.<tool>" }) gives each one's arguments. The tools write the same data the avatar asset type, the avatarAppearance module and the avatarAnimator module read, so topics/avatars and those modules' READMEs are the reference for every field.

Make one

// tool_exec: the world owns each avatar it creates
await zero.avatar.list()                                 // what to start from, and what is worn now
await zero.avatar.create("knight", { body: "my_knight_character" })   // wearing another body
await zero.avatar.create("mira", { template: "feminine" })            // a template body

Template bodies

Five template bodies stand on the standard skeleton: neutral, masculine, feminine, stylised (a big head, big hands and feet) and chibi (two and a half heads tall). Each has a face carrying every VRM expression preset as blend shapes (the visemes aa ih ou ee oh, the blinks, the looks, and happy angry sad relaxed surprised), so its Face page shows each emotion, it blinks, and its mouth follows the person's voice. Each walks, runs and sprints in a gait of its own (neutral and feminine sets, the library's own for masculine), and carries eight starter emotes on its Emotes page: wave, cheer, clap, point, dance, sit, laugh and thumbs up, which avatar.create's answer lists under emotes, each with the line that plays it. Every template is the same mesh laid over other proportions, so the five share one UV layout and one vertex order: an image painted on one body's UVs covers the same place on every other, and a garment fits each the way it fits any body. asset.create("avatar", name, { template = "chibi" }) is the same start from a script, and modules.avatarTemplates builds the bodies, clips and presets: the first avatar made from a template writes them into the world under /source/avatarTemplates/, where every later one shares them.

An avatar that looks like a description

When the person describes the character ("a friendly robot", "a fox chibi in a red scarf", "a tall knight in blue armour"), avatar.generate makes it: a whole character is generated from the words, textured and rigged, standing in a T-pose at the height asked for, and once it lands it becomes an avatar of the type its skeleton qualifies as and is checked against the avatar standard.

await zero.avatar.generate("knight", "a tall knight in blue armour", { height: 1.9 })
// -> { status: "generating", run, body, ... } at once; the body takes a few minutes
await zero.avatar.generate("knight")
// -> { status: "generating", progress } while it runs, then
//    { status: "ready", avatar, type, mapping, valid, facesOnly, problems }
await zero.avatar.wear("knight")

avatar.create("knight", { description: "a tall knight in blue armour", height: 1.9 }) is the same generation, started from create.

The services toolbox's "generation finished" notice says when the body landed; the avatar is made of it without another call, and avatar.generate(name) reads it. Like any avatar it then takes parts, colours, a shape, items and emotes with the tools below (avatar.shape({ height }) makes it taller, avatar.dress("hat", ...) or avatar.attach gives it a hat). A generated body has no face blend shapes, so valid is false with facesOnly true: everything a game needs besides a face holds. Generating draws credits (services.balance).

A rigged character body, a .bundle with a skinned mesh, becomes an avatar with avatar.promote(bundle): its skeleton is asked which avatar type it is (the builtin type is humanoid), and a body no type takes is refused with each type's reason.

Choose a ready-made one

The platform offers a set of good-looking default avatars (anime, stylised, creatures, a robot, low-poly), each published in a public world, with its author and licence: avatar.list names them under defaults, and modules.defaultAvatars holds the set. A person browses them on the app menu's Outfits tab, where Try on puts one on them now and Choose keeps it on their account; a person whose account keeps no look wears defaultAvatars.default() in place of the library's humanoid, and a world that set its own avatar_default_play keeps that body for them.

const { defaults } = await zero.avatar.list()             // { id, name, avatar, style, picture, author, licence }
await zero.avatar.preview(defaults[1].avatar)           // a picture of it before anyone wears it
await zero.avatar.wear(defaults[1].avatar)              // wear one by its guid, in any world

Bring one: a VRM

A VRM avatar (.vrm, VRM 1.0 or 0.x, the format VRoid Studio and most VTuber tools export) written into the world imports as an avatar beside its bundle, <name>.avatar, ready to wear:

// a person dropped `me.vrm` into /source/avatars: the import leaves me.bundle and me.avatar
await zero.avatar.wear("me")                           // wear it
await zero.avatar.validate("me")                       // the standard: bones, points, face, height

It keeps what its author made: the author's humanoid bone map (laid over the detected mapping as roles set by hand), every expression with the shapes it binds and its override rules, a face that blinks, shows the emotions the person picks from the Expressions menu and shapes its mouth to the person's voice, hair and cloth that swing on spring bones and stop at the body's colliders, its node constraints, MToon toon shading with its outline, the eye height it states, and its licence. asset.resolve("me", "avatar"):licence() reads the licence (name, authors, licence URL, who may perform as it, redistribution, modification, commercial use); wear and save refuse an avatar its licence keeps to its author unless the person states they hold it ({ licensed: true }), and :permits("redistribute") answers whether its files may be shared. modules.vrm is the reference for what is read.

Change it: parts, toggles, emotes

Parts are meshes seated on the body's attachment points (hat, hair, faceFront, bodyBack, waistBack, leftGrip, rightGrip, ... 19 in all), carried by the bone under them as the body moves, on every player's screen. A part is placed in its point's frame: +Y up, +Z the way the body faces, +X its left, in metres.

await zero.avatar.attach("robot_buddy", { name: "Antenna", mesh: "@builtin::meshes.cylinder",
    point: "hat", position: [0, 0.08, 0], scale: [0.02, 0.15, 0.02], color: "#ffcc00" })
await zero.avatar.attach("robot_buddy", { name: "Ear_L", mesh: "@builtin::meshes.cone",
    point: "hat", position: [0.08, -0.04, 0], rotation: [0, 0, 30], scale: 0.08 })
await zero.avatar.toggle("robot_buddy", "Antenna")      // a switch in the person's Expressions menu
await zero.avatar.emote("robot_buddy", "Wave", { length: 1.2, keys: [
    { t: 0,   bones: { rightUpperArm: { rotation: [0, 0, -150] } } },
    { t: 0.6, bones: { rightUpperArm: { rotation: [0, 0, -120] } } } ] })

Attaching a part of the same name again replaces it, which is how a part is moved, resized or recoloured; avatar.detach takes it off. An emote is a clip the world holds (its identity) or a pose or keyframes as data, whose bones may be named by humanoid role or VRM bone name (rightUpperArm, head, hips); the tool writes them as this body's own bones. The person plays it from the Emotes page of the Expressions tab in the app menu, and a script on the avatar's owner plays it with the play line avatar.emote answers (AvatarAnimator:set("Emote_Play", n), and 0 ends it); avatar.create lists an avatar's emotes the same way, under emotes. avatar.preview pictures the rest pose, so an emote is seen by playing it in play and capturing it. A bone turns on top of the locomotion moving it, so check a pose with avatar.preview and by playing it.

A motion no clip holds yet is generated from words: avatar.emote(avatar, "Wave", { description: "a cheerful wave with the right hand" }) asks anim_gen for a clip that loops and plays in place, answers status: "generating" at once, and makes the emote of the clip once it lands, in a minute or two; asking again with the same name and description answers status: "ready" with the clip and its seam (how closely its last pose meets its first). A clip that loops plays round for as long as its emote is held. Any clip is made to loop or to stay over one spot with asset.resolve(clip, "animation"):shape({ loop: true, inPlace: true }).

Wear it and dress it

await zero.avatar.wear("robot_buddy")                   // the player's body, or a stand in the scene in edit mode
await zero.avatar.colour({ body: "#4da6ff", Antenna: "#ff3300" })   // body regions, and the avatar's own parts by name
await zero.avatar.surface({                              // what each region, part or worn slot is made of
    jacket: { material: "leather", pattern: "camouflage", pattern_colour: "#2f3b1c" },
    hat: { material: "metal", finish: { roughness: 0.2 } },
    body: { decal: "/source/textures/logo.texture", decal_place: { height: 0.72, size: 0.15 } },
})
await zero.avatar.shape({ height: 1.9, legs: 1.2, head: 0.9 })   // height in metres; width, legs, arms, torso, head, shoulders, hips are factors
await zero.avatar.dress("face", "@builtin::meshes.cube", { adjust: { z: 0.08, sx: 0.2, sy: 0.06, sz: 0.03 } })
const tee = await zero.avatar.garment("tshirt", { covers: ["torso", "arms"], reach: { arms: 0.35 }, colour: "#f2f2ee" })   // short sleeves
const jacket = await zero.avatar.garment("jacket", { covers: ["torso", "arms"], offset: 0.04, open: 0.14, colour: "#3b4a2a" })  // worn open
await zero.avatar.dress(tee.slot, tee.item)                                             // "torsoInner"
await zero.avatar.dress(jacket.slot, jacket.item)                                       // "torsoOuter", laid over the t-shirt
await zero.avatar.preview()                              // a picture of the look, in the preview studio
await zero.avatar.preview(null, { angle: [180, 10] })    // its back

A surface is a material (matte, satin, glossy, plastic, rubber, fabric, velvet, leather, metal, chrome, one the avatar offers by name, or a material asset), finish values (roughness, metalness, clearcoat, sheen, emission), a pattern worked out on the surface itself (stripes, checks, dots, camouflage, spots, tabby) or an image wrapped around it, and an image placed on it (decal, at decal_place: degrees around from the front, height and size as shares of its height, turn). The pattern and the image are laid in the space of the thing they cover, so they move with it. Surfaces are part of the look: every peer composes them, and a look holds at most four distinct images.

wear keeps the look already worn (colours, surfaces, shape, worn items) when it swaps avatars. With nobody playing, it stands the avatar in the scene as the "Avatar stand", which capture frames like any entity. Worn items (dress) are part of the look and come and go with it; parts (attach) are the avatar's own and every wearer of the avatar has them.

Clothing is a garment: a mesh skinned to a humanoid skeleton, authored once on the standard body (avatar.garment cuts one from it and smooths it into cloth: reach sets how far down the arms and legs it goes, a t-shirt's short sleeves or shorts, open leaves the front open, offset how loose it stands, colour its colour; made again under the same name it replaces the garment, and dressing it again fits the new one; a garment modelled and rigged on the humanoid in a modelling program is one too). Dressed in a clothing slot (torsoInner, torsoOuter, legs, feet, hands), it is fitted to whatever body the avatar has (taller, broader, a rig with other bone names), moves with it, lies over the clothing in the slots under it (a jacket in torsoOuter over a shirt in torsoInner), and the body under it is not drawn. At an outer garment's edges (a sleeve hem, the edges of an open front, under the arm) the garment under it can still show through: look at the preview from the front and turned, and a larger offset on the outer garment stands it farther off what it covers.

Keep it on the person's account

await zero.avatar.save("Friendly robot")                 // an outfit on their account, worn from now on

The person's Outfits tab (app menu) comes up showing this look while the engine asks them in its own dialog, which names the account it changes, and the call waits for their answer. When they decline, the tab stays with this look and its name for them to save it themselves; the result says so (handedToPerson). On an agent account's own sign-in avatar.save asks nobody and never changes how its person looks, so an agent gives itself an avatar with avatar.wear, which every peer in the world sees, then avatar.save. When ZeroMind refuses that save the result names the agent account (agentAccount), and the agent wears the look for the session. To change the look of the person it acts for, an agent account saves with forPerson:

await zero.avatar.save("Vita", { forPerson: true, waitSeconds: 60 })  // a request to the person

The request waits for the person, who approves it on their own Outfits tab (or lets the agent change their look without asking, after which it applies at once); the result's state and note say which. Each change an agent makes is listed on the person's Outfits tab as the agent's, and they can undo it. A worn item or avatar travels to other worlds by its reference, so one meant to follow the person is a built-in asset or a published one every world resolves.

The body every player of one world joins with is that world's player setup: stand the avatar in the scene (asset.resolve("robot_buddy", "avatar"):instantiate(nil, { name = "Hero" })) and hand that entity to scene.player("spawns", { body = "Hero" }).

Check it

avatar.validate(avatar) holds the body to the humanoid avatar standard (a humanoid skeleton, the required bones, the attachment points, face expressions, a height between 0.5 and 3 m) and checks its parts, parameters, animator and menu with what they cost per frame. A body with no face blend shapes breaks the expression rule; a game that needs no faces names the rules it holds bodies to: { rules: ["type", "bone", "point", "height"] }.

Fix how a body moves: its mapping

Every clip the engine plays reaches a body through its skeleton's mapping onto its avatar type: which bone is the hips, the left forearm, the right hand. Detection finds it from the skeleton's shape whatever the bones are called, and the author can set a role by hand when it is wrong.

  • avatar.inspect(target) lists every role with its bone, whether it was detected or set by hand, and the confidence of its chain, beside the report: missing chains, ambiguities, names that disagree with the shape, hand-set roles naming bones the rig lacks. With { scores: true } it bakes idle, walk and run onto the body and states the foot slide and joint angles.
  • avatar.map(target, "leftforearm", "mixamorig:LeftForeArm") sets a role by hand (false leaves it empty); avatar.unmap(target, role) gives it back to detection. The override is kept on the rig and survives the character being imported again. The result states what changed.
  • avatar.detect(target) asks every avatar type the world sees afresh and lists where detection and the mapping in force differ.
  • animation.observe states each body's clip as pending, failed, partial or full, and names avatar.inspect when a body stands still or is reached only in part because of its mapping.

A world defines a kind of body of its own (a quadruped, a bird) as an avatarType asset: a module returning { name, vocabulary, qualify(structure) } (man types/avatarType). Its avatars get the same tools; avatar.promote(bundle, { type: "my_quadruped" }) makes one.

The Inspector shows all of this for a selected avatar, body bundle or rig: its parts, parameters and expression menu, what the standard reads from the body, and a Mapping section with the roles, the report, a role and bone picker, and Detect again, Clear the roles set by hand, Make an avatar and Measure.

  • documentation
  • guide
  • avatar
  • character
  • outfit
  • emote