Hair shader model base color lighting problems

Edit: So I have managed to find what is causing it, though I still have no idea how to solve it. The moment I plug in something more than a constant into the base color, I will get those black artifacts. If it’s a constant (no matter what the value), I don’t get it (but of course, I will only get monochrome hair). So, anyone any idea what I am doing wrong here?

So, I have been trying out the new hair shader model and have run into some problems. Whatever I do, I am getting some really bad results when the hair is being hit by light.

In the above image, the light is coming from above and everything hit by the light is turning black. I was really looking forward to using the hair shader model, so I really want to know what I am doing wrong. For reference, here is the material I made (for testing sake).

Apart from the lighting problem, another issue I have is that I have no idea what all the hair shader model specific outputs are supposed to do. More specifically;

  • Scatter: Have no idea what this is. I figure it has something to do with light, but that’s about it.
  • Tangent: The normal map of the hair shader perhaps?
  • Backlit: the name tells me what it is supposed to do, but I don’t know what kind of inputs are best. Is an 0-1 okay or should I go with a vector?
  • Pixel Depth Offset: No idea about this one.

I should also mention that the hair in my model is not based on billboards, but rather a part of the mesh.

After screwing around a bit, I found the answer myself.

The problem was apparently, that if you plug a vector value into the base color, none of the R, G or B channels can be 0.

This is what happened when I plugged in a normal texture. Anything hit by light goes black and gives artifacts;

However, when I added an additional value of 0.01 to each of the RGB channels of the texture, it changed into this (don’t mind the shadows being white; that’s just me not having finetuned the scatter, specular and whatnot settings). As you can see, the artifacts are gone and the whole thing renders quite nicely.

Pretty sure it’s a bug.

Hey, I had this issue too, it seems you cant have a saturation of 1, I think its a bug, but just open your constant3, and drop the saturation slider a fraction below 1 and you should be good to go.

Yeah, I figured it out already. Posted my answer to myself here too. Seems a moderator deleted it though.

Ahh thanks. Just migrated over from 4.22 to 4.25, there’s been a number of changes and weird bugs and I’ve been spending a while trying to fix them, this was one of them and it was really frustrating and ugly. You can also instead do a simple clamp at a small value like .0001, cause even small adds of grey will wash out a lot of color so its better to preserve a small amount and not add anything. I appreciate you figured this out, glad its a simple fix.