'),o.close()}(); /*]]>*/

Developing a thermography shader #3

By September 23, 2016 June 30th, 2017 Development, 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…

mistake

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:

thermo1

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:

animation_heat

And here’s the shader:¬†carrots heatmapshader

thermo_shader

Cheers, have a nice weekend!

Patrick

patrick

About patrick

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

Leave a Reply