Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skeleton3D: Convert 3.x skeletons #87050

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

nikitalita
Copy link
Contributor

This implements conversion of the old 3.x Skeleton format to 4.x upon load (similar to old Mesh format conversion).

Skeletons had a Transform pose property in 3.x, which was broken out in 4.x to

  • Vector3 pose_position;
  • Quaternion pose_rotation;
  • Vector3 pose_scale

Additionally, in 3.x, the pose of the skeleton was relative to the rest position; in 4.x, the poses are absolute.

So, we recompute the poses to be absolute and break the Transform3D into its various components.

@nikitalita nikitalita requested a review from a team as a code owner January 10, 2024 17:51
@AThousandShips AThousandShips added this to the 4.x milestone Jan 10, 2024
@fire fire requested a review from a team January 10, 2024 21:29
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

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

I think this is good. @TokageItLab @lyuma Can you check?

This was how it was described to me by Tokage YEARS ago.

Copy link
Member

@TokageItLab TokageItLab left a comment

Choose a reason for hiding this comment

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

This should be fine for the bone properties.

However, there is no animation compatibility, so if you want full compatibility with 3.x Skeleton, you will need to consider that as well; There is never full compatibility possible with animations. Bone animation is now absolute, not relative, and scale has been isolated so that transforms should be different when combined with rotation and scale.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jan 12, 2024
@nikitalita
Copy link
Contributor Author

This should be fine for the bone properties.

However, there is no animation compatibility, so if you want full compatibility with 3.x Skeleton, you will need to consider that as well; There is never full compatibility possible with animations. Bone animation is now absolute, not relative, and scale has been isolated so that transforms should be different when combined with rotation and scale.

Yes, this is fixed in my next PR. #87106

@nikitalita nikitalita force-pushed the convert-3.x-skeletons branch from 41b63e7 to bcad569 Compare January 20, 2024 01:43
@YuriSizov YuriSizov merged commit 36f5050 into godotengine:master Jan 22, 2024
16 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

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

Successfully merging this pull request may close these issues.

6 participants