2
$\begingroup$

I'm trying to add a linear gradient texture to this node setup for my characters' shoes. I want to make the top part of the shoes dark black and I want it to fade to a lighter black where the leather texture material meets the bottom rubber material. I've already tried it by watching tutorials and can't figure it out.

I have two textures/materials on the shoes: A leather texture for the top part and a rubber texture for the bottom. I want to do this gradient on the bottom material (rubber part) to fade up into the leather texture (Top part). The bottom part in the second picture is the material I want to fade. Any help would be greatly appreciated.

enter image description here

enter image description here

$\endgroup$
2
  • $\begingroup$ Thanks so much for sharing this! Couldn't find this information anywhere else so this is really helpful. $\endgroup$
    – Ernesto
    Feb 9 '20 at 2:00
  • 1
    $\begingroup$ Just figured out how to do that. Thanks again! $\endgroup$
    – Ernesto
    Apr 11 '20 at 1:16
3
$\begingroup$

You cannot directly mix different materials.
Turn one of them into a node group, and it will work.

  1. Turn Material 01 into a Node group
  2. Add the new Node group into Material 02 using a mix shader
  3. Connect Gradient texture and use ColorRamp to control the gradient

Create a nodegroup from one of your materials.

enter image description here

Add the new node group into the other material using a mix node.
Use ColorRamp to control the gradient.

enter image description here

Notes:
Gradient texture connects into the FAC input of a mix node (Mix RGB, Mix Shader or ColorRamp)
To make the gradient vertical, I used a UV map projected from view.

$\endgroup$
2
  • 1
    $\begingroup$ I love quality of your answers, but why mxing materials works only with Group node ? Group node is great to keep node tree organized (and in some cases can bring some disfunctions), so how in this case affects function here? thanks $\endgroup$
    – vklidu
    Feb 8 '20 at 13:20
  • $\begingroup$ Hello :). The NodeGroup is linked in both materials, to keep them updated when one is changed. I updated the answer so it's more clear. Thanks for the feedback. $\endgroup$ Feb 8 '20 at 13:37
1
$\begingroup$

This is actually easy. You can assign custom materials per face selection. Select your shoe's rubber part in EDIT MODE (yes, select poly faces), then go to the material tab, select "+" make a new material, and this new material will automatically get assigned to the rubber part of your shoe. Do the same thing for the leather part (select in edit mode your leather parts) and click "+" in the material tab.

If you only need 1 shader to do these 2 things at once, by texture coordinates, you'll get texture sliding when the character walks or moves the feet. Not recommended.

$\endgroup$
5
  • $\begingroup$ Thanks for the response but I probably didn't explain well enough what I want to do. What I'm wondering is actually where do I add a gradient node into that node setup; in other words, what node connects to what to create a linear gradient/fade in between the two materials? Right now I have a hard line in between the leather and the rubber material. $\endgroup$
    – Ernesto
    Feb 8 '20 at 1:00
  • 2
    $\begingroup$ Please consider that such essentials already have been answered: Add different materials to different parts of a mesh?. As you can see it's one of the frequently asked questions on this site, so if you think this question is a dupe better flag it as such, there is no need to repeat something like that. $\endgroup$
    – p2or
    Feb 8 '20 at 13:10
  • $\begingroup$ Why do you guys offering per face material, when OP is asking for fading one material into another? $\endgroup$
    – vklidu
    Feb 8 '20 at 17:19
  • $\begingroup$ I don't, just wanted to point out that if Pierre believes that this is the solution to this question it's a waste of time writing a new answer, because there are already a bunch of well written answers for such basics. @vklidu $\endgroup$
    – p2or
    Feb 9 '20 at 11:15
  • $\begingroup$ The original post didn't explained clear enough. The owner just cleared that within 2 sentences in the comments section. It is much clearer now, so a solution has been given. And yes, to BLEND, you need a FACTOR, and to FACTOR you need SHADER BLENDING NODE. Have in MIND though, unless you give coordinates to your boot, you'll get TEXTURE SLIDING, I've warned you about this in the original post, so the answer is not a waste. $\endgroup$ Feb 9 '20 at 20:20

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.