Skip to content

fix: Some skin wearables not rendering in avatar view#47

Merged
sandrade-dcl merged 1 commit into
mainfrom
fix/some-skin-wearables-not-visible-in-avatar-view
Mar 6, 2026
Merged

fix: Some skin wearables not rendering in avatar view#47
sandrade-dcl merged 1 commit into
mainfrom
fix/some-skin-wearables-not-visible-in-avatar-view

Conversation

@sandrade-dcl

Copy link
Copy Markdown
Contributor

Fix: decentraland/unity-explorer#7325

Problem

Skin wearables with non-standard skeletons (e.g. "LilDoge" — a dog character) were invisible in avatar view. The root cause was that SetupColors blindly replaced all SkinnedMeshRenderer.bones with the standard humanoid avatar bones array. When a skin has a completely different skeleton (different bone count/structure), this collapsed the mesh to nothing. In WebGL/WASM builds, this also triggered a RuntimeError: divide by zero because Unity's internal rendering code attempted to compute normals/matrices on the collapsed mesh.

Fix

  • Separated bone rebinding from color setup — SetupColors now only handles materials, and a new RebindBones method handles skeleton binding. These were mixed responsibilities in a single method.
  • RebindBones matches bones by name instead of replacing the entire array. Bones that exist in the avatar skeleton are replaced so they animate together, while bones with no match keep their original transform from the GLB. This ensures skin wearables with custom skeletons render and animate correctly.

…atarUtils` and updated `SetupColors` accordingly
@sandrade-dcl sandrade-dcl self-assigned this Mar 4, 2026
@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown

badge

Vercel Preview is ready!

Field Value
Preview https://aang-renderer-j0cnx528w-decentraland1.vercel.app
Commit e64a0077fa7a21b59669963965474cdb7864b431
Logs https://github.com/decentraland/aang-renderer/actions/runs/22687340113

@sandrade-dcl
sandrade-dcl requested a review from mihakrajnc March 4, 2026 23:18
@sandrade-dcl sandrade-dcl changed the title fix: Skin wearables not rendering in avatar view fix: Some skin wearables not rendering in avatar view Mar 5, 2026
@sandrade-dcl
sandrade-dcl merged commit 0da658e into main Mar 6, 2026
9 of 10 checks passed
sandrade-dcl added a commit that referenced this pull request Apr 2, 2026
@charly-bg
charly-bg deleted the fix/some-skin-wearables-not-visible-in-avatar-view branch June 3, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[QA] Wearable - LilDoge | Wearable not visible in preview of marketplace

2 participants