What I’m trying to do is have the player look at a painting which could be a normal family portrait but then a little later in the game to change to a slightly different version of that family portrait. Maybe with blood on their faces. I’m not trying to figure out how to create the matrial but the process of replacing it. Would it be better to destroy the painting and spawn a different version in the same spot or is there a way to use blueprints to swap out the textures in the same material using a bool and an if statement?
I’d use one material, but have a parameter value that you adjust via the blueprint.
This tutorial is close to what you need, http://www.luchadordev.com/tutorials/UE4/UE4Tut_RandomColorMat.html
But instead of using a parameter to control the color, use the partner to lerp between the 2 versions of the texture, using a 0 or 1 value.
With this you could take it to the next level by having the painting slowly change when the player isn’t directly looking, or you could make the material look like it’s slowly starting to bleed, but change it back to normal when they look directly back at it, or stop moving the camera. Just by controlling that parameter value and doing some material tricks.
You can use a dynamic material with a parameter - the most straightforward approach, just replace the texture. Or you can use a IF, or you can use Lerp.
Thats perfect thanks