KhronosGroup / KhronosGroup/glTF-Validator

Skin vertex weight normalization

Open
#144 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
470
Forks
77
PR merge metrics
No merged PRs in 30d

Description

The spec says:

> The joint weights for each vertex must be non-negative, and normalized to have a linear sum of 1.0. No joint may have more than one non-zero weight for a given vertex.

The [validator seems to check if the weights sum to one **_in groups of 4_**](https://github.com/KhronosGroup/glTF-Validator/blob/1be41dd1acdfe21ee9e577577bc2183e6861345a/lib/src/data_access/validate_accessors.dart#L318)

Is this the desired behavior?

E.g. all of my customer's models have 8 weights. If feels more logical to me that the sum of these 8 weights should be one?

I'm trying to fix [Maya2glTF](https://github.com/iimachines/Maya2glTF) to get rid of the normalization errors like these:

`Weights accessor elements (at indices 2744..2747) have non-normalized sum: 0.9999983310699463`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with lib/src/data_access/validate_accessors.dart around line 318 and compare its groups-of-four check with the quoted skin-joint weight requirement. Inspect how 8-weight vertex data is represented in the validator and determine whether normalization should apply per group or across all weights. Done means the expected interpretation is established and the issue is resolved or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
testing-qa, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.