2
$\begingroup$

Please forgive me if I used beginner terminology.

I would like to have a bottle in color "provided by the simple diffuse shader" (ie. with pure red). I would like to put a test texture (222222 on the screenshoot) only on part of bottle which was UV unwraped (only box with 22222 has been cover by unwrapped faces).

I know how to do this with image with transparency (alpha) as decals however the question is if there is any simple option just to put part of texture on object and leave the rest with pure shader without texture?

I've found on blender manual that if I set texture as "clip" it will set exterior pixels as "transparent black". No idea what transparent black means, but it is not transparent.

The mix node always mixes the rest of bottle with texture and does not give pure color (red). I tried to put an alpha texture node into mix factor to separate the texture part from rest (as manual states remaining pixels are transparent "black") but the result is well..bad.

I would appreciate your support. No idea where is my mistake.

enter image description here

$\endgroup$

2 Answers 2

2
$\begingroup$

TL;DR: Invert your mask image

"No idea what transparent black means, but it is not transparent."

It means that the area outside the image canvas will be considered transparent, as in Alpha value = 0, some image formats also have the ability to still save color for transparent areas, like PNG, and so will also paint that area black, besides making it transparent, in case you are not using the alpha map, or use it separately for other purposes.

In your particular image it is white all around the canvas borders, which generally means it opaque in terms of alpha channels, so it won't mix well with the remaining surrounding material.

Clipping in Blender will not work because as you already found out from the manual, the surrounding will be considered black which never matches your image border.

Don't use the Invert Cycles node in Blender, because it will invert the image color but also the black transparent area applied by the clipping effect, leading to surroundings that never match the current color of the image border.

You have to explicitly use an external application to invert the colors before using it in Blender.

enter image description here

$\endgroup$
2
  • $\begingroup$ Thank You for the answer however it may not be what i am looking for. The texture is simple black and white image which i would like to put on the part of object. There is no transparency implemented on the texture. I would like just part of black and white texture to be "cut" (covered with unwrapped part of object) and place on the object. I want the rest of object to have specified color (ie pure red) $\endgroup$ May 11, 2017 at 3:10
  • $\begingroup$ That is what I achieved in my answer with the last step of the gif, I have not used any transparency or alpha maps in the image, simply inverted the colors in GIMP $\endgroup$ May 11, 2017 at 4:09
0
$\begingroup$

If you use "Screen" instead of "Mix" in your Mix node, with a Fac of 1.0, the color should match the red perfectly.

enter image description here

However, it won't fix the white part outside the black area. To fix that, the easiest thing would be to just color the whole background of the texture black.

If you can't change the texture for some reason, then you can adjust the UVs to hide the white part.

$\endgroup$
1
  • $\begingroup$ not sure why the downvote...part of the question was why it doesn't give pure red, which the "Screen" helps with. $\endgroup$ Dec 1, 2017 at 4:26

You must log in to answer this question.

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