Convert material to material instance.

Is there a simple way to convert material into instanced material?

I know I can just create new material instance and assign it to object, but I’d rather replace existing material straightaway, so the new material instance keeps original name and all objects that were using original material will be using new material instance.

A material instance requires a master material. Think of it as just settings for the real material. In that sense, it can’t replace the master material.

That’s not what I asked.

In content browser, I want to replace material with material instance that refers to some other material. Without first creating material instance than manually dragging it to mesh(or meshes) that use original material.

You could create Blutility that performs SetMaterial for all selected objects.
It’s usually easier to set default material of staticMesh and never editing the instances. This way all instances of that assets updates their properties at once.

You can either select one of the meshes in question, then richtclick and choose “Select with same material” from the Selection submenu.

Or, you can use the property matrix for that. Simply select all your meshes in there and edit the material property for all at once…
More info: https://docs.unrealengine.com/latest/INT/Engine/UI/PropertyMatrix/index.html

I wasn’t talking about replacing materials on instances (i.e. objects in the scene). I meant situation when same material in content browser can be used by multiple meshes.

Wouldn’t that cause problems if mesh has more than one material? Unreal engine supports that, and that’s the main reason why I want to replace material with instance instead of manually assigning instance to meshes.

Could you replace all references? That is the menu that pops up when you try to delete something that is still used in somewhere.

That works, but not on character/skeletal meshes.

Trying to do this when mesh was referenced from character mesh filled all material slots on the skeletal mesh with “None”.

I guess this is good enough for most of the level.

Unsubscribing from the thread.

Replace references should not cause any material references to become none, since it should leave behind redirectors that tell any unloaded content where to find the new references. These will show up as 0 or 1k files in the directory of the same name as the replaced assets.

Are you able to reproduce the issue where replacing references causing references to be lost?

No, I’m unable to reproduce the issue. However, I’m fairly certain that 1st time I tried to do that, I had all materials reset to “None” on skeletal model.

First time I did that I was merging automatically generated fbx materials on skeletal mesh into MaterialInstances. When I opened model in mesh editor after that, it had material set to “none” for every element. Said model was displaying fine before that. I also did not have this kind of issue on static meshes or on model that had materials manually reassigned in the past.