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

Root Motion #1751

Merged
merged 7 commits into from
Jun 24, 2024
Merged

Root Motion #1751

merged 7 commits into from
Jun 24, 2024

Conversation

effs
Copy link
Contributor

@effs effs commented May 28, 2024

Fixes

  • Root Motion export logic (incl. yaw-only rotations)

Adds

  • Root Motion import
  • Lightweight type level support for differentiating ZupLhs (wkit) and YupRhs (glTF) coordinates so that you can enforce using the correct one in the correct place plus conversions

Other

  • Ton of refactoring in AnimTools and , primarily there's now a struct for passing the data around from and to encoders so that logic is not duplicated where possible.

Detes

  • Root Motion export with toggle, import without toggle based on glTF data
  • Root Motion is Translation and possibly Rotation, type dependent. No Scale.
  • Only Root Motion or regular root joint transforms (if any) are exported, not both, not mixed
  • glTF storage for RM is in root joint, as per above
  • glTF extras for each anime schema v4 includes RootMotionType that tries to be clearer on intent
    • None if RM requested but there's none
    • Unknown if not requested (whether or not one exists)
    • Others if requested and found
  • Previous schemas migrated with RootMotionType.Unknown
    • None uses root transforms as regular and deletes old RM
    • Unknown copies old RM from CR2W, if any, doesn't touch root joint, essentially equivalent to toggle
    • Others store indicated type and clear root joint transforms

Also Done

closes #1692

TODO separately

@effs effs changed the title feat(Anims, export): Root Motion Export Fix + Unified Export Logic Refactor Root Motion May 28, 2024
@effs effs marked this pull request as ready for review June 15, 2024 22:15
@effs
Copy link
Contributor Author

effs commented Jun 15, 2024

@seberoth Not sure how worthwhile it is to dig into the actual logic here but if you have the chance, I'd like your eyes on

  1. The type-level stuff and the more fp-style flow over iteration, if there's anything too jarring

  2. The epsilon and other normalization both in that it makes sense and whether we need it elsewhere

@effs effs merged commit 8dc208e into main Jun 24, 2024
2 checks passed
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.

Root motion corner case validation
1 participant