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 be 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


#2

I don’t know how you would do that, but are you using multiple systems?

If only your root drive and subfolders change, you should be able to do this already with File Texture Manager, for example.


#3

Thanks for the reply!
However I am not looking to reconnect missing textures…

I was interested in a way of using one shader on multiple objects,
and for those multiple objects to receive specific/independent textures
via a variable in the texture path.


#4

any ideas?


#5

Not exactly what you are asking for but bit similar!

You can define a environment variable in maya env file and can use that in arnol’d “Texture search path” under system tab of arnold renderer.