[5.7 Preview] FBX Materials getting imported as instances instead of "standalone" materials

  1. Open Blender (or any DCC of choice, im not sure if it matters in that case, all is needed is a FBX file containing mesh with assigned texture)
  2. Create any kind of primitive mesh (like UV Sphere), create a new material and assign an image texture to it
  3. Export FBX file
  4. Import FBX file in UE 5.7 Preview via Interchange by drag and dropping into the content browser

Despite “Material Import” setting set to “Import as Materials”, and not to “Import as Material Instances” the materials are getting imported as instances of “PhongSurfaceMaterial” master material from the Interchange Framework content. I have checked and this doesnt happen in the latest stable 5.6 version of UE.

2 Likes

Hello @e36 thank you for the report and appologies for the disruption.

We are aware of it and in 5.8 the option will be removed altogether. As of now FBX import only generates Material Instances in a similar way to glTF. We are aware the UI is thus misleading but the 5.7 remaining timeline did not allow to get it done for 5.7 release.

We also noticed some visual differences between the Material import from 5.6 and Material Instances imports in 5.7, work is being done to close the gap for 5.7 release.

Apart from the misleading/broken UI, do you require the creation of Materials when you import FBX? If yes could you explain that process?

This bug comes from the current work done to move FBX import process to rely exclusively on Material Instances. This work is done because materials defined in FBX can be expressed using instance of a single master material and it is more performant to use Material Instance than independent Materials.

You can still rely on automatic material replacement during import, so that UE searches for material among the assets in your content folder. You can also make custom pipeline to change the Material Instance that UE will use to generate the material when importing the FBX.

Thanks for the comprehensive reply. So if i understand correctly, the ability to choose between independent materials and creating material instances upon import will be removed and will be set to creating material instances by default?

Can you provide any learning resources or documentation on how to prepare such “Master Material” for such material instances for FBX import interchange (or format like GLTF), in particular what nodes are supported and how to make them being recognized in the material graph on import (so that base color texture from FBX file goes into the base color texture sample inside the graph etc.)? I have once tried making one but i wasnt entirely sure to what extent the material translation is implemented.

I was previously looking for various means to interchange content from Blender like materials or meshes already (for example batch importing static meshes with various material types) and i couldnt settle on anything specific due to lack of documentation on such things along with my lack of knowledge which format is best for what, let it be FBX or GLTF or any other one.

I’m using uefn and cant import anything because of this! I just want to make my game what can i do? other than create 100’s of materials?

The main reason to switch to material instances is actually to reduce the number of material that are created. Many materials will eat away your UEFN publishing memory budget. There is no point to have 100 materials if the difference is only basecolor, or roughness value etc. In short most situation can be covered with one for opaque materials, one for masked and one for transparent materials.

Workarounds will depend on your context, why do you need materials and not material instances?

If you do not like the current master material used to generate material instance, you can make your own, and in the import window select import as material instance and put your own as parent material. If you name your material parameters in a specific way, the editor will generate instance of your material but using the values from the FBX material description.

@UE_FlavienP When importing FBX in 5.7.0, if you set your own master material to be used as parent, it still creates material instances with the FBXLegacyPhongSurfaceMaterial as the parent instead.

A feature request; if you don’t use ‘combine meshes‘ it creates several meshes called Mesh1, Mesh2 etc. Would be nice if it would use the base name of the object and add a mesh1, mesh2 etc to the name instead. At the moment, if you import several fbx objects into the same folder without combine meshes, you will probable overwrite some objects. This could be prevented if they were imported as Walls_mesh1, Walls_mesh2, Roof_mesh1, Roof_mesh2 etc.

Edit: also, if you enable ‘generate lightmap uvs‘ it sets a value for the ‘min lightmap resolution’ in the build settings but leaves the ‘lightmap resolution‘ in the general settings to a value of 4. It would be nice if that one was at least the same value as the min lightmap resolution.

What if those 100 Materials don’t use the same basecolor? I’m completely dumbfounded importing as Instances is going to be made default without (if I’m reading this correctly) the inability to import as just a Material. This will skyrocket the time it takes for me to import anything with materials and will force me to create all materials from scratch in Unreal now. I am so tired of every new update to every program ever ruining things that worked perfectly fine for over a decade. I have thousands of materials and now whenever I import a model that uses my existing materials in Unreal it just imports Material Instance copies with all the wrongs settings. This change is enough to ruin my entire project.

2 Likes

In that case the editor should create 100 material instances, all using the same parent material but with a specific value on the basecolor.

In short, the editor has a preset of materials for opaque, masked, translucent material types. When you import an fbx it will select the preset based on the type of material and then assign the material parameters from fbx on the material.

That also works with custom materials: if you force the editor to import materials using a custom parent material, the editor will also apply the basecolor and other parameters. The only requirement is that your parent material uses material parameters with the appropriate names. You can have a look at how FBXLegacyPhongSurfaceMaterial or PhongSurfaceMaterial are made.

Here is a non exhaustive list of material parameters the editor will fill, based on FBX file content, on any material instance for FBX import.

AmbientColor, AmbientColorMap, AmbientColorMapWeight

DiffuseColor, DiffuseColorMap, DiffuseColorMapWeight

SpecularColor, SpecularColorMap, SpecularColorMapWeight

EmissiveColor, EmissiveColorMap, EmissiveColorMapWeight

Shininess, ShininessMap, ShininessMapWeight

Opacity, OpacityMap, OpacityMapWeight

OpacityMask, OpacityMaskMap

etc.

Who thought this was a good idea??? This is just terrible.
I’m working on a film project, and I need absolute, complete control over the materials.
No, I don’t want to use your simplified Phong materials, I need an empty graph.
My materials are not just a few textures with a couple of adjustments, my materials are big graphs with world aligned textures, multiple material sets, custom functions, and RVT nodes. How am I supposed to do that with your simple FBX materials?
I don’t care what you think is good, this is not what I need for my project. Why are you deciding these things for us?
I’ve spent all day trying to get this to work correctly by making a custom interchange pipeline, and I just could not get it to work. What an absolute waste of my time spent on absolutely nothing. I just cannot afford to spend more time fixing everything in UE that doesn’t work the way it should.
This is just a massive obstacle for me right now. Seriously, you need to tell us how to disable this.

You can prepare your master material using the material parameters mentioned above, which will be filled upon import depending on your FBX file contents and according to your master material

If you want the legacy workflow just deactivate interchange, Interchange.FeatureFlags.Import.FBX False.

The only difference between Legacy and Interchange is one can give you a Master Material. However it is still not fit to purpose since you seem to be either replacing the Material assignment with your custom material or copying a full graph from your custom material into the generated one…

Our goal is not to force everyone to use “our” Material Instances or even Material Instances in general. It is for the average user to get optimal material from scratch. If you are an advanced user with custom materials, at the end of the day, Material or Material instance, you are replacing generated materials with your custom ones.

And as Malakser said you can have your custom master material that is filled automatically with what is read in the FBX.

One thing I think the new interchange missing is Material Override Base Path. I used this function a lot. I create a share material folder and set different fbx import to that path.

@kkqqpp

Can you share more info on this feature? You share materials in several projects?

probably should have made it where default instances that are imported in dont look like garbage. Just something else to hold people back.

Again, if you really liked the legacy look and feel, deactivate interchange for FBX.

There is still one main difference on 5.7.1, material instance vs legacy material, where ambient occlusion is at 0 and material looks dark in the shadow. This will be fixed in 5.7.2. Apart from that comparison tests were made to make sure materials are as similar as possible in their look. There might be some difference but they should not be that noticeable. If it is the case, something slipped past the tests, and please share screenshots and files.

If you want artistic control over your materials you would not use the one generated by UE in the first place, instance or master.

And if you care about how materials transfer between your DCC and UE, you should not use FBX and its blinn-phong material representation: you should use glTF or USD.