FBX Import: Material names are truncated when using the _skin## suffix

Unreal truncates the imported material names when using the _skin## suffix to set which slot they will get assigned to in the mesh.

Steps:
Import the attached FBX file (make sure Import Materials is checked), this is a cube with two materials; UpperSection_skin00 and LowerSection_skin01.

Unreal creates two materials named “LowerS” and “UpperS”, they should be “LowerSection” and “UpperSection”.

Load the FBX into MODO or Maya, the material names are correct.

Thanks.

link text

FbxMaterialImport.cpp
GetFullMaterialName

Should be:
MaterialFullName = MaterialFullName.Left(Offset);

Instead of:
MaterialFullName = MaterialFullName.LeftChop(Offset + 1);

Is there a different/better way of setting the material order please?

Thanks!

Hi mrtb,

I’ve entered a request for this to be considered. There may be a specific reason this was set up this way that I’m not aware.

You can follow the status of the ticket here: Unreal Engine Issues and Bug Tracker (UE-34243)

Thank you!

Great, thanks .
Pretty sure it shouldn’t be doing that, I guess most people must be importing without materials from the FBX and assigning materials made in UE4!

Just had a look at the ticket and see that it’s flagged as a new feature, pretty sure it’s a bug!

Hey, I’ve messaged an engineer who may know why this is. To me, it seemed since it was a deliberate choice to chop the text that there may be reason behind it to make it more in line with a feature request. Once I hear back I’ll let you know and chance the status of the ticket as needed.

Update: After speaking with an engineer, he said this is actually part of the material refactor work he is doing. He didn’t say specifically which version this was targeted, but I would assume this is for a 4.14 target. I asked for clarification, but he’s currently out of vacation so I’m not sure exactly when I’ll hear back.

Hello , thanks for the quick reply.

If this is being re-worked for 4.14 it would still be great to get a fix for it in 4.13

BTW the comment above the line in question is:

“// remove the ‘_skinXX’ suffix from the material name”

So the intention from the comment would be that “UpperSection_skin00” is changed to “UpperSection”, not “UpperS” :slight_smile: