Page MenuHome

Problem mixing Hair shader using color ramp and Hair Info Intercept value
Closed, ResolvedPublicBUG

Description

System Information
Operating system: Linux-4.15.0-142-generic-x86_64-with-glibc2.23 64 Bits
Graphics card: NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 470.82.00

Blender Version
Broken: version: 2.93.6, branch: master, commit date: 2021-11-16 14:54, hash: rBc842a90e2fa1; also broken on 3.0 beta 'd8fd575af9cd'
Worked: None

Short description of error
Shader mixing problem when passing Hair Info 'Intercept' value through ColorRamp

When the 1st shader input to a Mix Shader node is a Hair Shader and the mix factor value is a "Pure White" value output by a ColorRamp node (using the Intercept value from a Hair Info node as the input factor), the output of the Mix shader is Black.

If the same Hair shader is connected to both Mix Shader inputs then the problem does not occur - but if two separate Hair shader nodes with identical settings are connected to the Mix shader then the problem occurs.

Using Cardinal on the ColorRamp node gives a banding effect when the righthand color stop is set to off-white.

If you have the Hair Shader connected to the Mix Shader's 2nd input, the problem does not occur.

Exact steps for others to reproduce the error

  • Open attached blend file
  • Set the 3D Viewport shading to Rendered.

Event Timeline

After further experimentation I've found that if you control the Mix Shader factor using a Map Range node with settings From Min: 0, From Max: 1, To Min: 0, To Max: 1.1 (or any value above 1.0), and the input Value: 1, the entire strand is rendered Black. However , if you plug a Value node into the Mix Shader factor and set it to a value above 1.0 the problem does not occur.

For info, I've checked this using the newly released version 3.0 and the problem still persists.

Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Dec 8 2021, 8:45 PM
Germano Cavalcante (mano-wii) updated the task description. (Show Details)
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".

Thanks for the report. I edited the description to make the problem easier to understand.
In fact, that black color is curious.