3dsMax -> Unreal Rotation Inconsistency

Hey there, I’m working on a tool to automate mesh export/import from Max to Unreal. I’m reading the transform data from an fbx and apply it to static mesh actors in Unreal.
Translation works fine but rotation is giving me all kinds of headaches.

This is what happens when I essentially copy the rotation values from max and paste them on a static mesh actor in Unreal.

I have tried swapping the values/ reading from different file formats/ manually matching the desired orientation and trying to find a relation between the data sets but I haven’t been able to figure it out.

Please do not hesitate to share any ideas, appreciate it.

Even if you use FbxAxisSystem to convert from what’s in the FBX to UE4’s axis system, it will NOT perform RHS->LHS conversion (max, maya are RHS, UE4 is LHS). UE4 during FBX import uses FbxAxisSystem to convert to it’s axis system but still RHS, and then does RHS->LHS manually with conversion functions (See the UnrealZUp.ConvertScene call in FbxMainImport.cpp and then the flipping functions in FbxUtilsImport.cpp for how UE4 does it)

Thanks for your input rajkosto. The direction you provided was helpful.
After looking into the things you mentioned and a bunch more research and trial & error the solution became quite apparent.
The simplest implementation of the conversion turned out to be flipping two rotation axes and one translation axis, therefore performing the axis system and handedness conversion.

Inverting pitch and yaw along with the y translation did the deed.