[PR #7580] [MERGED] fix(avatars): real-file imports, empty VRM expressions and "Make your own model" #7810

Closed
opened 2026-10-24 04:07:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7580
Author: @SpicyMarinara
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/avatars-real-imports


📝 Commits (7)

  • 60b63a0 fix(avatars): leave empty VRM expressions unset instead of "Set by the model"
  • e265a27 docs(avatars): add "Make your own model" and point to the in-app paths
  • 6cdee61 fix(avatars): point out empty VRM faces that would have taken a slot
  • 2c3ac74 docs(avatars): say how Blender before 4.2 installs the VRM add-on
  • 15038be docs(avatars): match the guide to what the import does with empty faces
  • eb4fcbc docs(avatars): say the agents are offered on staging
  • 10a30db Merge remote-tracking branch 'origin/staging' into HEAD

📊 Changes

3 files changed (+265 additions, -44 deletions)

View changed files

📝 docs/agents/avatars.md (+60 -4)
📝 packages/server/src/services/avatars/formats/vrm.ts (+53 -10)
📝 scripts/regressions/avatar-vrm.regression.ts (+152 -30)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Refs #7537 (lane: everything via ME, real-file imports and "Make your own model"). The branch starts at 1cd98bc16, the #7554 merge on staging, after #7555 and #7554 both merged. The fix and guide were written before that: the first commit landed 44 seconds after #7554 merged. Every check below ran on this base. Guide translation follow-up: #7540, whose body now lists the new section (item 4).

Why this change

  • Mari's rule for the avatar agents is that everything happens in Marinara Engine. Users install through Download Agents, set up and import in the Agent editor, and the mood reader downloads by itself. Until now the importers had only been tested with synthetic files. Nobody knew whether real VRoid, Blender, Mesh Avatar Studio and PNGTuber Plus files import, get their faces mapped and render.
  • Importing real files turned up one bug. A VRM whose expressions exist but bind nothing showed "Set by the model" on every face it had, yet the avatar never changed face, moved its mouth or blinked. The VRM Add-on for Blender writes every VRM 0.x preset empty when it exports a VRM 1.0 model as 0.x, and UniVRM writes empty preset clips too.
  • The guide said nothing about making your own model, or about naming expressions so they are found.

What changed

  • VRM importer (formats/vrm.ts):

    • An expression is now treated as empty when it binds no morph target, material colour or texture transform (VRM 1.0), or no bind or material value (VRM 0.x).
    • An empty expression is never bound automatically. The resting face (Neutral) is the exception, because it is the model at rest. A custom face that does move, such as Smile, takes the slot instead.
    • When an empty expression would otherwise have filled a slot, the import says "Some of this model's expressions are empty and change nothing, so they weren't used." Empty look-at or spare expressions that no slot uses are not reported.
    • Empty expressions can still be picked by hand.
  • Regression (avatar-vrm.regression.ts): the fixtures now give a bind to every expression they expect to be bound, as real models have. The bind is an inert material bind, so the stage's three-vrm loader test stays quiet. New checks cover:

    • Blender-style empty VRM 0.x groups.
    • An empty preset giving way to a custom face that moves.
    • An empty custom face.
    • VRM 1.0 override-only and texture-transform expressions.
    • Warning only for slot-relevant empties.

    The new checks fail on the old importer: an empty mouth shape is not bound gets { target: 'aa', source: 'preset' }.

  • Guide (docs/agents/avatars.md):

    • New Make your own model section with these paths, each ending with the import in the Agent editor:
      • your own sprites on the Sprites tab, then Use my sprites;
      • PNGTuber Plus, then Import PNGTuber Plus save;
      • Mesh Avatar Studio, then Import .mavatar file;
      • VRoid Studio, then Import VRM;
      • Blender with the VRM Add-on for Blender, then Import VRM and Add animation.
    • The section explains how to name expressions so they are found. It covers VRM presets and their VRM 0.x names, visemes, blink, sprite _talk and _blink, PNGTuber Plus costume picture names and Mesh Avatar Studio's drawn variants.
    • It also lists what to avoid when exporting: Draco, meshopt, KTX2, plain glTF, external files and PNGTuber Plus extras.
    • Mesh avatars now points to making one from a sprite first, 3D avatars says that an empty expression is used only for Neutral and that the import says when it skipped one, and the Plain 3D models bullet links to the Blender steps.
    • The Blender steps say the add-on exports a .vrma only from a model set to VRM 1.0.

Sweep for manual steps (item 1 of the lane)

Swept: every file under packages/*/src/**/avatars/**, the avatar-* routes, docs/agents/avatars.md, the other docs/agents/*.md avatar entries, docs/development/optional-agent-packages.md (1.73 section), the avatar e2e specs and helpers, and the avatars.* keys in en.json.

  • No step asks users to copy files into data folders, run terminal commands, set environment variables, download models, runtimes or samples by hand, or use outside tools to run avatars. Renderers are bundled npm packages, loaded lazily. Imports go through the Agent editor. The upload cap is the server's 256 MB, with no setting to change.
  • The mood reader: the guide (from #7555) says it downloads once, by itself, the first time a Roleplay chat with 2D Avatars or 3D Avatars on opens. The agent's page shows the progress, and it never downloads while both agents are off. Confirmed on staging at 1cd98bc16.
  • Left as last-resort notes, not steps:
    • very old PNGTuber Plus saves must be saved again in PNGTuber Plus, because the file only holds paths on the author's disk;
    • converting a plain glTF needs a 3D tool.

Mentioned rather than changed (existing copy and behaviour, not asked to change):

  • avatars.meshAvatar.description still reads "Make one in Mesh Avatar Studio." Since #7554 the page can also make one from a sprite. Should the copy say so?
  • Import VRM and Replace model offer only .vrm files (VrmSetupPanel.tsx, accept=".vrm"). So the guide's older Plain 3D models bullet, which says the import explains why a .glb or .gltf can't be used, holds only for a file renamed to .vrm or a file dialog that shows all files. A .gltf with separate files gets the general "Choose a .save, .mavatar, .vrm, .vrma file." Should the pickers also offer .glb, or should that bullet say they take .vrm only?
  • Every avatar import notice, including the new one, is English text from the server, because the shared contract carries notices as warnings: string[]. A community UI pack shows them in English. Should import notices get semantic keys? That changes the contract for all eleven notices, so it is not part of this fix.

Real files imported through the Agent editor (local only, nothing committed)

Each file went through the real POST /api/avatar-models/:owner/import route from the setup page's file inputs. Playwright's file chooser ignores the inputs' accept filter, so the plain .glb row below can't be picked that way by a person (see the mention above). That ran on a local dev server on private ports, with a scratch data dir that was deleted afterwards and Playwright Chromium. Every successful import was then rendered in the setup preview and, for one of each kind, on a Roleplay chat stage with the agent on. I read the screenshots for desktop, and for the phone in four cases.

File Source Result
VRM1_Constraint_Twist_Sample.vrm (VRM 1.0) three-vrm repo (MIT; model under the VRM Public License 1.0) Imported; all 12 slots set by the model; renders. With test.vrma from three-vrm, "Idle animation added."
three-vrm-girl.vrm (VRM 0.x, made in VRoid Studio) three-vrm v0.6.11 (VRoid Hub licence allowing use) Imported; 11 by preset, Surprised guessed from the custom name Surprised; renders on the setup preview and the chat stage.
Seed-san.vrm (VRM 1.0) vrm-c/vrm-specification samples (VRM Public License 1.0) Imported; 12/12 by preset; renders on desktop and phone.
Blender: three-vrm-girl as VRM 1.0 / as VRM 0.x / Seed-san as VRM 1.0 Exported headless by Blender 5.2 with the VRM Add-on for Blender 4.7.2 (MIT) in a throwaway user config All imported with 12/12 bound and render.
Blender: Seed-san exported as VRM 0.x same Was the bug. All groups present but empty. Before: 11 of 12 "Set by the model" (VRM 0.x has no surprised preset, so Surprised already showed "Not found in the model"), and nothing moved. Now: Neutral only, plus the two plain notices shown above the faces.
Blender: three-vrm-girl as VRM 1.0 with Draco same, with Draco forced in the add-on's glTF step Refused: "This model is saved with compression avatars can't load (Draco). Export it again with compression turned off."
Blender: plain glTF export (.glb) Blender's own glTF exporter Refused: "This is a plain 3D model, not a VRM. Convert it to VRM first, for example with the VRM add-on for Blender."
sphere.vrm (VRM 0.x, no expressions) three-vrm v0.6.11 (CC0) Imported; every slot "Not found in the model" with the pick-in-setup notice; renders.
Miko sample, packed as Studio's Export .mavatar does (stored ZIP) mesh-avatar-studio (code MIT; art not licensed for reuse, local test only) Imported; drawn mouths and closed eyes found; renders in the preview and the chat stage.
The same, re-zipped deflated with __MACOSX noise local Imported (the Engine repacks it).
The same, zipped as a folder (miko-qipao/avatar.json) local Refused: "This file isn't a mesh avatar." The guide now says to use Export .mavatar instead of zipping the folder.
Mesh avatar made in-app from a Codex-generated bust Make an avatar from a sprite → Mesh avatar. A local stub vision model answered with a layout read off the picture by hand; no paid provider was called. Built in 0.9 s, saved, renders. The stored .mavatar also imports again through Import .mavatar file.
PNGTuber Plus .save built per main_scenes/main.gd from Codex-generated layers (body, eyes open/closed, angry and happy eyes as costumes 2 and 3, mouth closed/open) local, never committed Imported; costume 1 is Neutral, angry eyes.png gives Angry and happy_eyes.png gives Happy; talk and blink pictures found; renders in the preview and the chat stage.
PNGTuber Plus's own default avatar save (Unlicense) already the 2D lane's fixture Imported; renders. No other freely licensed real save was found on GitHub.

VRoid Hub's sample avatars need a VRoid account to download, so I did not test them. three-vrm-girl is a VRoid Studio model under a VRoid Hub licence and stands in for them.

Decisions

  • Neutral keeps an empty preset. Neutral is the model at rest, and most models leave it empty (Seed-san does). Marking it missing would show "Not found" on a working model.
  • Override-only VRM 1.0 expressions count as empty. Local CodeRabbit suggested keeping one such as happy: { overrideBlink: "block" }. I declined: it draws no face, so binding it as Happy brings back the bug, a "Set by the model" face that never changes. It stays pickable by hand, and a regression check covers it.
  • Folder-wrapped .mavatar zips stay refused. Mesh Avatar Studio's own export writes the files at the root. A one-line note in the guide is simpler than teaching the importer to unwrap folders.
  • One new notice, written like the other import notices. "Some of this model's expressions are empty and change nothing, so they weren't used." comes from the server in English and has no en.json key, like every avatar import notice (see the mention above). No client code changed, so there are no e2e changes.
  • Nothing large committed. The real files, the Codex pictures, the Blender add-on and its config all lived in a temp dir that has been deleted. The regression stays synthetic.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Commands run by the agent are listed below as results, not as ticked boxes:

  • pnpm check on 6cdee61a3's code: exit 0. It ran format, localization, impeccable, lint, type checks and the build. The one lint warning is the pre-existing one in HomeProfessorMariChat.tsx. Main entry: 313 kB. The later commit 2c3ac741d changes one docs sentence only.
  • pnpm localization:check: exit 0.
  • node scripts/run-regressions.mjs --filter avatar: 14/14 passed.
  • Guards: --filter agent-activation 2/2, --filter spatial-context 1/1, --filter open-issues 1/1.
  • --filter docs-command-search and --filter docs-language: passed.
  • The new checks fail on the old importer: with vrm.ts reverted, avatar-vrm fails at "an empty mouth shape is not bound".
  • The existing avatar e2e specs (avatar-setup, avatar-2d) on desktop and mobile Chromium, on this branch: 20/20 passed. This PR changes no client code.
  • A temporary Playwright spec drove the real-file table above: 18/18 passed on desktop Chromium, plus 4 cases on mobile Chromium. It was deleted afterwards and is not in this PR.
  • Local CodeRabbit (coderabbit review --agent --committed --base-commit 1cd98bc16):
    • First run, 3 findings: two fixed in 6cdee61a3 (the custom-face notice, the plain glTF wording), one declined (override-only expressions, see Decisions).
    • Second run, 1 finding (Blender before 4.2), fixed in 2c3ac741d.

Review fixes in 15038be87 (docs only), on that commit:

  • pnpm check: exit 0. The one lint warning is the pre-existing one in HomeProfessorMariChat.tsx.
  • pnpm localization:check: exit 0.
  • node scripts/run-regressions.mjs --filter avatar: 14/14 passed. Guards: agent-activation 2/2, spatial-context 1/1, open-issues 1/1. docs-command-search 1/1, docs-language 1/1.
  • Local CodeRabbit (coderabbit review --agent --committed --base-commit 1cd98bc16), third run: 0 findings.
  • GitHub CodeRabbit's outside-diff note on duplicate VRM 0.x names was declined: three-vrm 3.5.5 keeps the first group of a duplicated name and ignores the later one (VRMExpressionLoaderPlugin._v0Import, "has duplicated entries. Ignoring the expression"), and the importer already judges a duplicated name by its first group.

Manual verification notes

Steps for Mari on staging after merge:

  1. Open Agents → 3D Avatars, choose a character, then Import VRM with a VRoid Studio model. Check that every face, mouth shape and Blink says Set by the model or Guessed from its name, and that Preview → Try a face and Talk move it.
  2. In Blender with the VRM Add-on for Blender, import a VRM 1.0 model, such as a VRoid Studio model exported as VRM 1.0, and export it as VRM 0.x without filling the Blend Shape Proxy. A VRM 0.x model keeps its faces when exported again as 0.x, so it won't show the bug. Import it with Replace model. Expect only Neutral to be set, both notices above Faces and mouth shapes ("Some of this model's expressions are empty…" and "Some faces or mouth shapes have no matching expression…"), and the other faces showing Not found in the model.
  3. Export from Blender's plain glTF 2.0 exporter with compression off, rename the file to .vrm and import it. Expect "This is a plain 3D model, not a VRM…". Export it again with Draco compression on, rename and import: expect "This model is saved with compression avatars can't load (Draco)…" instead, because compression is checked first.
  4. Open docs/agents/avatars.md on GitHub and follow Make your own model. Check that the links to Making an avatar from a sprite, Mesh Avatar Studio, PNGTuber sprites and the Blender steps jump to the right headings.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

Docs note: docs/agents/avatars.md changed, and the existing follow-up issue #7540 lists the new section; no new issue was opened. No CHANGELOG entry.

UI evidence (if applicable)

No screenshot is attached, because the agent can't upload images to a PR. The new notice shows in the setup panel's existing notice list above Faces and mouth shapes, in the same style as "Some faces or mouth shapes have no matching expression…". Manual verification step 2 shows it.

Summary by CodeRabbit

  • Documentation

    • Added guidance for creating custom avatars with supported tools, configuring expressions and animations, and meeting export requirements.
    • Clarified that .mavatar files can be created with Marinara Engine and that both avatar agents are available through Download Agents on staging.
    • Linked plain 3D model guidance to the Blender instructions.
  • Bug Fixes

    • Improved VRM expression mapping: expressions with no effective binds are excluded from non-neutral slots, and import warnings flag empty expressions that would otherwise be mapped. Neutral expressions can still bind to empty entries.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/7580 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/avatars-real-imports` --- ### 📝 Commits (7) - [`60b63a0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/60b63a0c31c689719254c3ba217fd2f72a96924a) fix(avatars): leave empty VRM expressions unset instead of "Set by the model" - [`e265a27`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e265a278f2ae991048fc88a3bd6bd901bf25a3bf) docs(avatars): add "Make your own model" and point to the in-app paths - [`6cdee61`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6cdee61a39550a9da7b75d971043501903e846c6) fix(avatars): point out empty VRM faces that would have taken a slot - [`2c3ac74`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2c3ac741d24f4c6829d90c82aa3d554b366258ca) docs(avatars): say how Blender before 4.2 installs the VRM add-on - [`15038be`](https://github.com/Pasta-Devs/Marinara-Engine/commit/15038be874584a817b608b64ffe64d6b739dd6db) docs(avatars): match the guide to what the import does with empty faces - [`eb4fcbc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/eb4fcbcbb5801c164e3289357da4dfa0c5cd876f) docs(avatars): say the agents are offered on staging - [`10a30db`](https://github.com/Pasta-Devs/Marinara-Engine/commit/10a30dbd8b80f1887f630d772ce1baa679d27a84) Merge remote-tracking branch 'origin/staging' into HEAD ### 📊 Changes **3 files changed** (+265 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `docs/agents/avatars.md` (+60 -4) 📝 `packages/server/src/services/avatars/formats/vrm.ts` (+53 -10) 📝 `scripts/regressions/avatar-vrm.regression.ts` (+152 -30) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue Refs #7537 (lane: everything via ME, real-file imports and "Make your own model"). The branch starts at `1cd98bc16`, the #7554 merge on `staging`, after #7555 and #7554 both merged. The fix and guide were written before that: the first commit landed 44 seconds after #7554 merged. Every check below ran on this base. Guide translation follow-up: #7540, whose body now lists the new section (item 4). ## Why this change - Mari's rule for the avatar agents is that everything happens in Marinara Engine. Users install through **Download Agents**, set up and import in the Agent editor, and the mood reader downloads by itself. Until now the importers had only been tested with synthetic files. Nobody knew whether real VRoid, Blender, Mesh Avatar Studio and PNGTuber Plus files import, get their faces mapped and render. - Importing real files turned up one bug. A VRM whose expressions exist but bind nothing showed "Set by the model" on every face it had, yet the avatar never changed face, moved its mouth or blinked. The VRM Add-on for Blender writes every VRM 0.x preset empty when it exports a VRM 1.0 model as 0.x, and UniVRM writes empty preset clips too. - The guide said nothing about making your own model, or about naming expressions so they are found. ## What changed - **VRM importer** (`formats/vrm.ts`): - An expression is now treated as empty when it binds no morph target, material colour or texture transform (VRM 1.0), or no bind or material value (VRM 0.x). - An empty expression is never bound automatically. The resting face (Neutral) is the exception, because it is the model at rest. A custom face that does move, such as `Smile`, takes the slot instead. - When an empty expression would otherwise have filled a slot, the import says "Some of this model's expressions are empty and change nothing, so they weren't used." Empty look-at or spare expressions that no slot uses are not reported. - Empty expressions can still be picked by hand. - **Regression** (`avatar-vrm.regression.ts`): the fixtures now give a bind to every expression they expect to be bound, as real models have. The bind is an inert material bind, so the stage's three-vrm loader test stays quiet. New checks cover: - Blender-style empty VRM 0.x groups. - An empty preset giving way to a custom face that moves. - An empty custom face. - VRM 1.0 override-only and texture-transform expressions. - Warning only for slot-relevant empties. The new checks fail on the old importer: `an empty mouth shape is not bound` gets `{ target: 'aa', source: 'preset' }`. - **Guide** (`docs/agents/avatars.md`): - New **Make your own model** section with these paths, each ending with the import in the Agent editor: - your own sprites on the Sprites tab, then **Use my sprites**; - PNGTuber Plus, then **Import PNGTuber Plus save**; - Mesh Avatar Studio, then **Import .mavatar file**; - VRoid Studio, then **Import VRM**; - Blender with the VRM Add-on for Blender, then **Import VRM** and **Add animation**. - The section explains how to name expressions so they are found. It covers VRM presets and their VRM 0.x names, visemes, blink, sprite `_talk` and `_blink`, PNGTuber Plus costume picture names and Mesh Avatar Studio's drawn variants. - It also lists what to avoid when exporting: Draco, meshopt, KTX2, plain glTF, external files and PNGTuber Plus extras. - **Mesh avatars** now points to making one from a sprite first, **3D avatars** says that an empty expression is used only for Neutral and that the import says when it skipped one, and the **Plain 3D models** bullet links to the Blender steps. - The Blender steps say the add-on exports a `.vrma` only from a model set to VRM 1.0. ### Sweep for manual steps (item 1 of the lane) Swept: every file under `packages/*/src/**/avatars/**`, the `avatar-*` routes, `docs/agents/avatars.md`, the other `docs/agents/*.md` avatar entries, `docs/development/optional-agent-packages.md` (1.73 section), the avatar e2e specs and helpers, and the `avatars.*` keys in `en.json`. - No step asks users to copy files into data folders, run terminal commands, set environment variables, download models, runtimes or samples by hand, or use outside tools to *run* avatars. Renderers are bundled npm packages, loaded lazily. Imports go through the Agent editor. The upload cap is the server's 256 MB, with no setting to change. - The mood reader: the guide (from #7555) says it downloads once, by itself, the first time a Roleplay chat with 2D Avatars or 3D Avatars on opens. The agent's page shows the progress, and it never downloads while both agents are off. Confirmed on `staging` at `1cd98bc16`. - Left as last-resort notes, not steps: - very old PNGTuber Plus saves must be saved again in PNGTuber Plus, because the file only holds paths on the author's disk; - converting a plain glTF needs a 3D tool. **Mentioned rather than changed (existing copy and behaviour, not asked to change):** - `avatars.meshAvatar.description` still reads "Make one in Mesh Avatar Studio." Since #7554 the page can also make one from a sprite. Should the copy say so? - **Import VRM** and **Replace model** offer only `.vrm` files (`VrmSetupPanel.tsx`, `accept=".vrm"`). So the guide's older **Plain 3D models** bullet, which says the import explains why a `.glb` or `.gltf` can't be used, holds only for a file renamed to `.vrm` or a file dialog that shows all files. A `.gltf` with separate files gets the general "Choose a .save, .mavatar, .vrm, .vrma file." Should the pickers also offer `.glb`, or should that bullet say they take `.vrm` only? - Every avatar import notice, including the new one, is English text from the server, because the shared contract carries notices as `warnings: string[]`. A community UI pack shows them in English. Should import notices get semantic keys? That changes the contract for all eleven notices, so it is not part of this fix. ### Real files imported through the Agent editor (local only, nothing committed) Each file went through the real `POST /api/avatar-models/:owner/import` route from the setup page's file inputs. Playwright's file chooser ignores the inputs' `accept` filter, so the plain `.glb` row below can't be picked that way by a person (see the mention above). That ran on a local dev server on private ports, with a scratch data dir that was deleted afterwards and Playwright Chromium. Every successful import was then rendered in the setup preview and, for one of each kind, on a Roleplay chat stage with the agent on. I read the screenshots for desktop, and for the phone in four cases. | File | Source | Result | | --- | --- | --- | | `VRM1_Constraint_Twist_Sample.vrm` (VRM 1.0) | three-vrm repo (MIT; model under the VRM Public License 1.0) | Imported; all 12 slots set by the model; renders. With `test.vrma` from three-vrm, "Idle animation added." | | `three-vrm-girl.vrm` (VRM 0.x, made in VRoid Studio) | three-vrm v0.6.11 (VRoid Hub licence allowing use) | Imported; 11 by preset, Surprised guessed from the custom name `Surprised`; renders on the setup preview and the chat stage. | | `Seed-san.vrm` (VRM 1.0) | vrm-c/vrm-specification samples (VRM Public License 1.0) | Imported; 12/12 by preset; renders on desktop and phone. | | Blender: three-vrm-girl as VRM 1.0 / as VRM 0.x / Seed-san as VRM 1.0 | Exported headless by Blender 5.2 with the VRM Add-on for Blender 4.7.2 (MIT) in a throwaway user config | All imported with 12/12 bound and render. | | Blender: Seed-san exported as VRM 0.x | same | **Was the bug.** All groups present but empty. Before: 11 of 12 "Set by the model" (VRM 0.x has no surprised preset, so Surprised already showed "Not found in the model"), and nothing moved. Now: Neutral only, plus the two plain notices shown above the faces. | | Blender: three-vrm-girl as VRM 1.0 **with Draco** | same, with Draco forced in the add-on's glTF step | Refused: "This model is saved with compression avatars can't load (Draco). Export it again with compression turned off." | | Blender: plain glTF export (`.glb`) | Blender's own glTF exporter | Refused: "This is a plain 3D model, not a VRM. Convert it to VRM first, for example with the VRM add-on for Blender." | | `sphere.vrm` (VRM 0.x, no expressions) | three-vrm v0.6.11 (CC0) | Imported; every slot "Not found in the model" with the pick-in-setup notice; renders. | | Miko sample, packed as Studio's **Export .mavatar** does (stored ZIP) | mesh-avatar-studio (code MIT; **art not licensed for reuse, local test only**) | Imported; drawn mouths and closed eyes found; renders in the preview and the chat stage. | | The same, re-zipped deflated with `__MACOSX` noise | local | Imported (the Engine repacks it). | | The same, zipped as a folder (`miko-qipao/avatar.json`) | local | Refused: "This file isn't a mesh avatar." The guide now says to use **Export .mavatar** instead of zipping the folder. | | Mesh avatar made in-app from a Codex-generated bust | **Make an avatar from a sprite → Mesh avatar**. A local stub vision model answered with a layout read off the picture by hand; no paid provider was called. | Built in 0.9 s, saved, renders. The stored `.mavatar` also imports again through **Import .mavatar file**. | | PNGTuber Plus `.save` built per `main_scenes/main.gd` from Codex-generated layers (body, eyes open/closed, angry and happy eyes as costumes 2 and 3, mouth closed/open) | local, never committed | Imported; costume 1 is Neutral, `angry eyes.png` gives Angry and `happy_eyes.png` gives Happy; talk and blink pictures found; renders in the preview and the chat stage. | | PNGTuber Plus's own default avatar save (Unlicense) | already the 2D lane's fixture | Imported; renders. No other freely licensed real save was found on GitHub. | VRoid Hub's sample avatars need a VRoid account to download, so I did not test them. `three-vrm-girl` is a VRoid Studio model under a VRoid Hub licence and stands in for them. ### Decisions - **Neutral keeps an empty preset.** Neutral is the model at rest, and most models leave it empty (Seed-san does). Marking it missing would show "Not found" on a working model. - **Override-only VRM 1.0 expressions count as empty.** Local CodeRabbit suggested keeping one such as `happy: { overrideBlink: "block" }`. I declined: it draws no face, so binding it as Happy brings back the bug, a "Set by the model" face that never changes. It stays pickable by hand, and a regression check covers it. - **Folder-wrapped `.mavatar` zips stay refused.** Mesh Avatar Studio's own export writes the files at the root. A one-line note in the guide is simpler than teaching the importer to unwrap folders. - **One new notice, written like the other import notices.** "Some of this model's expressions are empty and change nothing, so they weren't used." comes from the server in English and has no `en.json` key, like every avatar import notice (see the mention above). No client code changed, so there are no e2e changes. - **Nothing large committed.** The real files, the Codex pictures, the Blender add-on and its config all lived in a temp dir that has been deleted. The regression stays synthetic. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Commands run by the agent are listed below as results, not as ticked boxes: - `pnpm check` on `6cdee61a3`'s code: exit 0. It ran format, localization, impeccable, lint, type checks and the build. The one lint warning is the pre-existing one in `HomeProfessorMariChat.tsx`. Main entry: 313 kB. The later commit `2c3ac741d` changes one docs sentence only. - `pnpm localization:check`: exit 0. - `node scripts/run-regressions.mjs --filter avatar`: 14/14 passed. - Guards: `--filter agent-activation` 2/2, `--filter spatial-context` 1/1, `--filter open-issues` 1/1. - `--filter docs-command-search` and `--filter docs-language`: passed. - The new checks fail on the old importer: with `vrm.ts` reverted, `avatar-vrm` fails at "an empty mouth shape is not bound". - The existing avatar e2e specs (`avatar-setup`, `avatar-2d`) on desktop and mobile Chromium, on this branch: 20/20 passed. This PR changes no client code. - A temporary Playwright spec drove the real-file table above: 18/18 passed on desktop Chromium, plus 4 cases on mobile Chromium. It was deleted afterwards and is not in this PR. - Local CodeRabbit (`coderabbit review --agent --committed --base-commit 1cd98bc16`): - First run, 3 findings: two fixed in `6cdee61a3` (the custom-face notice, the plain glTF wording), one declined (override-only expressions, see Decisions). - Second run, 1 finding (Blender before 4.2), fixed in `2c3ac741d`. Review fixes in `15038be87` (docs only), on that commit: - `pnpm check`: exit 0. The one lint warning is the pre-existing one in `HomeProfessorMariChat.tsx`. - `pnpm localization:check`: exit 0. - `node scripts/run-regressions.mjs --filter avatar`: 14/14 passed. Guards: `agent-activation` 2/2, `spatial-context` 1/1, `open-issues` 1/1. `docs-command-search` 1/1, `docs-language` 1/1. - Local CodeRabbit (`coderabbit review --agent --committed --base-commit 1cd98bc16`), third run: 0 findings. - GitHub CodeRabbit's outside-diff note on duplicate VRM 0.x names was declined: three-vrm 3.5.5 keeps the first group of a duplicated name and ignores the later one (`VRMExpressionLoaderPlugin._v0Import`, "has duplicated entries. Ignoring the expression"), and the importer already judges a duplicated name by its first group. ### Manual verification notes Steps for Mari on `staging` after merge: 1. Open **Agents → 3D Avatars**, choose a character, then **Import VRM** with a VRoid Studio model. Check that every face, mouth shape and Blink says **Set by the model** or **Guessed from its name**, and that **Preview → Try a face** and **Talk** move it. 2. In Blender with the VRM Add-on for Blender, import a **VRM 1.0** model, such as a VRoid Studio model exported as VRM 1.0, and export it as **VRM 0.x** without filling the Blend Shape Proxy. A VRM 0.x model keeps its faces when exported again as 0.x, so it won't show the bug. Import it with **Replace model**. Expect only Neutral to be set, both notices above **Faces and mouth shapes** ("Some of this model's expressions are empty…" and "Some faces or mouth shapes have no matching expression…"), and the other faces showing **Not found in the model**. 3. Export from Blender's plain **glTF 2.0** exporter with compression off, rename the file to `.vrm` and import it. Expect "This is a plain 3D model, not a VRM…". Export it again with Draco compression on, rename and import: expect "This model is saved with compression avatars can't load (Draco)…" instead, because compression is checked first. 4. Open `docs/agents/avatars.md` on GitHub and follow **Make your own model**. Check that the links to **Making an avatar from a sprite**, **Mesh Avatar Studio**, **PNGTuber sprites** and the Blender steps jump to the right headings. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) Docs note: `docs/agents/avatars.md` changed, and the existing follow-up issue #7540 lists the new section; no new issue was opened. No CHANGELOG entry. ## UI evidence (if applicable) No screenshot is attached, because the agent can't upload images to a PR. The new notice shows in the setup panel's existing notice list above **Faces and mouth shapes**, in the same style as "Some faces or mouth shapes have no matching expression…". Manual verification step 2 shows it. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added guidance for creating custom avatars with supported tools, configuring expressions and animations, and meeting export requirements. * Clarified that `.mavatar` files can be created with Marinara Engine and that both avatar agents are available through **Download Agents** on staging. * Linked plain 3D model guidance to the Blender instructions. * **Bug Fixes** * Improved VRM expression mapping: expressions with no effective binds are excluded from non-neutral slots, and import warnings flag empty expressions that would otherwise be mapped. Neutral expressions can still bind to empty entries. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:07:42 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#7810
No description provided.