Can I use splat maps to mix RGB colors?

Hello,

I’m building a strategy game in which I’d like different areas of the landscape to be displayed in different colors, to denote what “nation” those areas belong to. I’d like to have ~12 different colors, so if I made each one a different splat texture, that would be 3 render passes. Instead, what I’d like to do is use just three splat textures: a red, a green, and a blue texture, and mix them at each landscape location to produce whatever arbitrary RGB color that I want. My question is, does splat texture mixing work additively so that it will successfully produce color mixes? What happens if the splat values don’t add up to 1? For example, to get a near-white combination, they would need to add up to ~3, and to get black they’d need to add up to ~0. Has anyone tried producing arbitrary colored landscape in this way? Or is there a better way?

UPDATE:

I’ve implemented this, and found that it works fine so long as the red, green and blue splat values sum to no more than 1. They can sum to less than 1, and I get a dark combined color, as expected. However summing to > 1 causes unpredictable results, sometimes darker than expected, sometimes the wrong color. This means that I can’t create bright combined colors. For example, I can create bright red using splat values [R:1.0, G:0.0, B:0.0]. But if I try to create white using these values: [R:1.0, G:1.0, B:1.0] I get poor results (in my tests, I got blue with a white outline). If I lower all of the splat values so that they sum to 1 [R:0.33, G:0.33, B:0.33] then I get dark grey, as I would expect. In conclusion, because the sum of splat values cannot exceed 1, this technique is very limited in that it doesn’t allow for bright combined colors. It’s like mixing a color where R,G and B together can sum to no more than 255.

Has anyone else tried to do dynamic color mixing on terrain like this? Any suggestions for how it could be done?

-Mike

I’ve tested this again with Unity 5, and it now works correctly!