[Maya 2016 + Vray 3.4](I’m not sure where it is coming from). Make sure the object you want to grow hair on does not have a Vray Material
applied. Lambert and Blinn are fine. I haven’t tested other materials. We will see a bit later on why.
c) Create new Description (Create the Fur)
Pictures are worth a lot of words:
Make Sure Vray is visible to XGen and set it as renderer:
d) Do your Grooming or whatever you were planning to do on the hair.
In my case, I’m just increasing the density a bit, adjusting the length and taper, and adding a noise Modifier.
I end up with something that looks like this:
4 – Color the hair
In order to color the hair, Vray uses custom shader parameters root_color and tip_color.
If you only create one of the two, the whole hair will be colorized.
a) Create the custom Map
In “Custom Shader Parameters”, in the name field enter “root_color”, change the type to color, and click the “+” icon. Then, click “Create Map”.
Choose a resolution. This will be a PTex map (not UV map) and the resolution will be dependent of this value. I went for 400 sort of randomly, assuming it would be big enough. You can change it at any time by clicking the little expression icon.
At that point, you will see the sphere becoming white, and the 3D paint tool will be active.
If you want to paint the color yourself, that’s fine, click the little paint icon next to the Custom Parameter.
In my case, I want to use a texture file. If you look into the Hypershade, you will notice a texture and a material have been created for you. This does not happen if your original object had a Vray Material applied! That is the bug I mentioned earlier.
Click the Paint icon. You can now paint a custom color if you want to. (This step might not be necessary, but I failed last time I omitted it.)
Now in the Hypershade, double click the texture Map (pSphereShape1_collection_…stom_color_root_color.iff in the image above), and browse to the texture you’d like to use instead.
Note: The color management might not be available, in which case you’ll want a texture in Linear color.
Make sure you click the little save icon to apply that map to Ptex.
It will look like nothing happened. However, if you browse to the right path, you’ll notice you now have a ptex file.
Repeat the operation with “tip_color” if necessary. I will skip it, so my root_color will be applied on the whole hair.
5 – Render It
In order to render in Vray, I will change my renderer to Vray, and add a VrayLightDome to get some light in there.
At that point, it’s still rendering as a grey hairy ball, but at least it’s rendering.
a) Create a shader
I will use a Vray Mtl Hair 3 Shader. In the diffuse, I attach a VRayHairSampler.
The hair sampler is the node doing the magic, it’s not very clear to me exactly how it links to the PTex map, I’d like a bit more documentation on it, but somehow it can read some attributes of the XGen hair, and will recognize root_color and tip_color maps as such, and output them as Out color.
b) Assign the shader
Select the description, and assign the material to it:
c) Tweak your lighting / Shader, and Render
I replaced my dome light with two Rectangle lights, and removed the default brown color in the Hair material speculars.
Here is the “final” render:
A magnificent hairy Earth.
Hope this Tutorial will be helpful for some. The process isn’t particularly intuitive and could be improved greatly, but for the time being we don’t have many options.
If you know a better way feel free to comment and let me know.