GUI Material with smooth outliner/border effect

MaxPower42
Wed, 17 Oct 2018 15:58:11 +0000
UI

Please help a math cripple in need

I want to make a material function that returns a value between 0…Max…1 depending on UV value and some other variables.

I’m pretty sure I could figure out, if I had the power of code at my disposal, but the material editor lacks even the most basic bool-operations and I quickly lose track of what I’m doing when I start putting "if"s together and whatnot.

I think it’s best explained with pictures. 0 is the outer edge where the border should fade out completely. 1 is the alpha at the center (factor 1, so it doesnt change from the brush). Max is the boost-factor that gets applied at the core of the border.

I want to make this a material function, so I can easily re-use it and modify it to work with colors instead of alpha etc.

On the second picture, I don’t really know what I’m doing anymore, but the first should make a lot of sense…

5 posts - 1 participant