Gradient colored hair? o.O

Hello!

So basically i have a maya hair system and i want to achieve a result like this:

Problem is the (Vray Mtl Hair) only has “Overall Color” “Diffuse color” “Transmission” etc … and it has no options (that i know off) to achieve this. I’ve tried plugging a Ramp but it doesn’t work at all.

Does anyone know a way of achieving this?

Thank you!

Cheers,
Ceph

You can use the vrayHairSampler. It has an attribute called “distance along strand”. When plugged into a ramp’s u or v coord input and from there the ramp is plugged into a hair mtl, it should give you a distribution of the ramp position and values along the strand. I’ll make an example scene for this.

Ohhh! I didn’t know of that nodes existence! I’ll try it out!

A scene example sounds great!

Thank you!

Cheers,
Ceph

Here you go.

Scene file here:

Usage: vrayHairSamper.distanceAlongStrand goes into ramp.vCoord (when using a V-ramp and uCoord for U-ramp). The ramp then goes into the hairMtl. There’s other outputs from the hair sampler like randomByStrand that are also useful in other situations.


gradient_hair.zip (272 KB)

Hey,

Tested it and it works perfectly! randomByStrand is really usefull to!

Thank you!!!

Cheers,
Ceph