midiviz

#032 Pianist

Notes on the character, clothes and hair in 032_pianist.html (Visuals → Pianist).

The character

She is built from MakeHuman’s CC0 assets by build/build-character.mjs. No ready-made character file is used.

Output: assets/character.json (bones, joints, part layout) + assets/character.bin (~2 MB) and re-encoded textures. Units are cm, y up, the figure facing +z with her feet on y = 0. Licence: MakeHuman, CC0 1.0. Community assets have their own licences, listed in assets/community/CREDITS.md.

Rebuilding the character

The MakeHuman sources are not in the repo (the system pack alone is ~280 MB). Put them in one folder, ~/test/mh-assets by default:

mh-assets/
  base/     base.obj, default.mhskel, default_weights.mhw and the three .target files
  sys/      makehuman_system_assets_cc0.zip, unpacked
  community/<nid>/   optional, see Community assets below

Where to get them (all CC0):

Then run:

node pianist/build/build-character.mjs [path/to/mh-assets]   # needs ffmpeg on PATH for the textures

To change her build, edit TARGETS and HEIGHT at the top of the script. Any other MakeHuman macro target works the same way.

Other models (?model=)

Visuals → Model, or ?model=vrm / ?model=vroida / ?model=quaternius. alt-model.js loads any rigged glTF or VRM humanoid. It builds a proxy skeleton with MakeHuman’s bone names on the model’s own joints (scaled so legs and arms match the MakeHuman woman, turned to face the keys). rig.js poses the proxy unchanged, and every frame each model bone takes its proxy bone’s world rotation times a fixed rest offset. VRM bones come from the VRM humanoid; plain glTF bones are matched by name (Mixamo, Blender .L/.R, Quaternius, UE styles). These models keep their own clothes and hair, so the wardrobe menus are hidden.

Wardrobe and hair

Outfits

?outfit= or the Outfit menu sets the dress, fabric, colour, shoes and hair at once. The circled numbers along the top of the page pick eight featured ones in one click (hover for a preview and the name; the rest stay in the menu). The previews are side-view renders (?shot&view=side&outfit=<key> at 900×900, cropped to the pianist) saved as assets/presets/<key>.webp; a preset without one just shows its name as a tooltip, and so do the keys 1–9 and 0 (the first ten): reference (the red knit halter), sequin-mini / sequin-gown (sequins, stiletto booties, long dark hair; old yuja-* links still load), covered (long sleeves), tee (T-shirt and skirt, long dark hair).

Dresses

Shoes

?shoes= takes flats (ours), none (barefoot), c1694 (stiletto booties), c1822 (pumps) or c1039 (peep-toe pumps). The community pumps are fitted to a flat foot, so they read as flats until the rig arches the foot.

Hair as cloth

hair-cloth.js simulates any mesh hairstyle (MakeHuman’s own and the community’s) as one piece of fabric rather than as strands:

It costs ~7 ms a frame in headless Chrome (software rendering) for the long styles. It is on with “Hair simulation”; ?hairsim=0 turns it off.

Community assets

node pianist/build/fetch-community.mjs /path/to/assets.json <nid>…   # → ~/test/mh-assets/community/<nid>/
node pianist/build/build-character.mjs

assets.json is the MakeHuman community catalogue. It has been offline since MakeHuman’s community services shut down. Use the asset packs with pianist/build/import-packs.mjs instead (see wardrobe/README.md). Only CC0 and CC-BY assets are fetched, and credits are written to assets/community/CREDITS.md.

Each asset gets its own assets/community/<key>.bin plus WebP / JPEG textures, fetched only when chosen. character.bin stays ~2 MB.

Render, hall and post-processing (from #030)

Defaults (light, for phones)

A plain link opens on a dimmed start screen with one Play button (and the song it will play; ?start=0 skips it), behind her (?view=back) in preset 1 with the cel-shaded look, the Full Grand Piano soundfont, no room reverb and no applause (Hall → Room), and no depth of field, bloom, grain or dust (Visuals → Post-processing). Phones and tablets (a coarse pointer) take the ?q=low path unless ?q=high: pixel ratio 1, smaller shadows, no MSAA or fallboard mirror, and with nothing to post-process the scene is drawn straight to the screen. On a screen taller than 16:10 the lens widens so the shots keep their width, and the pills go icon-only. Double-tap (or double-click) the picture for the next camera in the menu.

Phones and the app

Camera and the director

director.js frames shots on a live subject (hands, head, figure, piano, feet) in spherical coordinates and gives each one a slow move: orbit, zoom in/out, push in, pull out, crane, or a still frame with a handheld breath. Shots end in a cut or a glide into the next spot (glides only between spots on the same side and of similar size, so the camera never flies through the piano).

YouTube Shorts

Render → Format → YouTube Short (9:16) turns the export into a Short: 1080×1920 (540×960 and 720×1280 to preview), a clip of the piece of up to 3 minutes (YouTube’s limit for a Short), its own camera plan, and the text kept clear of YouTube’s buttons. The working repertoire, licensing ledger, visual plans and running candidate pool are in shorts/README.md.

Sharing a scene

Every option is in the address bar as a short query key, written only when it differs from the default (or from the chosen outfit), so reloading or copying the address brings the same scene back. The address is not rewritten while a song plays (it would get in the way of typing or copying in the address bar); it catches up on pause, and a dragged camera is written once the drag settles. Share copies the link with the song position (&at=); a shared song starts there on the first click (browsers need a click before sound).

Key Control Key Control
outfit Outfit gaze expr hips posture reach rock sway nod glances Pose and playing style
dress slit fabric dcol Dress, gown slits, fabric, colour (hex without #) bench benchh Bench distance / height
shoes Shoes light exposure dof Visuals
hair hcol density Hair style, colour, strands view cam Camera view; a dragged camera as x,y,z,tx,ty,tz
hairon hairsim dresson clothsim Checkboxes (1 / 0) move pace favour trans shotnames Moves and the director
look smooth Look, subdivision song at speed loop sf avsync Song, position, transport, sound