Download

Altering material domain for hundreds of materials at once

I have many hundreds (567 to be precise) materials for which I need to alter their material domain.

For an individual material this involves:

  1. Double clicking on it to open it in the editor
  2. Choosing ‘User Interface’ from the drop-down menu next to Material Domain
  3. Connecting the Texture Sample output to the Final Color input in the graph

What I’m wondering is if there is any way to automate / script this process.

Since my computer is a bit clunky, it’s not the smoothest process to do, and it takes around 20 seconds to do each one. Doesn’t sound like much, but adds up to around 3 hours!
**
Please, please tell me there’s a way around having to do that for 3 hours!**

Nope?

OK. Putting on Rick and Morty and just blazing my way through the monotony of it all.

The preferred way to handle large numbers of materials is to use master materials and instance the other materials from it. That doesn’t help you much at this point though, as you can’t really do that retroactively.

Ah, I did try that approach actually. Unless I’m mistaken though, it doesn’t work so we’ll for video materials. In order to do that, I would need to be able to parametize the video texture on the material instance, so that I could dynamically change it, but when I tried to do that it was just giving me errors (I’m not on my computer so can’t pull up the exact error).
Any idea why that’s the case?

Movie textures and texture parameters do not seems to mix indeed. Seems like there should be a custom parameter version like there is for cubemaps, but I guess that has not been implemented yet. That’s a bit of a bummer, although it might just be an oversight as it is not often that you need such a large number of movie textures. I guess you could either dive into the code yourself or get the attention from someone from Epic to find out why that wasn’t implemented.

Just out of curiosity, what kind of UI are you building that needs 567 movie textures?