glTF Skin Animation#2388
Closed
georgioskarnas wants to merge 2 commits into
Closed
Conversation
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #
Background
Change List