KhronosGroup / KhronosGroup/UnityGLTF
Only 4 bone weights per vertex exported/imported when Unity supports up to 256
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 536
- PR merge metrics
- No merged PRs in 30d
Description
I found out that more than 4 bone weights per vertex are not supported for import/export. Both in the exporter and importer code you are using the old `UnityEngine.BoneWeight` struct. Unity has now a preferred API which uses the `UnityEngine.BoneWeight1` struct that supports up to 256 bone weights per vertex. Right now any mesh using this functionality will be ignored by the exporter and any imported glTF with more than 4 weights will also be clamped.
Here is the Unity docs for reference: https://docs.unity3d.com/ScriptReference/BoneWeight1.html
Importer/Exporter code should be updated to use that API instead of the old struct to support more weights per vertex.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the importer and exporter code paths that use UnityEngine.BoneWeight, then compare their handling with Unity's BoneWeight1 API documentation. Done means meshes with more than four bone weights per vertex are no longer ignored on export or clamped on import, with relevant coverage added if the repository provides tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100