Dynamic texture path


#1

Hi,
(I am using maya 2016 & Arnold)

Instead of setting explicit paths to textures, I am interested in the ability to set a dynamic path that depends upon a variable.

What I had in mind was something like the ‘render token’ you can use when setting the ‘file name prefix’ in the Render Settings.

Render_Settings

So instead of making explicit connections to textures, they could be dynamic and depend upon a variable (?).

This way you could use generic shaders on lots of different objects, but the textures would be specific to each object.

So if you had a leather shader you could apply it to some shoes, a jacket and a belt.
The texture path would something like this
CGTalk___Dynamic_texture_path
The textures directories would have to arranged like this
/textures/shoes/color.tif
/textures/jacket/color.tif
/textures/belt/color.tif

Hope this makes sense, I would very much appreciate the help!

Many thanks,
Djim