[SOLVED] Import animation without mesh triple bones from fbx


photo

Recommended Posts

Hi,

when import fbx that contain only animation bones without mesh, then animation have duplicated bones by 3.

Orig fbx have 156 bones, imported animation have 468 bones.

Setting: import_animation.png.6e54bbd98c12a33848737b21895aaad0.png

Source fbx: male__JumpWalkStart_RU.fbx

Thanks

Honya

Link to post

Hello honya,

Thank you for your feedback, i've added this issue to our internal bugtracker, unfortunately, for now, i can't give you any ETA on when it will be fixed. Could you please specify if this issue is a showstopper in your workflow

Thanks

Link to post
Just now, vvvaseckiy said:

Hello honya,

Thank you for your feedback, i've added this issue to our internal bugtracker, unfortunately, for now, i can't give you any ETA on when it will be fixed. Could you please specify if this issue is a showstopper in your workflow

Thanks

Currently it is , we did masive change to our animation system, switching to root motion animations and we dont know about any other way, how to get these files into unigine. Do you have some ideas for workaround?

Link to post

Hi Jirka,

Right now there is no other solution or workaround.

We hope that fix will be trivial and you can rebuild FBX plugin from sources on your side with a patch. However, we are still debugging and if issue is more serious the only option left is to wait until 2.8 SDK update, sorry.

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to post

On our side we are probably able to change version of fbx, so if there is any preferred version...

Link to post

Hi Jirka,

The issue is on our side. Please, find the void FbxImporter::process_animations(fbx::FbxNode *fbx_node) method in source/plugins/Import/FbxImporter/FbxImporter.cpp and replace it with the following implementation:

void FbxImporter::process_animations(fbx::FbxNode *fbx_node)
{
	if ((flags & IMPORT_ANIMATIONS) == 0)
		return;

	using namespace fbx;
	FbxNodeAttribute *attribute = fbx_node->GetNodeAttribute();

	if (attribute && attribute->GetAttributeType() == FbxNodeAttribute::eSkeleton)
	{
		FbxProperty property = fbx_node->GetFirstProperty();
		while (property.IsValid())
		{
			for (auto &it : fbx_animations_layers)
			{
				for (AnimationData &data : it.data)
				{
					if (property.GetCurveNode(data.layer))
					{
						if(!data.nodes.contains(fbx_node))
							data.nodes.append(fbx_node);
					}
				}
			}
			property = fbx_node->GetNextProperty(property);
		}
	}

	int num_children = fbx_node->GetChildCount();
	for (int i = 0; i < num_children; ++i)
		process_animations(fbx_node->GetChild(i));
}

After that you need to rebuild a plugin on your side as described in that article: https://developer.unigine.com/en/docs/2.7.2/code/cpp/plugins/fbximporter/

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to post

Thanks for quick fix, we will try and let you know.

Link to post

Hi,

it's help and now it import right number of bones.

Thanks

Honya

Edited by honya
Link to post
  • silent changed the title to [SOLVED] Import animation without mesh triple bones from fbx