View Full Version : Variable file texture node

08 August 2004, 12:47 AM
Hello all,

I've not done much scripting or shader writing, but I've got a concept I want to implement, and I'd like to do it at the shader level, if I could.

I often end up with scenes that have repeats of a lot of similar objects (i.e. chairs and tables), that are instances of each other, but end up looking fake because they're the exact same texture.
To solve this, I want to have a file texture node that points to a series of images (say file1.tif, file2.tif, file3.tif) that are all variations on the same texture. At rendertime, for every object with said shader assigned, it would pick one of the texture variants and keep it for that object, thus creating variation in my objects, without additional hassle on my end.

Is this possible? Would I be better served by trying to do this through MEL? I'd prefer to keep away from creating 5 or 6 different shaders with different textures in the hypershade, as that gets cluttered.

Any info would be appreciated. :)

08 August 2004, 01:26 AM
Maya already has a tripleshadingswitch node in hypershade that can vary the connection between any number of textures and any number of objects, including instances. (Perhaps if you have thousands of objects, a MEL script might automate set-up of the inShape:inTriple list, though.)


08 August 2004, 03:12 AM

08 August 2004, 03:15 AM
That was PRECISELY what I was looking for. Thanks to the both of you, this will help a lot.

CGTalk Moderation
01 January 2006, 02:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.