Skip to content

glTF Skin Animation#2388

Closed
georgioskarnas wants to merge 2 commits into
masterfrom
gk/skin
Closed

glTF Skin Animation#2388
georgioskarnas wants to merge 2 commits into
masterfrom
gk/skin

Conversation

@georgioskarnas
Copy link
Copy Markdown
Collaborator

For #

Background

Change List

@georgioskarnas georgioskarnas requested review from Copilot and ibgreen May 3, 2025 06:39
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds skin animation support for glTF models by introducing a new skin shader module and integrating it within the glTF parsing and scenegraph creation logic.

  • Added a new skin shader module to process joint matrices in skinning.
  • Updated glTF parsing and model creation to enable skin support and pass additional glTF data.
  • Made minor adjustments for uniform buffer sizing and warning flag handling.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
modules/shadertools/src/modules/engine/skin/skin.ts New skin shader module added for glTF skinning support.
modules/gltf/src/pbr/parse-pbr-material.ts Added defines check for skin attributes.
modules/gltf/src/gltf/create-gltf-objects.ts Updated return value to include additional glTF data.
modules/gltf/src/gltf/create-gltf-model.ts Integrated skin shader and shader code modifications.
modules/engine/src/scenegraph/group-node.ts Added traverse2 method to propagate world matrices.
modules/engine/src/model/model.ts Modified handling of attribute warnings by hardcoding disableWarnings.
modules/core/src/portable/uniform-buffer-layout.ts Increased minimum uniform buffer size.
examples/tutorials/hello-gltf/app.ts Updated to utilize and log the new glTF property.
Comments suppressed due to low confidence (3)

modules/gltf/src/gltf/create-gltf-objects.ts:22

  • [nitpick] The property name 'gltfX' is unclear; consider renaming it to a more descriptive name such as 'gltf' or 'gltfInstance' to improve readability.
return {scenes, animator, gltfX: instantiator.gltf};

modules/engine/src/model/model.ts:601

  • Hardcoding 'disableWarnings' to false ignores any option provided by the caller or the model's props; consider restoring the original logic to respect the intended warning configuration.
const disableWarnings = false;

modules/core/src/portable/uniform-buffer-layout.ts:19

  • Ensure that increasing minBufferSize from 1024 to 2048 is intentional and has been validated against device requirements, as this may affect resource usage.
const minBufferSize: number = 2048;

node.skinWorldMatrixTemp = worldMatrix;
});

const count = 30;
Copy link

Copilot AI May 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider replacing the hardcoded value '30' with the defined constant MAX_JOINTS to improve clarity and maintain consistency.

Suggested change
const count = 30;
const count = MAX_JOINTS;

Copilot uses AI. Check for mistakes.
@ibgreen-openai ibgreen-openai mentioned this pull request May 4, 2025
15 tasks
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.

2 participants