I’m trying to learn the node editor & cycles. I have been trying to make some tree photos appear on flat planes with the trees opaque, and the white background transparent, using an alpha file.
So far, all I can get is trees that are transparent. The white background is gone, but the trees are not opaque as they should be. I keep trying different hook-ups, but nothing works.
I am attaching the file and a screen shot and hoping for a clue about how to set up the nodes - or perhaps a lead on where to find some info about masking transparency. I have left a couple of nodes in that aren’t connected yet, but I think they should be.
BILLBOARD.blend (638 KB)
ok I’m not an expert but
add a mix shader
add trans to top color slot
add tree color to bottom color slot
and then add tree alpha to factor
yeah shader mix to output
if I got that wrong swop trans and color
Thanks for the try heddheld. Those two arrangements give me a black opaque tree with no background or a black opaque background with no tree. But not an opaque colored tree with no background.
There is no need to use a black and white image to control the transparency anymore. You can simply use the alpha socket of the Image texture node. The image file has to have an alpha channel for this to work, so it needs to be something like a PNG format. Plug the alpha into the Fac socket of a mix shader. The first shader socket should be a transparent shader and the second should be your diffuse with the color from the image texture node plugged into it. Example is below…
Thank you krissuss! That was two things I didn’t understand - that there is no need for the separate alpha file and that png files carry that info. All is now working. Thanks again.
lol seeing as you got a black tree I’d have guessed invert the alpha map, dont notice last night, but yeah png’s or tga are my fav way to do it