# People attribution

The soldier and the teacher (`soldier.glb`, `teacher.glb`) and everyone's
motion (`*-motion.bin`) are made from characters and animations from
**Mixamo** by **Adobe**, used under Adobe's Mixamo terms: royalty-free in the
game, but the downloaded files themselves are not handed on, so they stay
out of this repository. Adobe does not endorse the game. The militia
officer and the man in a suit (`militia.glb`, `suit.glb`) are made from
Microsoft's Rocketbox avatars, under the MIT licence (below).

## Characters

[Mixamo](https://www.mixamo.com)'s own characters, made with Adobe Fuse, each
downloaded in its T-pose as FBX with skin:

| Person | Body | Clothes from |
| --- | --- | --- |
| Chinese soldier | Leonard | Leonard (trousers, shoes), Steve (tunic and its buttons) |
| Teacher | Roth | Roth (jacket as a blouse, trousers as tights, shoes), Martha (jacket) |

Changes (`scripts/build-people.py`): garments are moved from one character
to another by the skeleton; skin and cloth hidden under other layers are cut
away; bodies are reshaped (belly, waist, hips, chest) through their skin
weights and scaled to each person's height; garments are recoloured, the
trousers of the soldier and the teacher made into new cloth, the shirt front
painted into Martha's jacket removed, the official's hair greyed;
everything but the hair is baked into one new texture set, re-encoded as
WebP; the soldier's hair is trimmed under his cap. The soldier's
cap, star, collar tabs and belt, the officer's peaked cap, cockade, shoulder
boards and trouser piping, and the teacher's skirt and glasses are the
project's own work. The soldier's slung rifle is the game's AKS
(`../weapons/LICENSE.md`).

## The officer and the man in a suit

`militia.glb` and `suit.glb` are made from the **Microsoft Rocketbox Avatar
Library** ([github.com/microsoft/Microsoft-Rocketbox](https://github.com/microsoft/Microsoft-Rocketbox)),
released under the MIT licence: the officer from `Professions/Pilot_Male_02`
(an airline captain), the man in a suit from `Professions/Business_Male_03`.

Changes (`scripts/build-people.py`, `load_rocketbox`, `militia`, `suit`):
each is set in a T-pose and rigged again on Mixamo's skeleton (its Biped
weights moved onto Mixamo's joints, the face's into the head); its clothes
are recoloured: the captain's uniform into the militsiya's (grey-blue
tunic and cap crown, red band, dark blue trousers, light blue shirt), the
businessman's suit brown with a red-brown tie, his hair greyed; the
captain's cuff rings are painted out and his wings, cap badge and name tag
taken off; everything but the hair is baked into one new texture set,
re-encoded as WebP. The officer's cockade, shoulder boards and trouser
piping are the project's own work.

```
MIT License

Copyright (c) 2020 Microsoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

## What they turn into

`*-changed.glb` are the same people, their heads cut into four petals
lined with raw flesh, with the head of Mixamo's **Parasite L Starkie**
character (Adobe, under the same Mixamo terms as above: its great toothed
maw and white eyes, cut from its body, shrunk and set on their neck) and
three tendrils inside, baked into each person's texture
(`scripts/build-people.py`, `bloom`). The petals' cuts, the flesh, the
tendrils and their joints are the project's own work.

## Animations

On Mixamo's X Bot character: Standing Idle, Neutral Idle, Female Walk,
Running, Standard Run, Looking Around, Bored, Old Man Idle, Terrified,
Waving, Salute,
Talking, Talking (a question), Shaking Head No, Hit Reaction, Dying Backwards,
Falling Forward Death, Standing React Small and Large From Front, Back, Left
and Right, Standing React Death Forward, Backward, Left and Right, Fall Flat,
Ducking and Injured Run; from the Locomotion Pack its walk. Turned
(`*-monster-motion.bin`): Zombie Upright Twitching Idle, Low Crawl,
Running Crawl, Mutant Roaring, Zombie Scream, Mutant Swiping, Zombie Swipe
Attack, Mutant Jump Attack, Zombie Reaction Hit, Mutant Dying and Zombie
Dying.

Changes (`scripts/build-people-motion.ts`): each animation is retargeted onto
each person's skeleton; the cycles loop in place (their ground speed kept)
and stand on their feet; long takes are cut where their pose returns closest
to their start; still joints keep one key; an arm whose forearm or hand
goes into the body is turned out from the shoulder until it clears it.

## Rebuilding

Sign in at mixamo.com and download the characters above in their T-pose
(the "T-Pose" animation, FBX Binary, with skin) into
`node_modules/.cache/people/mixamo` as `<Name> T-Pose.fbx`, and the
animations on X Bot (FBX Binary, 30 frames a second, without skin, no
keyframe reduction, not in place; the pack with the pose "No Character")
into `node_modules/.cache/people/clips` under the names in
`scripts/build-people-motion.ts`. Then, with Blender 4.5:

```bash
blender -b --python scripts/build-people.py
bun scripts/build-people-motion.ts
```

See `docs/people.md`.
