Am I able to change a Material Instance in Blueprint without setting a MID node in every construction script?

Hello,

I’m currently working on an Architectural Visualization project, and the idea is to add functionality into the homes that are being built. What I currently have now is the First Person Character with a simple HUD that will display the object that you’re looking at, which is cool. Furthermore, we should be able to switch out the materials (or parameters of applied materials) assigned to what you’re looking at… or so that’s the plan anyways.

What I’ve tried so far is to make a Material Parameter Collection that controlled a Scalar Parameter that was hooked up to a LERP in the Master Material and reference that in the Blueprint; which worked for switching between 2 different types of values! But it dawned on me that if we had more than 2 sets of values in this Master Material, it would quickly become a mess, and the material would end up being gigantic and eventually more difficult to work with than needed.

So after that, I thought I’d try MID’s. I attached a picture with what I’ve tried. I get that it’s creating a new Material Instance Dynamic upon Right Mouse Button! What I’m trying to accomplish with it is to have the values change on the MID param “Roughness” upon click. I followed the tutorials that Zak Parrish did about setting up MID’s, which was very helpful, but if I have a home with 500 objects in it, I don’t want to make every item a separate blueprint with a constructor script describing the MID set on it. I have a single line cast that stores whatever object it’s hitting, but creating a new MID node doesn’t like that input.

I’m just curious if there’s any other option for going about this. Or, if there’s a certain methodology that I’m missing? I’ve looked through the forums and answer hub so any help, or feedback, or even tips are appreciated!

alt text

I am thinking you could make a parent class blueprint with the change event that you have working then children all your items from it.

You can check the parent blueprint usage in the content examples sample.

Hey, thanks for your answer! But I’m not too sure what you mean. I’ve perused through all of the content examples and I couldn’t find what you were talking about.