Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit5597fb7c06

README.md

avatarTemplates

The template bodies an avatar starts from, each on the VRM 1.0 humanoid skeleton:

TemplateBody
neutralan adult of average build, between the masculine and the feminine
masculinebroad shoulders and narrow hips
femininenarrower shoulders, a defined waist and wider hips
styliseda cartoon body with a big head, big hands and big feet
chibitwo and a half heads tall, with a round head and big eyes

asset.create("avatar", name, { template = "feminine" }) (or avatar.create(name, { template = "feminine" })) makes an avatar of one. It wears the template's body, moves with a locomotion set in the template's gait, shows the standard face (a Face page of emotions, blinking, the mouth following the owner's voice) and carries the starter emotes on its Emotes page: wave, cheer, clap, point, dance, sit, laugh and thumbs up.

  • One topology. Every template is the same mesh laid over other proportions (body.build), so the five share one vertex order, one set of triangles and one UV layout (body.tiles): an image painted on one body's UVs covers the same place on every other, and a garment fitted to one body fits each of them.
  • The face. Four meshes beside the body (eyes, irises, brows, mouth) carry the VRM expression presets as blend shapes (body.shapes): the visemes aa ih ou ee oh, blink blinkLeft blinkRight, lookUp lookDown lookLeft lookRight and happy angry sad relaxed surprised. Each is a colour region of the avatar.
  • The skeleton. Every bone's rest rotation is the identity, the body stands in a T-pose facing +Z, and a headTop leaf under the head marks the crown (the body's height and its hat point).
  • Motion. motion.locomotion(style, hips) makes idle, walk, run and sprint in four directions, jump, fall and land in a gait style (neutral, feminine; masculine moves with the library's own synty preset), and motion.emote(name, hips) makes a starter emote. Every clip is made on the neutral template's skeleton and retargets onto any humanoid body.

The first avatar a world makes from a template builds what it needs from code and writes it under /source/avatarTemplates/: the body bundle (<name>.bundle: its rig and five meshes), the locomotion clips and preset (motion/) and the emote clips (emotes/). Every later avatar of that template in the world wears the same body. Everything is made from code and carries the CC0 licence.

FunctionAnswers
names()the template names, in order
get(name)the template: { name, about, style, skin, proportions }
bundle(name)the template's body bundle in this world
locomotion(style)the locomotion preset of a gait style in this world
emotes()the starter emote clips in this world
parts(name)everything an avatar of the template is made of