Hello again, it’s a meeeee Thermo-Man 😛
I made a mistake! I assumed, the shader creation would be easy, that i just have to calculate the distance from a BattleBlock center to its extends and map a nice color onto it. And boy, it was easy and fast. But then i realised, that this will work only for more or less cubic blocks. But what’s with the other blocks? Like laserguns with their 3×1 layout? My shader didn’t really handle that very well…
So my next idea was to generate a kind of heatmap for each block. I went into 3dsmax and used a combination of AO Baking with inverted normals and a little amount of manual vertex color painting. Mapped as before with a nice color gradient, the result looks like this:
An important part of the whole shader is, that the player can easily tell which block is hotter than others. So i implemented a little value crop/remap feature into the shader, which makes sure only a distinct color range (+-20%) is shown on one block. Here’s how it looks, if i enter heat values from 0 to 1:
And here’s the shader: carrots heatmapshader
Cheers, have a nice weekend!