Multicolor material - changing color and areas at runtime

See image - trying to make a multicolor material like this (ignore the family pics - this is from Inside Out btw)

I’m fairly new to unreal concepts. I want the colors and area of each of color can be changed during RUNTIME according to game events, such as a collision will cause the area around the hit point to change color.

More generically, I’d like to understand how to parameterize the colors and their areas. Thanks!

Technically you can have a material that changes depending on which part of the mesh it’s covering, but you’d have to know quite a lot of material coding to get that working, and you’d have to code it specifically for the mesh and situation you’re dealing with.

The more typical way of doing this sort of thing would be to set the mesh up with UVs that tell it where to apply various materials. So, in fact, there would be a number of different material slots involved.

To setup that kind of thing you would do it in an external package like Blender or Maya etc.