Perfare / AssetStudio

AssetStudio is a tool for exploring, extracting and exporting assets and assetbundles.
MIT License
13.18k stars 2.54k forks source link

Problem with exported animations #560

Open zwrtron opened 4 years ago

zwrtron commented 4 years ago

I'm having problems with animations exported via Asset Studio to FBX.

The problem is that when the model (with animator) is imported into 3ds Max, the dummies are transforming correctly according to animation, but the geometry is not. After checking the Skin modifier I found out, that the objects do not have vertex weights set up (so that's why the geometry is not affected).

During the importing of FBX, I've got following messages: The following parent and/or ancestor node(s) is/are not part of the BindPose definition: and some list of bones.

and The initial position (or Initial Pose) of the skinned objects is missing. The plug-in will create a pose automatically but running 'Assume Skin Pose' command may create unexpected results.

Sample: https://mega.nz/file/HHoBCLZK#ZLqaWTvNhKh4YMytpRtBYzPf27EoMly2xgMlMeQ2SjQ There is need to import all files in the folder to Asset Studio and then export hierarchy called 'Body_lodA'.

Can you, please, take a look?

YuRaNnNzZZ commented 4 years ago

This must be related to engine version. Rust is using 2019.3 and exported models from there have same issue: unskinned meshes (both when importing to Blender and 3DS Max). Sadly i can't provide example assets since the bundles are too big.

zwrtron commented 4 years ago

Thanks for response, @YuRaNnNzZZ. I don't think that the problem is caused by the engine version. I've been using models from the game (CSR2) for a coupe of years (even before release of 2019.3) and I still had problem with animations.

YuRaNnNzZZ commented 4 years ago

I don't think that the problem is caused by the engine version

I think it is, just loaded a couple models from Warface: Global Operations (2019.2.19f1), encountered same problem.

zwrtron commented 4 years ago

I don't think that the problem is caused by the engine version

I think it is, just loaded a couple models from Warface: Global Operations (2019.2.19f1), encountered same problem.

That's strange. I've did some debugging with Asset Studio and I've found out that the array m_Skin of Mesh is empty (zero-length) - this I believe explains the non moving parts of the exported model. But I'm sure, the mesh is animated in actual game so there is a chance that the weights are stored somewhere else? Version of these assets is 5.6.1 (2017) (version array is []{5,6,1,1}).

Perfare commented 4 years ago

The game stores the bone information in MonoBehaviour named GpuSkinning, so AssetStudio cannot obtain the bone information normally, resulting in failure to export.

zwrtron commented 4 years ago

Thank you for your answer, @Perfare. The problem is, that I've checked the GpuSkinning (and all other MonoBehaviours) but I did not find any structure that looks like weights. The GpuSkinning just contains names of bones. Can you, please, point me to right direction? I've been trying to make it work for a while, but I lack of experience and knowledge in this so I would appreciate your help. Thanks.

Emang619 commented 4 years ago

I've actually noticed a similar issue with rigged meshes from a game I've been working with myself. Some meshes do export their rigged animations properly, while others do not, and others have no rigging to them whatsoever.

An example (attached). The .fbx has the mesh, it has the texturing with proper mapping, it has the skeleton WITH animations chosen, but the mesh itself does not follow the rig whatsoever.

Resting: a38cc9422fffdaa3bcbfe6452978e685

Animated: 0d17e6a24cff6ab82f05b9bb577c92d0

EDIT: To assist, here is the .fbx the program puts out on export for said model above: Game Export.zip

zwrtron commented 4 years ago

@Emang619 - I've checked the model you posted and that looks exactly like the problem I'm facing. Model, geometry and animation is OK but the model's skin missing weights and that's the reason why the geometry is not moving as it should.

Emang619 commented 4 years ago

What is especially strange is some units actually have proper skin weights without issue. The best one is this one here. All the animations work correctly: Smialy.zip Blender It almost feels like the weights only work selectively, some only partial, and some not at all. It's very odd.

Emang619 commented 4 years ago

image I've also noticed something else. If the object is properly animated, the vertex groups are defined for the section of it that still animates properly.

image However the parts of the mesh that do not follow do not have any vertex groups.

Emang619 commented 4 years ago

@zwrtron You think this is just one of those unsolvable errors?

zwrtron commented 4 years ago

@Emang619 I'm not sure how this is supposed to work. I did not checked your models because you did not send assets just FBX, but in my case there simply are no weights stored in model (which is supposed to move) and the AssetBundle does not contain any structure that reminds weights (at least the ones AssetStudio shows). In the actual game they may be somehow "injected" from somewhere because in my case I did not meet situation where "some work" and "some don't" but none of the models work without exceptions.

Emang619 commented 4 years ago

@zwrtron Alright, I'll give you a sample file from the game's data folder. It doesn't have an extension, but it can be opened in Assetstudio all the same: https://mega.nz/file/bYV13KbD#RahGF83ITOCk194zjH8ZqIyLCzBnfmS_oHr1Z5ctZ7w

If you want the specific unit from the pictures above, look for the animator marked cha_sax_mech_gatling Variant image But do understand that most of the objects from the file list do not export with the correct weights, and some export with none whatsoever.

Emang619 commented 4 years ago

@Perfare If you have any interest on this, I'd also ask if you could take a look

YuRaNnNzZZ commented 3 years ago

The game stores the bone information in MonoBehaviour named GpuSkinning, so AssetStudio cannot obtain the bone information normally, resulting in failure to export.

Is this something that was added in Unity and is enabled by default? 7 Days To Die (2019.2.17f1) has the same problem. There are too many games with this issue for it to be overlooked.