'),o.close()}(); /*]]>*/ Skip to main content

Developing a thermography shader #3

By September 23, 2016June 30th, 2017Development, Heart of Scrap

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!



Co-Founder, Managing Director, 3D & UI Design

Leave a Reply