FBX Import Level node rotation bug under rare circumstances


When importing a fbx map will lights and some nodes that doesn’t have attribute, I found out that a node that doesn’t have an attribute, gets rotated around 90° yaw if the node before it was a light.

I had to debug the engine and found out that the potential issue is in the file “Engine\Source\Editor\UnrealEd\Private\Fbx\FbxMainImport.cpp” in functionFFbxImporter::TraverseHierarchyNodeRecursively. The issue is that ChildInfo.AttributeUniqueId is not initialized, causing it to get a value that was previously on the stack if the node doesn’t have an attribute. For UE developers, the fix is to simply add ChildInfo.AttributeUniqueId = ChildInfo.UniqueId when the node doesn’t have an attribute.

I have checked and the bug is still present on UE 4.13 preview.

Can you please provide detailed repro steps from your modeling program to UE4?

Also, is this any mesh or only Skeletal/Static that are affected?
Does modeling program matter, or have you tested with multiple programs, or FBX versions (ie. 2013, 2014/2015, 2016)?

Thank you!


Unfortunately, I generate FBX files through C++ code, I haven’t found a way to reproduce this bug in 3ds max, I use FBX2016, so this affects other versions aswell. You can reproduce this through code by creating a light node and another node without setting to this one an attribute, adding the light first then the other node to the scene.

I have attached a FBX that reproduces this bug by using the Import Level feature in UE. The scene consists of one light, 2 nodes without an attribute and a node with a FbxNull attribute that is used avoid this bug.

When asking the question I didn’t know about FbxNull, as it solved my issue since. However, people may encounter this rare bug if they use custom tools.

Thanks for the clarification. I’ve added a ticket for this issue.

You can track the status here: Unreal Engine Issues and Bug Tracker (UE-34410)

Thank you!


Has this been fixed? With UE 4.21, whenever I try to import any FBX by “Import Into Level” with an option “Individual level Actors”, all actors imported have been rotated 90 degrees in X.