Hi! I am a noob with UE4 but I got an idea stuck in my head and wanted to see if it was possible. My goal is to create a Creature Creator where the user cycles through markings and can add at least one marking on top of the base material and then change the colour of that marking. i.e. giving the creature stripes and colouring them blue or red or whatever
So I dug into layered materials using 4.29 and used this video as a basis:
https://www.youtube.com/watch?v=UZghyZLzRyM After implementing this, within the editor I could add multiple layers and use masks to blend together layers of markings and I had the ability to swap out the mask meaning I could have different styles of markings. (Please ignore the fact that this is an unwrapped group of spheres to test stuff!)
But as this is a creature creator, I would like the user to be able to alter these parameters via button clicks/sliders. I understand the basics of setting up a UI and using a blueprint to do something when the button is clicked but I have no idea how to access these parameters and how to set new values. Setting up a basic UI menu in engine I get this:
And ideally when the user presses Marking_1 it will cycle through the different masks of markings. Then Marking_2 would add or switch on a new layer in the Layered materials and start cycling through the same masks.
I had also tried the method of using MatLayerBlend_TenLayerBlend but again I don't know how to access these parameters in blueprints.
Or am I going about this the wrong way and I shouldn't be using layered materials at all? I had initially thought about using decals but as these markings are all over the model it didn't seem appropriate.
Sorry for the noob question, it's just been annoying me all day!
Replies
You can use a material parameter collection for to set/select colors from blueprints.
Switching textures out is probably best done by swapping material instances on the object - eg. to choose different markings, you swap the material which iirc is fairly straightforward in a blueprint.