Decal edges?
Oso3D
Posts: 15,088
in The Commons
So I'm experimenting with trying to have 'elevation' elements using Iray decals. Using a simple vertical gradient so it goes from 'decal is showing' to 'decal is not showing' and voila, peaks!
Eeeeexcept there is still a visible edge on the bottom of the decal, which shouldn't be visible. I can work around that by making the decal encompass the whole thing and shrinking the gradient to one part of it, but that's... messy. Anyone know what gives?

Comments
Oh, er, visual:
Now I have to hunt down what a decal is and what it does.....
Do you have a transparency map on it? Maybe your height gradient can function for that? Purely speculation here based on the picture.
I don't know how iray decals work. However I recently had a similar problem with a 3DL material, it looked like it was off by a pixel with the very bottom line of pixels appearing on the top, and a workaround appeared to be to adjust the vertical tiling just a hair. Any chance there is something similar to that that could be done?
The mask is done in Cutout Opacity with LIE. So the lower section SHOULD be just a flat-black layer, without any image on it, and then a section of gradient overlaid on top. I have no idea why it would result like that.
Eh. Guess I'll go with plan B, which is make the decal cover the entire range and then just put the gradient at the top.
Short form:
Decal is a special layer that acts 'sprayed on' to the underlying geometry. Any cutout opacity reveals the surface underneath. It's good for 'painting' on wounds, posters, rust stains, whatever.
What's interesting about decals is that they use a projection map, not UV map. You can choose from several different projection styles, change the direction it's projected from, etc. The 'size' of the decal (scale) governs roughly what part of the object is affected by the decal.
In this case, I'm essentially spraying from both sides with a vertical cutout, creating a gradiant from full opacity at the top to the underlying surface at the bottom. Normally this would look weird with most textures, all stretched out and projected over the landscape.
But my shader can use Perlin noise, which ignores UV map ... so wherever the surface is showing, it looks normal.
Clever! ... assuming I can get it to work right.
You can also layer decals, so I may try another with a shit from snow to rock to trees.
Often with decals transparency needs a little color boost to avoid haloing, you're probably familiar. (it's common to see in games like plants with black or white fringes like your pic.)
So in your case, is the projection being laid on top of a white background? I don't quite understand your setup/steps in the creation of the decal image, I can't say from looking if this is a render problem or texture problem. I guess for troubleshooting, try a more basic decal like a total solid color and a smiley face or whatever as the mask to see if the edges still do this.
One of those "projection styles", is "UV-Mapped"... So, you CAN have it UV-Mapped as a projection, if desired. (Great for full-body tans, freckles, body hair, scars, bruises, and even for secondary bumps and normals that can be "turned-off/on", easily, as desired.)
Throttle: The underlying surface is the green hills you see below the white. There is a vertical gradient for cutout opacity. I've tweaked it a few times, but the edge remains. Now I have it tweaked so it covers the entire object and the edge isn't visible, which isn't exactly what I wanted, but it works out.