# Shading Houdini Hair

**URL:** <https://forums.chaos.com/t/shading-houdini-hair/102621>\
**Category:** General\
**Created:** [January 11, 2021, 7:04am UTC](https://forums.chaos.com/t/shading-houdini-hair/102621 "2021-01-11T07:04:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![woytha](https://avatars.discourse-cdn.com/v4/letter/w/a6a055/32.png) [@woytha](https://forums.chaos.com/u/woytha)\
**Post date:** [January 11, 2021, 7:04am UTC](https://forums.chaos.com/t/shading-houdini-hair/102621/1 "2021-01-11T07:04:44Z")

</div>

Hello guys,  
I am struggling with getting to properly shade houdini’s hair. Excuse me, I am not sure if it is more question for Houdini or Vray forum but if anyone could point me in the right direction, I would be happy…  
1) I would need to have a ramp along “V” map parameter to have fine control of the strand from tip to top. I can use Hair Sampler to mix different textures but if I would like to have a finer control through gradient?  
2) How to have some control over randomization of hairs? Typically in tutorials for different render engines I can see the technique goes like this: you create ramp with your desired set of colors and plug the randomization number to asses randomly your strands color to the position on the gradient.  
3) This is more specific Houdini question but anyway, maybe I would be lucky here - I have mapped head which is used to generate hair. How to use heads UV texture for mapping the hair?  
Thanks a lot!

---

<div class="post-metadata">

**Author:** ![woytha](https://avatars.discourse-cdn.com/v4/letter/w/a6a055/32.png) [@woytha](https://forums.chaos.com/u/woytha)\
**Post date:** [January 11, 2021, 7:17am UTC](https://forums.chaos.com/t/shading-houdini-hair/102621/2 "2021-01-11T07:17:35Z")

</div>

> [@woytha](#):
>
> Hello guys,  
> I am struggling with getting to properly shade houdini’s hair. Excuse me, I am not sure if it is more question for Houdini or Vray forum but if anyone could point me in the right direction, I would be happy…  
> 1) I would need to have a ramp along “V” map parameter to have fine control of the strand from tip to top. I can use Hair Sampler to mix different textures but if I would like to have a finer control through gradient?  
> 2) How to have some control over randomization of hairs? Typically in tutorials for different render engines I can see the technique goes like this: you create ramp with your desired set of colors and plug the randomization number to asses randomly your strands color to the position on the gradient.  
> 3) This is more specific Houdini question but anyway, maybe I would be lucky here - I have mapped head which is used to generate hair. How to use heads UV texture for mapping the hair?  
> Thanks a lot!

Haha ad 1) Solved - just plug HairSampler distance along strand to “position” in Ramp and change type to “Position”… Do not know how I managed to overlook this.

---

<div class="post-metadata">

**Author:** ![chakarov](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/chakarov/32/29561_2.png) [@chakarov](https://forums.chaos.com/u/chakarov)\
**Post date:** [January 11, 2021, 5:12pm UTC](https://forums.chaos.com/t/shading-houdini-hair/102621/3 "2021-01-11T17:12:35Z")

</div>

Hello @woytha

> [@woytha](#):
>
> 1) I would need to have a ramp along “V” map parameter to have fine control of the strand from tip to top. I can use Hair Sampler to mix different textures but if I would like to have a finer control through gradient?

you are right about HairSampler to gradien\_position of GradientRamp

 ![Shading.Houdini.Hair_1.png](https://europe1.discourse-cdn.com/chaosprd/original/3X/a/8/a898a9ac4ed6f246f35f661426d4fa9bb99c11f4.png)

> [@woytha](#):
>
> 2) How to have some control over randomization of hairs? Typically in tutorials for different render engines I can see the technique goes like this: you create ramp with your desired set of colors and plug the randomization number to asses randomly your strands color to the position on the gradient.

here setup is similar, but instead “distance\_along\_strand” use “random\_by\_strand” output

 ![Shading.Houdini.Hair_2.png](https://europe1.discourse-cdn.com/chaosprd/original/3X/3/3/339b8ec7a007327ba85f5712f025c078c97b6864.png)

> [@woytha](#):
>
> 3) This is more specific Houdini question but anyway, maybe I would be lucky here - I have mapped head which is used to generate hair. How to use heads UV texture for mapping the hair?  
> Thanks a lot!

be sure the uv attribute is added in Output Attributes of Attributes tab of Hairgen Node and set it as “UV Name” in UV tab of ImageFile VOP or V-Ray Channel Name VOP

 ![Shading.Houdini.Hair_31.png](https://europe1.discourse-cdn.com/chaosprd/original/3X/5/1/51f988627eaea300a049ff4f922d6e55d595e404.png) ![Shading.Houdini.Hair_32.png](https://europe1.discourse-cdn.com/chaosprd/original/3X/c/2/c2a957280509a18040dba6b1e98eb90cf16218f8.png)

---

<div class="post-metadata">

**Author:** ![woytha](https://avatars.discourse-cdn.com/v4/letter/w/a6a055/32.png) [@woytha](https://forums.chaos.com/u/woytha)\
**Post date:** [January 12, 2021, 5:54am UTC](https://forums.chaos.com/t/shading-houdini-hair/102621/4 "2021-01-12T05:54:11Z")

</div>

> [@chakarov](#):
>
> Hello @woytha
> 
> you are right about HairSampler to gradien\_position of GradientRamp
> 
> ![Shading.Houdini.Hair_1.png](https://europe1.discourse-cdn.com/chaosprd/original/3X/a/8/a898a9ac4ed6f246f35f661426d4fa9bb99c11f4.png)
> 
> here setup is similar, but instead “distance\_along\_strand” use “random\_by\_strand” output
> 
> ![Shading.Houdini.Hair_2.png](https://europe1.discourse-cdn.com/chaosprd/original/3X/3/3/339b8ec7a007327ba85f5712f025c078c97b6864.png)
> 
> be sure the uv attribute is added in Output Attributes of Attributes tab of Hairgen Node and set it as “UV Name” in UV tab of ImageFile VOP or V-Ray Channel Name VOP
> 
> ![Shading.Houdini.Hair_31.png](https://europe1.discourse-cdn.com/chaosprd/original/3X/5/1/51f988627eaea300a049ff4f922d6e55d595e404.png) ![Shading.Houdini.Hair_32.png](https://europe1.discourse-cdn.com/chaosprd/original/3X/c/2/c2a957280509a18040dba6b1e98eb90cf16218f8.png)

Perfect. Thanks, thanks, thanks!
