mafaca / UtinyRipper

GUI and API library to work with Engine assets, serialized and bundle files
MIT License
2.84k stars 433 forks source link

Help in opening extracted humanoid animationclips on unity to a scene #131

Closed cesm1980 closed 5 years ago

cesm1980 commented 6 years ago

Ok, in the game Lucius 2, i was able to extract the animationclips, which unfortunately, due to being of humanoid type, can't be exported correctly to FBX throught the other unity ripping tool by Perfare (Assetstudio), apparently yours is the only tool now capable of extracting the clips at least to unity native format. I downloaded the free version of unity studio, and to my amazement i was actually able to preview correctly these animationclips even with the built in "unity model" rig that is used to preview the animation when clicking on the clip on the assets browser section with the animationclip alone, without any other assets from the game.

Ok i know this place is for issues with the UtinyRipper, but i don't know any other way to contact you Mafaca and perhaps you understand enough of the unity editor to help me on this, here's the problem :

In unity itself, i want to export humanoid animationclips to fbx, the problem is that while unity has no problem applying the animation to it's built in character through the animationclip preview, i have no way of making this work on the actual scene, so that i can export to fbx. I tried using the original mesh and avatar assets of the game, but unfortunatley i am quite new to unity and no matter what i try, the mesh isn't importing with any bones at all (perhaps because of being from a older unity version). I had no chance but to download from the asset store a projet that has the same built-in character ("unity model") in a fbx file, and i even tested that rig from the fbx file in the animationclip preview window and it played perfectly without flaws, proving that unity is capable to assigning the animationclip to the character on the fbx file and that appears indeed to be the same one that is built-in with unity.

But then why when i drag the character from the fbx file into the scene, and then the animationclip ontop of the character, no matter what way i try only the top hierarchy bone gets animated. The first thing i though is that probably the animation isn't compatible with the built-in character, but then how is it possible that the animation plays PERFECTLY with that same character on the animationclip preview even without the original mesh/rig from the game model? I don't know what to try anymore since i tried for hours on my own and i had to give up because unfortunately on google and unity manual it's quite difficult to search for something like this since they ALL talk about fully rigged characters with avatar which isn't the case.

Please advise me something because i haven't found any other way of importing humanoidclips to fbx files anywhere (at least without paid assets or tools) and this is the closest i ever got to achieve this.

mafaca commented 6 years ago

In unity itself, i want to export humanoid animationclips to fbx

There is no way to convert unity humanoid animation clip to fbx. You can convert mesh to fbx in unity but not animations. For now the only way to extract humanoid animation clip in fbx is to use paid tool, however I'm pretty sure that if much people ask Perfare to implement this feature he will try to add it in Asset Studio.

the mesh isn't importing with any bones at all

You can't apply animation clip on mesh file, you need apply it on prefab. Prefab has transform hierarchy and SkinnedMeshRenderer component with rig information. Also you need to set valid avatar for AnimatorController component (usually prefab has this one set).

cesm1980 commented 6 years ago

There is no way to convert unity humanoid animation clip to fbx. You can convert mesh to fbx in unity but not animations. For now the only way to extract humanoid animation clip in fbx is to use paid tool, however I'm pretty sure that if much people ask Perfare to implement this feature he will try to add it in Asset Studio.

Yeah, that's a big problem, last time Perfare talked about this, he just said humanoid clips aren't supported and redirected the person to your tool here, even tough this is just to be able to open in unity itself.

You can't apply animation clip on mesh file, you need apply it on prefab. Prefab has transform hierarchy and SkinnedMeshRenderer component with rig information. Also you need to set valid avatar for AnimatorController component (usually prefab has this one set).

Oh "prefab"! Never noticed such kind of assets existed, mainly because they don't appear on Assetstudio so i didn't even knew about them, since the limited experience i have with unity assets is only from assestudio and sb3utility. But even if i find the matching prefab on the game's assets (so far i haven't found a matching name on the game's prefab assets, perhaps there is a universal prefab for all humanoid animations with another name, i will have to try each one by trial and error) but i have the matching avatar and mesh. Just tell me one thing then, let's suppose i find the prefab too and i get the animation to play on the scene in unity correctly... it will still require paid tools ? I already have the free fbx exporter and it says there it supports animations, but maybe it only exports in fbx if the animation is from generic type ? Also thanks for the help so far.

mafaca commented 6 years ago

it will still require paid tools ?

Well, I don't know) Year ago I tried to find such tool and couldn't do it. If you will find some free exporter that works tell about it here so other people can use it too.

cesm1980 commented 6 years ago

Hum... ok thanks anyway.