Hello,
I'm not a mel scripter to be sure so hopefully someone can give me a hand- What I want to do is be able to randomly apply a set of images to all objects that are assigned to one shading group. Is this even possoble? This is for leaves on a tree. All the objects are the exact same geometry and have the same shader applied to them. Can I tell the shader to load a random image into the color channel for each object that is assigned to it?
Thanks for the help!
I wrote an in-house script that did what you are talking about, but unfortunitely cannot give that out. However, I can tell you what i did to accomplish it.
I take any number of selected poly faces from a scene and any number of selected shader nodes, I used a script called getMultiListerSelection.mel from Bryan Ewerts site to capture the selected multilister shader nodes. I then randomly pick a poly face and randomly pick on the the shaders and apply it. By using arrays, this can happen very fast and if the artist is not happy with the randomized shaders he/she can re-run the function as many times as it takes to get a good random look.
Hope this helps,
Morris Olmsted
3D Designer @ Idol Minds LLC
molmsted@idolminds.com