Legacy => Humanoid no keys generated, no errors in log
Hi there,
I bought Anim Converter as I'm trying to convert some imported BVH files to Humanoid. (I also own UMotion Pro)
The converter appears to run with no errors in the log, however the output animation contains only two frames - start and end, and they're both the un-animated T-Pose.
The process I'm using here is to parse the BVH, build a hierarchy that directly matches it, then parse the animation channels and generate a legacy AnimationClip from them. This all works fine - I've attached cubes to the joints for debugging and can see the animation running both in Inspector and in game.
I'm then using Animation Converter to retarget onto a standard Humanoid rig - for now I'm just using Ethan from the Unity Standard Assets (imported as Humanoid not Generic).
Things I've also tried are building a Generic Avatar instead and Generic => Humanoid, this ends with the same result. No errors, no keys.
Note, it's not possible to dupe/re-import the legacy rig as human as it's not an FBX/Blender.
Am happy to provide the 3 input files (legacy anim, legacy prefab, humanoid prefab), just contact me by email.
Answer
Quick addition to this,
I've just tried building a Humanoid Avatar from the Legacy one (in code) rather than using Ethan from standard assets as maybe that was the problem.
This one crashes the converter (null ref) - the code is obfuscated so I've no idea what it may be.
NullReferenceException: Object reference not set to an instance of an object
10101000111011001010001110001010001001110111101.00101001101001011111001101111110101001100111100 (UnityEngine.GameObject 11100110110111101001000101010110100001011110110) (at <7c2f25c065f54ebdbe627e8130001d92>:0)
PS. In all honesty I don't think the code obfuscation is helping you here.
Shipping as an obfuscated assembly is only really worth it if there's some "secret" embedded within it. But even then it's easy to step through - enough to deter casual copies, but not much else.
On the flip side given a meaningful stacktrace plus a desire to fix my problem many people like me will help you fix the issue!
Hi,
thank you very much for your support request.
"I bought Anim Converter as I'm trying to convert some imported BVH files to Humanoid. (I also own UMotion Pro)
The converter appears to run with no errors in the log, however the output animation contains only two frames - start and end, and they're both the un-animated T-Pose."
A legacy/generic clip only plays correctly when it uses the exact same hierarchy (and initial rotations) as the character you want to play it on. When you convert your BVH to a legacy (or generic) *.ANIM, try if the clip plays correctly on your legacy (or generic) character. For me it sounds like Unity can't play your *.ANIM clip, thus the character stays in it's T-Pose during the whole conversion process.
Also make sure that the character you pass as humanoid is an exact duplication of the character you pass as legacy/generic. Also make sure that the humanoid avatar is setup correctly (when you click on "Rig --> Configure..." make sure that the character is in T pose and all bones are green). Also check if a regular humanoid *.anim file plays fine on your humanoid character.
Please try to use an avatar created by Unity's model importer instead of a custom created one (this ensures that everything is setup correctly).
Another way to convert your BVH to humanoid would be by using UMotion Pro. Create a new project with your legacy character, import your generated legacy *.anim. Export the whole project as *.FBX (attention: set "write mode" to "Update Existing File" and select your character as destination *.FBX). Then open your character's Inspector and change it's rig to humanoid.
Please let me know if you need any further assistance.
Best regards,
Peter
Hi there,
As I say, the imported legacy (I tried Generic too) animations play perfectly, the hierarchy is being build from the BVH skeleton so that isn't a surprise. The conversion to humanoid is failing to produce frames.
The Humanoid however isn't a copy of that skeleton. I can make one that is a copy - however the converter crashes with the exception above.
I'll try the Umotion Pro export fbx route as a workaround - however I was hoping to automate this on import and putting Umotion Pro into that process seems like it won't be easy.
"The Humanoid however isn't a copy of that skeleton."
That is a key requirement and explains why it didn't work correctly. You need to the same character but with different rig configuration.
"I can make one that is a copy - however the converter crashes with the exception above."
This is most likely happening because you used a script generated humanoid avatar. Make sure that your character is imported by Unity and that the humanoid avatar is correctly generated by Unity's model importer. You could export your generated hierarchy to *.FBX (using UMotion) and then use that "character" for the animation converter.
Best regards,
Peter
Customer support service by UserEcho
Hi,
thank you very much for your support request.
"I bought Anim Converter as I'm trying to convert some imported BVH files to Humanoid. (I also own UMotion Pro)
The converter appears to run with no errors in the log, however the output animation contains only two frames - start and end, and they're both the un-animated T-Pose."
A legacy/generic clip only plays correctly when it uses the exact same hierarchy (and initial rotations) as the character you want to play it on. When you convert your BVH to a legacy (or generic) *.ANIM, try if the clip plays correctly on your legacy (or generic) character. For me it sounds like Unity can't play your *.ANIM clip, thus the character stays in it's T-Pose during the whole conversion process.
Also make sure that the character you pass as humanoid is an exact duplication of the character you pass as legacy/generic. Also make sure that the humanoid avatar is setup correctly (when you click on "Rig --> Configure..." make sure that the character is in T pose and all bones are green). Also check if a regular humanoid *.anim file plays fine on your humanoid character.
Please try to use an avatar created by Unity's model importer instead of a custom created one (this ensures that everything is setup correctly).
Another way to convert your BVH to humanoid would be by using UMotion Pro. Create a new project with your legacy character, import your generated legacy *.anim. Export the whole project as *.FBX (attention: set "write mode" to "Update Existing File" and select your character as destination *.FBX). Then open your character's Inspector and change it's rig to humanoid.
Please let me know if you need any further assistance.
Best regards,
Peter