Maya hair and Arnold


#1

I wonder if it´s possible to get the hair color output by the hairSystem, to be used in the arnold hair shader.

It should be possible because there is the Export Hair Colors option in the hairSystemShape.

I bet there is some variable that we could use in a aiUserDataColor and plug that into the aiHair.

Or maybe some other method ??


#2

If you need just hair color, than you can connect hair color of hairSystem to root and tip colors of aiHair. (connectAttr -f hairSystemShape1.hairColor aiHair1.rootcolor).
Why dont you setup hair color in aiHair shader directly?


#3

Hmm, that looks like pluging the input ( hairSystemShape1.hairColor ), just a single color. I would like to get the output, to be able to use that randomization per hair that maya does.

So, this Export Hair Colors option should do that, right ?


#4

I did a fast test, export Hair Colors did not work for me as expected.
Transferring shading a bit more complex than transferring only color. You can build you network with aiHair using hairSystemShape attributes (hueRand, satRand etc), for example as blender attribute in blend color node.
Or you just can use hair shading as is, without aiHair, but probably you will loose AOVs on hairs.
Also:

  • you can do randomization with texture,
  • you can render hairs as curves and create randomization with custom attribute on each curve.

#5

Thanks a lot, I didn’t think it would sample the texture per hair, only per clump so i didn’t even try !

The only thing I´m missing is to get the u coord along the strand, so we could use a ramp to shade along the hair, and not just root and tip, cause I think it´s too coarse.

For instance a ramp from checker texture dark at 0, to checker light at 0.2 , to checker lighter at 1.