Forum: Poser - OFFICIAL


Subject: Peeled, Painted worn , old Metal Shader/Material

TheAnimaGemini opened this issue on Oct 22, 2014 ยท 43 posts


bagginsbill posted Thu, 23 October 2014 at 8:26 AM

I want a variable, edge, that will represent how close I am to the nearest edge. Since my mapping in U is 0 to 1, then the nearest edge distinace is Min(U, 1-U). The same for V - I can use Min(V, 1-V).

However, my door is taller than it is wide. The size of one U is much less than one V. So I will adjust the V scale with a multiplier. By experiment I found that 2.5 was good.

I use an outer multiplier, k, to control the sensitivity of being close to the edge, and I invert the whole thing at the end because I want the value 1 to mean we are at the edge, and 0 to mean we are far from the edge.

The render shows the edge map. I will make my rust intensity map (RIM) from that.

k = 3
eu = Clamp(k * Min(U, 1-U))
ev = Clamp(2.5 * k * Min(V, 1-V))
edge = 1 - Min(eu, ev)
View(edge)

Notice the diagonal line where eu and ev intersect at the corners. If that isn't 45 degrees, you need to adjust the ratio. (Again - mine was 2.5)


Renderosity forum reply notifications are wonky. If I read a follow-up in a thread, but I don't myself reply, then notifications no longer happen AT ALL on that thread. So if I seem to be ignoring a question, that's why. (Updated September 23, 2019)