5
$\begingroup$

I saw the threads on PNG alpha and made what It was recommended to do but I still have the problem although it brought me forward.

So I've a picture with transparent background (PNG), all seems ok for this picture.

I want to use it as a texture so I mapped it and it's maybe a bit deformed but seems also ok.

My problem is that the background is not totally black anymore but still on the edges.

Here is my node structure:

enter image description here And here is the result:

enter image description here

I want to remove these black borders.

EDIT:

Here is the texture I want to apply: enter image description here

EDIT 2:

The blend file of the project (all the present textures are not used).

$\endgroup$
8
  • $\begingroup$ Please post the texture you are trying to apply; Try switching the transparent to the last, and the glossy to the first mix node. $\endgroup$ Sep 8, 2014 at 9:42
  • $\begingroup$ Switching the nodes changes nothing and I'll edit my questions in few seconds $\endgroup$ Sep 8, 2014 at 9:46
  • $\begingroup$ Would be easier if you just pack the file and upload the blend. I can't see any black borders, unless you're referring to the fact that you've made the mug transparent so that we can see the inside of the mesh. $\endgroup$
    – Greg Zaal
    Sep 8, 2014 at 10:24
  • $\begingroup$ Yeah, surely the black borders are shadows. $\endgroup$ Sep 8, 2014 at 10:33
  • $\begingroup$ Yeah, ok I'll pack the blend! Thanks for your support :) $\endgroup$ Sep 8, 2014 at 10:52

1 Answer 1

10
$\begingroup$

Everything is working as it's supposed to. Those black borders you see are simply shadows cast by the mug onto itself because you've made a hole in the side with the transparency shader. It's easier to see from the side:

side view

It seems like you're trying to do something like this:

decal

You don't need a transparency shader because you're not making anything transparent - you simply need to make the background of the image the same colour as the rest of the mug, so just use a MixRGB node and the alpha of the image as the Fac.

You'll notice I added a math node as well - that's just to control how much of the glossy is being mixed in, since if you used the alpha directly without the math node it'd be mixing 100% glossy and 0% diffuse.

$\endgroup$
4
  • $\begingroup$ Wahou! Great! Sorry for disturbing you for a so simple problem! Thank you (I'd like to upvote you but I do not have enough rep... :( ). $\endgroup$ Sep 8, 2014 at 13:19
  • $\begingroup$ Just a little last question, (I know that I'm annoying!), how did you do to get the same background color as the mug because I did what you did but we see a square that is not the same color as the mug. Which color did use in the mix? $\endgroup$ Sep 8, 2014 at 13:46
  • $\begingroup$ That's what this site is for, happy to help :) If you hover the mouse over any colour value (like the one in your other material for the rest of the mug) and hit Ctrl+C, then hover over another colour value (the one on that Mix node) and Ctrl+V, it'll copy it there. (See: adaptivesamples.com/2014/02/01/cif-11-hover-copypaste ) $\endgroup$
    – Greg Zaal
    Sep 8, 2014 at 13:59
  • $\begingroup$ Thank you, you helped me a lot, I much better understand these texture concepts yet! $\endgroup$ Sep 8, 2014 at 14:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .