Skip to content

Conversation

@metaremi
Copy link

This fixes the glTF skeleton joint transform import to properly account for joint scale. The previous code only considered translation and rotation when building the rest transforms for skeleton joints. The updated code:

Description

  1. Handles direct matrix data: First checks if the node has a complete 4x4 matrix specified (via node.matrix) and uses it directly
  2. Includes scale: When building from individual components (translation, rotation, scale), now properly extracts and applies the scale values
  3. Proper composition: Constructs the final 4x4 transform matrix by scaling the rotation matrix and then adding translation, preserving the correct order of transformations

Related Issue

Motivation and Context

fixes import of scale transform

How Has This Been Tested?

tested glTF are correctly imported

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

This fixes the glTF skeleton joint transform import to properly account for joint scale. The previous code only considered translation and rotation when building the rest transforms for skeleton joints. The updated code:

1.  **Handles direct matrix data**: First checks if the node has a complete 4x4 matrix specified (via `node.matrix`) and uses it directly
2.  **Includes scale**: When building from individual components (translation, rotation, scale), now properly extracts and applies the scale values
3.  **Proper composition**: Constructs the final 4x4 transform matrix by scaling the rotation matrix and then adding translation, preserving the correct order of transformations
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.

1 participant