mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8656] [MERGED] feat(avatars): rigged GLB and FBX models for 3D Avatars #8728
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#8728
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8656
Author: @SpicyMarinara
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/avatar-glb-fbx-8620📝 Commits (2)
2da21e9feat(avatars): rigged GLB and FBX models for 3D Avatars, auto-mapped onto the humanoid rig (#8620)26846e2fix(avatars): removing a GLB or FBX model clears an earlier import refusal (#8620)📊 Changes
28 files changed (+2410 additions, -81 deletions)
View changed files
📝
docs/agents/avatars.md(+14 -4)📝
docs/agents/built-in-agents.md(+2 -1)➕
e2e/avatar-glb-fbx.e2e.ts(+268 -0)📝
packages/client/src/components/chat/AvatarLayoutSettings.tsx(+2 -1)📝
packages/client/src/features/avatars/contract.ts(+2 -0)➕
packages/client/src/features/avatars/renderers/glb-fbx/GlbFbxSetupPanel.tsx(+146 -0)➕
packages/client/src/features/avatars/renderers/glb-fbx/glb-fbx-renderer.ts(+213 -0)📝
packages/client/src/features/avatars/renderers/vrm/vrm-renderer.ts(+96 -30)📝
packages/client/src/features/avatars/setup/AvatarAgentSetup.tsx(+1 -0)📝
packages/client/src/features/avatars/setup/AvatarSetupPreview.tsx(+2 -1)📝
packages/client/src/features/avatars/stage/AvatarStage.tsx(+2 -1)📝
packages/client/src/localization/locales/en.json(+16 -0)📝
packages/server/src/db/file-backed-store.ts(+3 -1)📝
packages/server/src/routes/avatar-models.routes.ts(+9 -2)➕
packages/server/src/services/avatars/formats/glb-fbx.ts(+316 -0)📝
packages/server/src/services/avatars/formats/registry.ts(+3 -0)📝
packages/server/src/services/avatars/formats/vrm.ts(+62 -32)📝
packages/server/src/services/avatars/storage.ts(+1 -0)📝
packages/shared/src/index.ts(+1 -0)📝
packages/shared/src/schemas/avatars.schema.ts(+15 -0)...and 8 more files
📄 Description
Linked issue
Closes #8620
Why this change
.glbor.fbx: Mixamo, Ready Player Me, VRoid FBX exports, Unity and Unreal exports. These were refused as "a plain 3D model, not a VRM". The maintainer chose this scope for #8620: GLB and FBX, with common rig naming auto-mapped onto the existing humanoid layer, morph-target faces when present, and a clear message for rigs that can't be mapped. No Xnalara, bone editor, pose editor or rendering presets.What changed
glb-fbx.avatar-humanoid-bones.ts).matchAvatarHumanoidBonesmaps common rig names onto the humanoid bones:mixamorig:Hips,mixamorigHips,Armature|hips,J_Bip_C_Hips,upper_arm.L,Bip01 L UpperArm,upperarm_l,Character1_LeftArm,CC_Base_L_Upperarm,lShldrBend,ValveBiped.Bip01_Head1.pairedAvatarMorphNamesgives left/right blend shapes one name, soeyeBlinkLeftandeyeBlinkRightblink together.formats/glb-fbx.ts).viseme_aa), VRoidFcl_*, ARKit (eyeBlink) and looser fallbacks..glb, an unmappable rig, an FBX older than 7.0, and a mislabelled file. It warns when an FBX's textures aren't embedded.vrm-renderer.tsnow takes a model source instead of being VRM-only.glb-fbx-renderer.tsloads the file with GLTFLoader or FBXLoader and builds three-vrm's humanoid and expressions from the stored bones. The existing idle and emotion poses, blinking and lip-sync therefore apply unchanged.vendor-three. The renderer is a 3.4 kB lazy chunk.GlbFbxSetupPanelshows "GLB model: N of 22 body bones matched." plus the face and mouth bindings. An import refusal stays on the page as an alert, and removing the model clears it.glb-fbx/files from their first bytes.isAvatar3dKind()replaces threekind === "vrm" || kind === "mmd"checks. 16 new English keys inen.json.storage-format.jsonandSTORAGE_VERSION). Without it, a format-9 build would reject the new kind and could overwrite that owner'savatar.json. This follows the MMD (8) and format-9 precedents. Please check that no other open branch bumps the format too.docs/agents/avatars.mdgets a new "GLB and FBX avatars" section, and the setup steps, intro and "What to avoid when exporting" are updated.docs/agents/built-in-agents.mdis updated too.scripts/regressions/avatar-glb-fbx.regression.tscovers bone matching across naming schemes, unmappable rigs, blend shape pairing, both importers and their refusals, hostile FBX inputs, the import route, and loading and posing in Node.e2e/avatar-glb-fbx.e2e.tsimports a generated GLB on a real server and checks that the preview draws in the model's colours, moves and talks, and that a rig with unmatched bones is refused inline.avatar-stage-logic,avatar-mmd-clientandavatar-modelsnow know the new kind.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
What the agent ran locally:
node ./scripts/pnpm-runner.mjs check,localization:checkandcheck:e2e-typesall pass.avatarregressions pass, and so do the 9launcherregressions (including the format guard:storage-format.jsonequalsSTORAGE_VERSION10) andmessage-sharding.avatar-glb-fbxandavatar-vrm, plus the other avatar specs, pass 8/8 on desktop Chromium. The VRM spec covers the renderer refactor.To verify by hand:
Known limits (outside the chosen scope):
.vrmaidles aren't used._NNspine suffixes leave chest and upper chest unmatched (less upper-body motion).Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)docs/agents/avatars.mdanddocs/agents/built-in-agents.mdchanged. A[docs-i18n]follow-up issue is opened for the translated packs. The Marinara-Agents3d-avatarspackage needs no code change, but its description still says "Uses VRM model files", so that copy is updated in a separate Agents PR.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.