15
$\begingroup$

I am trying to create a low poly face with a face from a .png file. The issue is I already have material placed for hair and skin, as shown in the picture below.

I have created a .png file with a face which I would like to overlay over the skin material on the front of the head.

enter image description here

All examples I searched so far assume I also want the color of the material from the .png texture.

Update:

I added UVMapping, changed view to texture, made sure one face is on the eye but nothing is displayed..... see image... I don't know what is going on.

enter image description here

$\endgroup$
3
  • $\begingroup$ It will likely be easiest for everyone if you upload a copy of your ~.blend file to a hosting source, or to [blend-exchange.giantcowfilms.com/], and add a link to your question so that those who want to help are working with you from the same material.. $\endgroup$
    – brasshat
    Commented Jun 26, 2015 at 2:28
  • $\begingroup$ There will be no textures displayed in Cycles both in viewport and render unless you add Texture coordinates node, see this answer for more info. $\endgroup$
    – Mr Zak
    Commented Jun 26, 2015 at 21:37
  • $\begingroup$ Related: blender.stackexchange.com/questions/46424/… $\endgroup$
    – user1853
    Commented Jun 15, 2018 at 21:18

3 Answers 3

22
$\begingroup$

The image texture node has two outputs, the color data and the alpha (transparency channel) data of the image. The color data only holds the red, green, and blue of each pixel. So if you plug it into a shader's color you will probably just get black where there is supposed to to transparency because those pixels are really black, but invisible. You need to use the alpha output as a mask for placing the face over the skin shader.

To do this take whatever shaders you are using for the blank skin and mix them with a diffuse (or whatever other shader[s] you want for the facial features) based on the alpha output of the image texture.

enter image description here

enter image description here

$\endgroup$
2
  • $\begingroup$ Absolutely perfect! Thank you for posting. $\endgroup$
    – phyatt
    Commented Oct 17, 2017 at 3:36
  • $\begingroup$ Perfect solution, but what do you mean by "those pixels are really black", I also found the transparent part is black in R/G/B channel, but why it become black $\endgroup$ Commented Jan 31, 2021 at 3:01
4
$\begingroup$

You also can mix the texture with the material (using a single shader, mixing colors) this way:
enter image description here

$\endgroup$
3
  • $\begingroup$ Nice painting job @Bithur :). This reminds me xbox 360 avatars style. $\endgroup$
    – Paul Gonet
    Commented Aug 9, 2015 at 16:21
  • 2
    $\begingroup$ @Gonzou avatar? thought is was photorealistic! $\endgroup$
    – Bithur
    Commented Aug 9, 2015 at 16:29
  • 1
    $\begingroup$ I looked closer (zoomed in the image) and have to admit you're right. IT IS PHOTOREALISTIC ;). $\endgroup$
    – Paul Gonet
    Commented Aug 9, 2015 at 16:37
0
$\begingroup$

One way to do this is adding to the material a image texture, mapping "object", alpha premultiplied, mapped to an empty. The image sticks to the mesh surface facing the Z axis of the empty. If you move, rotate scale the empty, the image get the same transform. You can see the effect only in render, so maybe activate also "render preview" in a 3D view.

See this CGCookie tutorial for an example of this method.

$\endgroup$

You must log in to answer this question.

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