Afrodite-Ohki opened this issue on Mar 31, 2023 ยท 2000 posts
Thalek posted Fri, 26 May 2023 at 12:55 AM
I cannot remember if I ever posted my final version of the Material Layers overlay I decided upon or not. It went from elegantly simple to somewhat complex to elegantly simple again, with the aid of @Richard60's logic nodes. So, while I wait for a demo image to render, here is what I discovered about creating tattoos or "decals".
On the PhysicalSurface root node, Color is set to white, Transparency is set to 1.0, TransparencyMode is set to Transparent, and Roughness is set to 1.0.
The image map node is absolutely normal. Load in your compatible tattoo image on a white background, and plug it into Color.
The magic happens in the Cycles/Conversion/Math node. This is a binary comparator, with the image map also plugged into Value1, the threshold is controlled by Value 2 and is usually set to 0.5, and Value 3 is 0.0. The math operation is set to Greater Than. This creates our transparency map even with colored images.
In the Greater Than operation, it's a comparator. It outputs, for each pixel, either a 1 (pure white) or a 0 (pure black). This is necessary, because any black that is not 0,0,0 in its RGB components makes the image slightly transparent, and even blacks in the tattoo image come out a dark brown instead. The threshold value in Value 2 controls how aggressive the box is at converting the image into a texture map. Any image pixel in the image map that is greater than the threshold gets forced to pure white. Any pixel that is equal to or below the threshold gets forced to pure black and becomes part of the transparency mask.
The reason for adding a threshold control is that a lot of tattoo art contains colors, some of them pastels or light greys. If you want them to show up, you need to set the threshold higher so that those parts of the tattoo DO NOT become transparent, as they would normally. (Some of the tattoos I "converted" had greys so light, I didn't see them because they looked white. Assuming that the artist wanted them visible, even though I couldn't originally see they were there, I cranked the threshold up. And some had pastel colors, which made it easier to tell that parts of the tattoo had gone missing.)
The only flaw to this method is if you need the edges of the mask to be softer or blurrier; this technique results in sharp edges. If you have a way of processing the image that will soften and blur the edges using only black, that would work. Anti-aliasing, which would create shades of grey, won't work.
And the jet engine whine of my fans appears to have quit, so my render is now available. After all, it's supposed to be mostly about rendering in Poser 13. (Everyone get their notice that a new update has been posted?)
The outfit was intended as a compromise between maximum available skin to show tattoos, and still preserve a modicum of modesty. Using multiple material layer overlays, I added about thirteen tattoos to the sides we could see, without a single line of Python code. The tattoos can even overlap if that is desirable for some reason. Make certain that the one you want most visible in that area is the last tattoo you install; lower layers can be seen with some difficulty through the upper layers, according to the experiments I've done so far.