glTF icon indicating copy to clipboard operation
glTF copied to clipboard

Representing single vertices being unaffected by skinning

Open appgurueu opened this issue 2 years ago • 1 comments

I don't see a simple way to represent single vertices being unaffected by skinning (static vertices in an otherwise animated mesh). What I have considered:

  1. All zero JOINTS_n and WEIGHTS_n attributes for the unaffected vertices. This does not work since the spec mandates a normalized weight sum of exactly 1 (plus/minus a minimal error) - see e.g. https://github.com/KhronosGroup/glTF/issues/1929.
  2. A separate, unskinned primitive. This would probably work for most models in practice, but it doesn't work if I have e.g. a triangle where only a single vertex is unaffected by skinning but the other two are.
  3. Introducing no-op bones. This would work, but it feels dirty and presumably makes the models harder to edit if imported into e.g. Blender.

Background: I'm writing a b3d (Blitz3D) to glTF converter. The Blitz3d model format turns the lookup around: Rather than each vertex having affecting joints & weights as attributes, each joint has a map of vertices to weights. This allows vertices to be completely unaffected by skinning; they simply don't appear in these map(s), or they appear only with zero weights.

appgurueu avatar Mar 14 '23 16:03 appgurueu

I would probably copy the Blender solution of:

Introducing no-op bones. This would work, but it feels dirty and presumably makes the models harder to edit if imported into e.g. Blender.

Reference:

https://github.com/KhronosGroup/glTF-Blender-IO/issues/1151

fire avatar Mar 15 '23 16:03 fire