I am trying to model an abandoned hospital, and I’d like to have image-texture wallpaper, mixed with some grungy green/brown mold texture from noise, and on top of all that, I’d like a graffiti.
I get the graffiti showing okay on top of a procedural material, transparent and no box, but if I mix the proc and the wallpaper, placing the alpha-mapped PNG graffiti shows the edges of the image and it is not transparent.
Yeah, checking that you have a useful alpha channel is the first thing to do. Just plug it into an Emission shader and plug that into the Surface socket. If it’s all black (or all white), you don’t have an alpha channel.
Next, you must not use a Transparent shader here but a Diffuse one. The alpha channel used a mix factor will cut out everything that isn’t opaque. That’s how it works.
And an advice: Don’t mix Diffuse shaders like that! Mix the colors and use a single Diffuse shader. It will speed up the rendering by cutting ms for every pixel.
thats interesting Kaluura, what does the emission shader do? and how come you dont need the transparent shader? every tutorial on alpha images i have seen uses the transparent node!
I’ll be replicating this node tree for my materials library thanks
I am getting a little embarrassed here. I have a PSD file that has only one transparent layer in it, and I try to save for web with Transparency checked, and yet, it shows up black in the Emission.
@SmallTroll: Using an Emission shader is the best way to quickly view a texture (or any node output)… whatever the rest of the scene. That’s the reason.
And we don’t need any Transparent shader here because we don’t have to show anything transparent and because of the way we use the Alpha channel as factor. In the alpha channel, 0 means fully transparent and 1 means fully opaque, with all the values in between. So, the Color mix uses the color of the top socket (the other texture) where the grafitti is transparent and the grafitti itself (in the bottom socket) where it’s opaque. (FYI, in Blender’s world, we call this a decal.)
@usenetfan: (I’m not familiar with PS.) Isn’t there a “PNG-32” option? That’s what you want instead of “PNG-24”.
I just googled a bit. (You should do the same… especially because of the various versions of PS with as many different interfaces. :spin: You’ll find something for your version.)
Or else, download the GiMP. (It’s free.) You load your PSD in it and save as PNG. It won’t tell you that PNG has no alpha, it will just work. :no: (I can’t believe how people are brainwashed by PS…)
Funny you should mention GIMP as I did just that, but the PNG still shows up black when connected to an emission shader and material output. I must be monumentally stupid.