In this video I discuss one way that you can change material colors dynamically during game play in ue4. This technique comes in handy for architectural visualization (arch viz) projects where you want to interactively change the look and feel of a room or building.
This technique makes use of material parameter collections. I set up a material parameter collection full of color values, and one parameter collection with parameter called cab color. This second parameter is also plugged into the material I am trying to change as its base color. Because the material base color is set to equal that parameter in my collection, changing the value of the parameter changes the color of the material. The video will explain from there.
This is an easier way to adjust materials in real time (if all you need to change is the color) than setting up an array of different materials to toggle through.
The technique in the video also makes use of a custom input I set up. It is just an input called changeCabColor and it is mapped to be triggered when I hit a button on my keyboard.
0 Comments