# Layer System and Shaders

The Hair Tube Builder offers layer management which allows you to manage your hair tube strands using Maya Display Layers built in into the main UI.

Each layer represents a shader. Which means, every tube in that layer will be assigned to the same shader.&#x20;

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2FdG8cadkbowunqk48HRDT%2Fimage.png?alt=media&#x26;token=cf11bf75-c31d-4e64-a3cb-0809dffe0813" alt=""><figcaption></figcaption></figure>

By default, when a layer is created, a lambert shader with a random solid color will be assigned.

**Moving strands to another layer**

When a hair tube strand is moved from one layer to another, it will automatically assign the strand to the shader of that layer.

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2FW6lcxr7nH3tf8gcJ8OMY%2Flayer_shad_move_tube.gif?alt=media&#x26;token=2d63d4fc-4492-450d-976a-ec7b7078c004" alt=""><figcaption><p>When moving a tube strand to another layer, the corresponding shader will be assigned</p></figcaption></figure>

**Changing the shader of a layer**

If the default lambert is not for you, you can change the shader type by:

* Selecting the layers
* Go to the Shader Toggle button, and pick a shader type.

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2Fedl7sJcWeoSTMJszamEm%2Flayer_shad_change_shader.gif?alt=media&#x26;token=d2d67fff-708e-4c28-bcc6-d546abfe9796" alt=""><figcaption></figcaption></figure>

**Create UV on a strand**

To recap, to create UV of a tube strand, you can now toggle geometry selection mode, select the strand geometry, open the Strand Editor, then turn on Auto UV and select Stripe/Grid.

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2FVeu6IkZZi6aPHFBPZari%2Flayer_shad_create_UV.gif?alt=media&#x26;token=0ce00c50-afd4-44b7-a79b-5cc6027447a3" alt=""><figcaption></figcaption></figure>

**Assign textures**

When your tubes have UV auto unwrapped, you can now assign texture to a its shader.&#x20;

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2F4p9sQ838GX0cS1xH0vuG%2Flayer_shad_assign_textures.gif?alt=media&#x26;token=86450a9d-969c-4f95-8d1c-38595f3dc40a" alt=""><figcaption></figcaption></figure>

Please note, because a layer is a shader, all the hair strands in that layer will be assigned to the same shader. If this is not what you want, you can organize the tubes by moving them to other layers.

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2FErGFqA0wZ0HckrUSdByK%2Flayer_shad_textures_all_sutbes.gif?alt=media&#x26;token=62d7769a-9c27-4555-99ec-6838d9b24eb5" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
If you have textures connected to a shader, and if you must **switch** the shader to another type, it will strip off all the connections to that shader. You will have to re-connect the textures back.
{% endhint %}

<figure><img src="https://454332562-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGyyK7o0fNRXvtva8vEkG%2Fuploads%2FW6fmJofuAQHLA245Yy1O%2Fimage.png?alt=media&#x26;token=3f043706-6b55-4100-b4ff-373479c3fcef" alt=""><figcaption><p>Switching shader when there are connections will give you a warning saying existing shader connections will be stripped off.</p></figcaption></figure>

