Cycles Hair shaders do not work with color input, only the built-in node color selector.
Closed, ArchivedPublic

Description

System Information
OSX 10.9.1
i5, 16GB
CPU rendering

Blender Version
Broken: I tested 2 recent versions and this was brought up on Blender Stack Exchange as a question.
http://blender.stackexchange.com/questions/19159/colouring-hair-with-vertex-paint?atw=1

Short description of error
The color input for shaders breaks the shader when used. Only the built-in color selector works for coloring the hair. Using a texture as input causes the hair to use default color(light-gray), using the attribute node for vertex colors breaks the shading for the hairs completely.

Exact steps for others to reproduce the error
I've prepared a .blend which has three node groups in the same material. You can just click each output node to see the results in the Rendered View.

Best guess: color input for shader nodes should be cast to the proper type. (hopefully that's not a red-herring) :)

Details

Type
Bug
marc dion (marcclintdion) updated the task description. (Show Details)
marc dion (marcclintdion) raised the priority of this task from to Needs Triage.
marc dion (marcclintdion) set Type to Bug.

I think it's important to note that this problem only shows up with "Emit from: Verts" is selected - it behaves well when the hair emitted from the face.

Thomas Dinges (dingto) triaged this task as Normal priority.Nov 24 2014, 6:40 AM
Thomas Dinges (dingto) added a project: Cycles.
Sergey Sharybin (sergey) closed this task as Archived.Jan 19 2015, 7:30 PM

Root of the issue goes to rna_ParticleSystem_tessfaceidx_on_emitter() which currently can not figure out which face to use for particle color/uv coordinate when they're emitted from vertex. Basically you need to know all the adjacent to the hair faces in order to figure out it's color. It's not possible without doing full mesh lookup per hair which would slow down scene preparation as a hell.

it's also not possible to support textures on hair -- for that you'll need to somehow map UV from faces to hair. The main issue here is that faces could have discontinuities in UVs hence it'll be totally arbitrary which UV coordinate to use for hair.

Improvements are possible here, but wouldn't really consider it a bug. Better to look again after particle code refactor which we still hope will happen during gooseberry.

Anyway. thanks for the report, but it goes to TODO: http://wiki.blender.org/index.php/Dev:2.6/Source/Render/Cycles/ToDo#Smaller_Features