Non destructive workflow when editing materials

Hello to everyone,

I am just starting to scratch the surface of UE, using it specifically for animating and filmmaking. I have a question to ask, and I think the best way to describe it is using an example.

I have a static mesh in my content folder, which is the flag of England. In my project I need a French flag, so I edit the material and re-texture the mesh.

The problem, however, is that the edit I made is permanent. My static mesh from now on will always have the French flag as it’s texture, and if I use it in another project, where I would need the English flag, I will have to go and re-texture it back to it’s original state.

So the question is: Is there a way to keep the default materials of meshes as they are, and work in a non-destructive way?

I know that I could duplicate the asset and work with that, leaving the original in its default settings, but that would end up taking so much space drive. So I am trying to avoid that.

Is there a solution I am missing? Any input is welcome. Thank you!

Hi @Lamias13!

If you have a base material and want to make subsequent materials from it, the best way to do so will actually be material instances. Here is the documentation on how to create and use them:

Creating and Using Material instances

By using material instances, you can change the overall look of of your materials without needing constant recompilation and can improve performance. Here are the docs for instanced materials for an overview of what they can do:

Instanced Materials

3 Likes

If the actual flag mesh is the same for each flag, couldn’t you just create a flag material which has a texture parameter, and when you need to have a different texture for the flag you could override that texture using a material instance.

More about material instances here: WTF Is? A Material Instance in Unreal Engine 4 - YouTube

3 Likes

lol, I was just replying about the same thing :laughing:

1 Like

I think I get it. I would create an instance of that material, apply it on the mesh and edit the instance. Then (in another project) I can use the original flag, becase nothing changed in the original material. I hope I understand this correctly.

Quick follow up question: When I heavily edit a material instance with many parameters, and then I decide I want to revert all the changes to their default values, the only way to do that is to click every little white arrow on the right of each parameter? Or is there another, faster way?

Thanks!

Yes @Lamias13, you understood it correctly!

And for your question about resetting every material parameter to the default value: The fastest way is probably to create another Material Instance, and replace delete the old one using the newly created Material Instance as the asset to replace the old ones with. :wink:

1 Like

Thank you very much for the detailed replies.

Both of you solved my issue. Can I pick both posts as the solution? Sorry, I am new to the forums.

2 Likes

Sadly this forum doesn’t support marking multiple replies as the solution (as far as I know at least), so I think your best bet is to go to random.org, and randomize a number between two values and decide that way whose post gets marked as the solution :grin:

1 Like

Well, you both answered at the same time, and you also came back to my post and answered my follow up question as well.

With gratitude to Quetzalcodename, I believe it’s fair to mark yours as the solution.

Thanks to both of you.

2 Likes