Jump to content

[SOLVED] Import animation without mesh triple bones from fbx


photo

Recommended Posts

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 comment
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 comment

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 comment

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 comment
  • silent changed the title to [SOLVED] Import animation without mesh triple bones from fbx
×
×
  • Create New...