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

When Using Custom Bone Mapping, Retargeting Animation Glitch/Error #15

Closed
stryker313 opened this issue Apr 27, 2021 · 6 comments
Closed
Labels
bug Something isn't working enhancement New feature or request

Comments

@stryker313
Copy link

When using custom bone mapping, the retargeted animation either has incorrect naming, or something else is going wrong.
Video: https://youtu.be/9O3UsoxphxE
Steps to reproduce:
Enter a custom bone mapping for all bones, using two different skeletons with two different naming convenitions
Click retarget animations
The resulting animation has the names from the source skeleton, which is an issue because the new skeleton doesn't have those
bone names

Also, is there going to be a way to drag a file with a dictionary onto the retarget node so that people can use it without running the game? ( I know you can setup a dictionary in a file, then load using set_custom_bone_mapping())

@smix8 smix8 added the bug Something isn't working label Apr 27, 2021
@smix8
Copy link
Owner

smix8 commented Apr 27, 2021

That the old bonetracks with the source bones are kept from copying the animation is a bug.

The retargeting tool is adding bonetracks for all missing bones in the animation but somehow the returned subname for the bonetrack is returned empty. This is why the main node has no name.

I can't see more from the video alone. Can you send me the files?

Also, is there going to be a way to drag a file with a dictionary onto the retarget node so that people can use it without running the game?

Does Godot Editor Inspector support drag&drop for this? I don't think so, so this needs to wait until I am able to create a custom user interface.

@smix8 smix8 added the enhancement New feature or request label Apr 27, 2021
@stryker313
Copy link
Author

Animation Retargeter.zip

@smix8
Copy link
Owner

smix8 commented Apr 27, 2021

Thanks

EDIT:
I see what the problem is, should have a fix ready tomorrow.

@smix8
Copy link
Owner

smix8 commented Apr 28, 2021

fixbonemapping
@stryker313
Was able to fix mapping and also scale and retarget the animations completely with a position_correction of y-axis -8.62 now. It is good for debugging but for your project I would recommend to use skeletons that are the same scale and have a root bone to avoid precision errors and the manual corrections.

Need to do some code cleanup and, as said, will upload the fix tomorrow in a few hours.

@smix8
Copy link
Owner

smix8 commented Apr 28, 2021

I was able to also fix the hip bone position retargeting so manual correction shouldn't be necessary.

Had to add a lot of trackpath comparison to account for different node structures between source and target (something that Godot by default does not care when moving AnimationPlayers or does wrong).

Unfortunatly I am having issues applying all those changes to the module and something broke without an error msg which makes debugging annoying. Will update later.

For now only updated the GDScript 3.x version for testing with commit 093352a

@smix8
Copy link
Owner

smix8 commented Apr 28, 2021

Fixed by commit c2360db

@stryker313
With the new version I could fix your animation and skeleton 100% with settings:

  • root_motion and/or retarget_position = true
  • source_skeleton_scale = 10.0

...but as always let me know if something else shows up that isn't working.

EDIT:
Your retarget skeleton is +1 child node deep so all trackpaths were wrong, something that is trouble in default Godot.

I added an auto-rename for trackspaths in this version and it worked for your skeleton to rename all bonetracks from mixamo_xyz to only xyz. Does currently only account for Transform tracks, not method, property or sound animationtracks.

@smix8 smix8 closed this as completed Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants