5
$\begingroup$

I am currently working with a model that has two different kinds of materials, each containing a texture and each having their own mapping, I want to be able to "hide" the eye texture behind the eyebrow texture and independently move it around using the UV editor.
1

The model without the eyes.

2

After I add the eyes, which have separate materials.

3

And the resulting outcome(edited in Photoshop)

How can I change my node setup to mask the eye material with an alpha texture from the eyebrow material?

And here's the link to the blend file, textures have to be reapplied individualy

$\endgroup$
  • $\begingroup$ What does having this as two separate textures buy you? What are you hoping to achieve that isn't covered by just merging them in the texture with an image editor? $\endgroup$ – Kirbinator May 8 '16 at 2:32
  • $\begingroup$ @Kirbinator being able to move the eyes freely under the eyebrows, a lot faster ahead of time to pose the eyes freely within the 3d editor than to do it in post processing $\endgroup$ – J. Willus May 8 '16 at 4:10
  • $\begingroup$ What render engine are you using? $\endgroup$ – cegaton May 8 '16 at 4:42
  • 2
    $\begingroup$ I think you should have one material and use a mix shader with alpha as mixing factor ,can you upload a test file $\endgroup$ – Chebhou May 8 '16 at 7:20
  • 1
    $\begingroup$ @Chebhou I added the blend file. $\endgroup$ – J. Willus May 12 '16 at 21:21
2
$\begingroup$

The answer is to have a skin texture that uses an alpha channel to leave the area of the eyes out.

The alpha texture can then be used to drive the fac value of a mix shader. If you want to animate the eyes, you need to change the texture coordinate input.

enter image description here

$\endgroup$
  • $\begingroup$ This answer doesn't exactly cover my specific use case, but it has been greatly helpful in finding an ideal solution :) I'll update with a full answer later. $\endgroup$ – J. Willus Feb 20 '18 at 2:14
  • $\begingroup$ @J.Willus If you had told me what part I am missing, I could have expanded the answer and still can. Only thing I can guess right now is how to animate it. "This answer doesn't exactly cover my specific use case" is a bit vague. $\endgroup$ – Haunt_House Feb 20 '18 at 2:25
  • $\begingroup$ One of the things I was missing that finally helped me get around this was using a mapping node and using THAT to move around the iris instead of using the UV map. That way, I can use the UV map to handle the actual expressions (like moving the UV to another part of the mesh where the person was angry or sad. $\endgroup$ – J. Willus Feb 20 '18 at 3:25
0
$\begingroup$

Try splitting the eyes into separate objects/meshes. The eye texture will automatically cut off at the end of the eyeball. Now, you can move the texture coordinates of the eye freely and it won't show on the rest of the face.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.