avatarTemplates.module
- README.md2.9 KB
- body.module
- init.luau17.8 KB
- motion.module
This package holds more than this page lists. See all of its files in its world.
README.md
avatarTemplates
The template bodies an avatar starts from, each on the VRM 1.0 humanoid skeleton:
| Template | Body |
|---|---|
neutral | an adult of average build, between the masculine and the feminine |
masculine | broad shoulders and narrow hips |
feminine | narrower shoulders, a defined waist and wider hips |
stylised | a cartoon body with a big head, big hands and big feet |
chibi | two 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 visemesaa ih ou ee oh,blink blinkLeft blinkRight,lookUp lookDown lookLeft lookRightandhappy 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
headTopleaf 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;masculinemoves with the library's ownsyntypreset), andmotion.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.
| Function | Answers |
|---|---|
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 |