# Extra texture ID or similar

**URL:** <https://forums.chaos.com/t/extra-texture-id-or-similar/40653>\
**Category:** General\
**Created:** [March 9, 2012, 2:26pm UTC](https://forums.chaos.com/t/extra-texture-id-or-similar/40653 "2012-03-09T14:26:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![KyronVFX](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@KyronVFX](https://forums.chaos.com/u/KyronVFX)\
**Post date:** [March 9, 2012, 2:26pm UTC](https://forums.chaos.com/t/extra-texture-id-or-similar/40653/1 "2012-03-09T14:26:42Z")

</div>

Is there a way to give the extra texture an ID ? Let’s say I have two spheres with the same shader. I want to render an extra tex pass for each sphere, but with different textures.  
A concrete example: In my beautypass I have a mouse body and mouse fur with different shaders. I want both the body and fur to have a custom RGB texture painted in photoshop (for comp), and in 1 pass the fur with body as a matte and vicer versa for pass 2. Using the extra texture option as it is now, it will just override every shader in the scene with that texture, and that is not what I want.

---

<div class="post-metadata">

**Author:** ![pechart](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@pechart](https://forums.chaos.com/u/pechart)\
**Post date:** [March 9, 2012, 2:46pm UTC](https://forums.chaos.com/t/extra-texture-id-or-similar/40653/2 "2012-03-09T14:46:22Z")

</div>

Not sure, but maybe you can use a tripleSwitch and assign the texture(s) to the corresponding object that way. Never tried that, just an idea.

---

<div class="post-metadata">

**Author:** ![bigbossfr](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bigbossfr/32/50480_2.png) [@bigbossfr](https://forums.chaos.com/u/bigbossfr)\
**Post date:** [March 9, 2012, 3:47pm UTC](https://forums.chaos.com/t/extra-texture-id-or-similar/40653/3 "2012-03-09T15:47:33Z")

</div>

Hi,  
You can use user attributes with conditions and an user scalar.

---

<div class="post-metadata">

**Author:** ![KyronVFX](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@KyronVFX](https://forums.chaos.com/u/KyronVFX)\
**Post date:** [March 9, 2012, 4:58pm UTC](https://forums.chaos.com/t/extra-texture-id-or-similar/40653/4 "2012-03-09T16:58:10Z")

</div>

Thanks to both of you for replying.  
Bigbossfr: How is that done?

I guess adding an ID to the vray tex attribute will have to be posted on the wishlist forum 🙂

---

<div class="post-metadata">

**Author:** ![bigbossfr](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bigbossfr/32/50480_2.png) [@bigbossfr](https://forums.chaos.com/u/bigbossfr)\
**Post date:** [March 9, 2012, 5:15pm UTC](https://forums.chaos.com/t/extra-texture-id-or-similar/40653/5 "2012-03-09T17:15:00Z")

</div>

1) Create an user attributes on two spheres.  
2) Set your user attribute for each sphere like this : for the sphere1, write : toto=1. For the sphere2 : toto=2  
3) Creation a “condition node”. Set the second term to 1.  
4) Create an user scalar node, and set the “user attribute name” to : toto  
5) Set the default value of the user scalar node to 1.  
6) Connect the user scalar to the first term of the condition node.  
7) Connect two textures in the “color if true” and “color is false” of the condition node.  
8) Now, all is done. Connect the condition node to an extra text render element, or a material, or what you want.

If you want a scene, tell me.

---

<div class="post-metadata">

**Author:** ![KyronVFX](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@KyronVFX](https://forums.chaos.com/u/KyronVFX)\
**Post date:** [March 9, 2012, 6:51pm UTC](https://forums.chaos.com/t/extra-texture-id-or-similar/40653/6 "2012-03-09T18:51:46Z")

</div>

Once again thank you for the quick reply. I think I will either have to make a script for this, or hope it will come in a future version of Vray 🙂

---

<div class="post-metadata">

**Author:** ![dougWilkinson](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/dougwilkinson/32/235063_2.png) [@dougWilkinson](https://forums.chaos.com/u/dougWilkinson)\
**Post date:** [March 10, 2012, 4:43am UTC](https://forums.chaos.com/t/extra-texture-id-or-similar/40653/7 "2012-03-10T04:43:11Z")

</div>

we use a triple switch to do this. i think its the most powerful way. connect the shapes and the desired texture, and then connect the trippleswitch to the extraTex. pretty sweet.

---

<div class="post-metadata">

**Author:** ![KyronVFX](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@KyronVFX](https://forums.chaos.com/u/KyronVFX)\
**Post date:** [March 10, 2012, 2:25pm UTC](https://forums.chaos.com/t/extra-texture-id-or-similar/40653/8 "2012-03-10T14:25:23Z")

</div>

Do you have a simple example scene of how to hook that up?  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![bigbossfr](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bigbossfr/32/50480_2.png) [@bigbossfr](https://forums.chaos.com/u/bigbossfr)\
**Post date:** [March 10, 2012, 4:59pm UTC](https://forums.chaos.com/t/extra-texture-id-or-similar/40653/9 "2012-03-10T16:59:28Z")

</div>

> [@dougWilkinson](#):
>
> we use a triple switch to do this. i think its the most powerful way. connect the shapes and the desired texture, and then connect the trippleswitch to the extraTex. pretty sweet.

Triple switch is bad because, you must to connect the shading on a shape. If you export all shaders, you loose the connection, and, you shading will doesn’t work. For each scene, you must to reconnect your triple switch.  
It is a workflow, but for me, user attribute is better because “mesh object” and “shader” are separated, you can export/import as you want.

---

<div class="post-metadata">

**Author:** ![pechart](https://avatars.discourse-cdn.com/v4/letter/p/4491bb/32.png) [@pechart](https://forums.chaos.com/u/pechart)\
**Post date:** [March 12, 2012, 8:40am UTC](https://forums.chaos.com/t/extra-texture-id-or-similar/40653/10 "2012-03-12T08:40:02Z")

</div>

Just wanted to say thanks for sharing that workflow, Mr. Bigboss!

---

<div class="post-metadata">

**Author:** ![dougWilkinson](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/dougwilkinson/32/235063_2.png) [@dougWilkinson](https://forums.chaos.com/u/dougWilkinson)\
**Post date:** [March 12, 2012, 7:47pm UTC](https://forums.chaos.com/t/extra-texture-id-or-similar/40653/11 "2012-03-12T19:47:12Z")

</div>

> [@bigbossfr](#):
>
> Triple switch is bad because, you must to connect the shading on a shape. If you export all shaders, you loose the connection, and, you shading will doesn’t work. For each scene, you must to reconnect your triple switch.  
> It is a workflow, but for me, user attribute is better because “mesh object” and “shader” are separated, you can export/import as you want.

ya thats a great advantage indeed. We have been scripting the connections, but this would be better i think.
