How to create material with parameters? (more info inside)

I want to create two colored material which will be split in half, one half of color A and bottom of color B and I want to be able to change those colors from the details panel.
here is an example of what I want to do:

I want to create room, then apply this material to the walls and then change colors so each room will have different combination.
is it even possible to do it with material only? or I have to use blueprint?

Thank you!

My current way of doing this is to bring it in via my model being split into two faces like in your picture above.

Then when placing it in game I just drop the two separate materials onto it.

I hope you get told a better solution so I can steal it! :slight_smile:

You can use masks (black and white textures) to do this. Download the RealisticRendering project from marketplace and take a look at its materials, most of them are made with this technique. This is nice to save resources for games (since you’ll have just one material for the whole wall instead of two or more), but I don’t think it’s worth the extra trouble for architectural viz.

In my opinion, the best way to do this in your case is to assign different material IDs to each group of faces that you wan’t to receive different colors (do this in before import the mesh). Then you create a material with a Vector Parameter for the Diffuse color and create two instances from that material. Assign each instance to each part of the wall and you can easily change the colors in real time.