feat: VRM export#180
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When wearables cover body parts, the base meshes are hidden via setEnabled(false). The Babylon GLTF exporter does not skip disabled meshes by default, so hidden body parts were being exported alongside wearable meshes causing visual artifacts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The previous isEnabled() check was too aggressive — it filtered out TransformNodes (skeleton bones) in addition to meshes, and checked the full ancestor chain. Now uses instanceof AbstractMesh to only filter actual mesh geometry, and isEnabled(false) to check only the node's own state without traversing ancestors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ones Each wearable container loads its own skeleton hierarchy. When exported to GLTF, wearable meshes reference their own duplicate bone nodes instead of the primary skeleton that the VRM humanoid mapping points to. This causes wearable meshes to appear at wrong positions or be invisible in VRM viewers. Remap all GLTF skin joints to reference the first occurrence of each bone name, unifying all meshes under a single skeleton. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Babylon GLTF exporter strips __root__ coordinate-conversion nodes and disables right-handed conversion for their descendants (bones). But center() reparents meshes under a different parent, so meshes still get coordinate-converted while bones don't. This puts them in different coordinate spaces, producing a 180-degree Y rotation on mesh geometry. Apply a compensating 180-degree Y rotation to the parent node in the GLTF JSON to re-align meshes with the bone coordinate space. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rdinate space The GLTF exporter strips __root__ nodes and disables coordinate conversion for their descendants. Since center() moves meshes out from under __root__ to a separate parent node, meshes got coordinate-converted but bones did not — causing the upside-down orientation. Reparenting parent under __root__ before export ensures uniform treatment of all nodes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tively The setParent(__root__) approach caused double Z-inversion: __root__ has scale (1,1,-1) for GLTF→Babylon conversion, and reparenting parent under it gave parent a compensating (1,1,-1) local scale. Combined with the serializer's own Z inversion, wearable meshes ended up in the wrong coordinate space. Fix: don't touch the hierarchy at all — just reset parent's full transform (including rotation) to identity and let the serializer handle handedness conversion on its own. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… skin maps Babylon 4.2's glTF serializer keys each exported image by the Babylon texture name; when two distinct textures share a name the second one's glTF texture entry aliases to the first image. DCL avatars reuse the name AvatarSkin_MAT (Base Color) across body parts that carry different image data (the head a clean 1024 skin map, the body a darker 2048 one), so the head inherited the body's map and rendered dark, feature-placeholder texels around the nose and eyes. Make every texture name unique for the duration of the export, then restore so the live scene is untouched. Verified: head now references its own 1024 image, nose dark-pixel fraction 9 percent to 0 percent in a Blender VRM-addon import. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-name-collision fix(vrm-export): unique texture names so the serializer doesn't alias…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.