Skip to content

Vertex skinning produces no visible effect even with posed joints #244

Description

@schell

Vertex skinning produces no visible effect even with posed joints

Repro

  1. Load a rigged model (gltf/Fox.glb) with a stage created .with_vertex_skinning(false).
  2. Render the bind pose.
  3. stage.set_has_vertex_skinning(true).
  4. Build an Animator over the scene nodes + the first animation clip, and animator.progress(0.5) to pose the skeleton.
  5. Render again.

Result: the render is byte-identical to step 2 — 0 pixels differ.

What is NOT the problem (all verified by instrumentation)

  • The animator works: after progress(0.5), 22 of 26 Fox nodes' global translations changed
  • The flag is set: set_has_vertex_skinning(true) writes GeometryDescriptor::has_skinning
  • The loader wires skins: renderlet.set_skin(skin) (gltf.rs:1152), setting PrimitiveDescriptor::skin_id
  • The loader reads per-vertex joints/weights: gltf.rs:419-450
  • The shader gates on both conditions: if config.has_skinning && self.skin_id.is_some() (primitive/shader.rs:93)

So every CPU-side piece is in place; the failure is in the GPU skinning path.

Note on the existing test

The rigged_fox crate test does not actually assert a visual difference between the skinned
and unskinned renders: assert_img_eq_cfg is called against the no-skinning baseline with a
different test_name, and no rigged_fox.png baseline exists in the repo. The test only
proves enabling skinning doesn't crash. (Skinning at bind pose is also a no-op by definition -
joint matrix x its inverse bind = identity - which is why posing the skeleton, as above, is
necessary to even attempt a visual check.)

Suspects

  • the SkinDescriptor / joints slab data read in the vertex shader
  • joints/weights attribute wiring in the loaded vertices (e.g. always zero)
  • the skin read path in PrimitiveDescriptor::transform (primitive/shader.rs:93+)

Context

Found while writing the animation manual chapter (worktree
docs-missing-manual-buildout). The chapter documents set_has_vertex_skinning with a
caveat and links this issue; the example omits a skinning demo since the feature currently
has no visible effect.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions