Material assignment error on USD import

When importing a USD file some of the meshes gets the wrong materials assigned. I have looked in the .usda file and the material relationship looks ok there. I have also imported the same USD file in Houdini and the material assignment is ok there aswell. What can be the issue here?

I also would like the option when importing .usd files to disable the prefix “MI_” and the suffix “_1_TwoSided”. I would prefer to keep the material name as it is in the usd file. If we could get an option to disable this it would be awesome!

Best regards,

Johan

[Attachment Removed]

Steps to Reproduce
In unreal 5.7.4 import the “Material_Sample_574.usd” file (import into level) and inspect the material assignment. Each mesh should have a material with the same name as the mesh. Some of the meshes gets the wrong material assigned. I have provided an image that describe the issue “material_name_issue.jpg”. I have also provided an .fbx file for reference.

I have also listed which meshes that gets the wrong material. see “name_info.txt”

[Attachment Removed]

Hi Johan,

So there are 3 issues here:

1) The USD importer will try to minimize the number of assets and reuse them if their data are the same. You can turn off this behavior through the “Share Assets for Identical Prims” setting under the “USD Options” section;

2) In UE, it is the material that is double-sided while in USD it’s the mesh. So to support single- and double-sidedness, UE creates 2 material instances: one standard, single-sided material that uses the USD material name and a double-sided material with the _TwoSided suffix appended to the USD material name to differentiate from the former. So this suffix can’t be turned off. However, if the mesh doesn’t need to be 2-sided, you can turn that off and UE will apply the singled-sided material to it;

3) For the prefix in the asset name, if you can modify and compile UE yourself, then you can control the prefixes from UsdUnreal::ObjectUtils::GetPrefixedAssetName in USDObjectUtils.cpp. For the material prefixes, look for

else if (AssetClass->IsChildOf(UMaterialInterface::StaticClass()))

It is unlikely we’ll add an option for this soon but I’ll log a jira to track this issue.

Best regards,

Anousack

[Attachment Removed]

Hi Anousack,

Thank you for the information!

Best Regards,

Johan

[Attachment Removed]

Hi Anousack,

Is it possible during import to force a mesh to be single sided or is that only controlled by the USD property:

uniform bool doubleSided = 1

Best Regards,

Johan

[Attachment Removed]

Hi Johan,

Anousack is on vacations. Back beginning of April.

He will answer you when he is back.

Thanks for your patience.

Regards,

Jean-Luc

[Attachment Removed]

Hi Johan,

The single/double sided property is applied on all imported materials.

Currently, there is no way to change that property on a per static mesh basis.

Regards,

Jean-Luc

[Attachment Removed]