I have about 400 textures that all need to have the same material graph, and I was wondering if there was a way to do that doesn’t involve copying and pasting the graph over and over again or having to create an instance for each texture individually from a master material?
Hey @Lopcario! Welcome to the forums!
Apologies, but I may be confused here. Do you need to use the SAME material 400 times? Because you can reuse them… What’s the use-case here? Can you give us some more information to go on? Try to be more specific- maybe some examples?
So I am trying to make many different materials that all have a Constant Texture Size when Scaling with the only difference being a different texture. My Issue is that I need to repeat that for each texture I have and I am unsure how to do that other than manually copying and pasting the material graph to each, or creating a master material and going through one by one creating material instance for each texture. basically I am asking if there is a more efficent way to do that.
Okay, so there IS- by way of an editor utility widget. You would put all of the additional textures in a file alone, then the widget would need to get all of the files in there, and foreach- create material instance, switch out the texture, and loop that for each thing in the folder.
Problem is- that’s really complicated, and is usually the job of a technical designer in a studio setting to create something like that. I’m not saying it would require intense C++ as I do think it could be done with blueprints- but yeah editor utility widgets are basically “Custom tool to do a custom job”.
This is pretty advanced stuff. But honestly- I’d go try to learn how to do it instead of brute forcing one by one. Because you never know how much of it will be useful knowledge to have later. Here’s some documentation to get you started!
Look into instanced materials, some tuts on YT.
Then either copy/paste names and create copies of that instanced material, yes annoying.
Or maybe you can find some tut about how to script some importer in python (python editor tools/scripting in unreal).
There was bulk edit tool at some point in unreal, however i am not sure if it can help as each name for texture would be different.
Generally do not use “HAX” way of coding in unreal, you fix small problem and around corner you create bigger one. Best way would be that python script.