wyy Posted February 1, 2023 Share Posted February 1, 2023 (edited) Hello, I have multiple planes in the scene and I want whem to have same material, but different textures. There will be like 20 of them (named l1.png, l2.png, ...), so I would like to assign texture somehow using dynamic texture name. I tried using iteration number in material network, but it doesn't work - it uses only the last number. Added project file with textures. Thank You! example.zip Edited February 1, 2023 by wyy Quote Link to comment Share on other sites More sharing options...
Atom Posted February 1, 2023 Share Posted February 1, 2023 Add a switch to your material network and drive it from an integer attribute. There might be a limit on the number of connection you can make. Quote Link to comment Share on other sites More sharing options...
davpe Posted February 2, 2023 Share Posted February 2, 2023 redshift is a bit limited in this respect as it cannot use string attributes directly. one way how to do it is what Atom says, but with large amount of textures it would be quite hard to work with, as you need to remember what number is what texture, and connect large amount of nodes (one for each texture, which starts to become a problem if you have dozens or hundreds of textures). another way how to go about it is to use Stylesheet, which is much more powerful, but also more tricky to setup. Basically you can create a string attribute that contains name of an image file per primitive, and then read it in Stylesheet a apply it in render time. with mantra or karma, you can read string attributes directly in shader, which makes this much more simple and easy to setup. Quote Link to comment Share on other sites More sharing options...
madebygeoff Posted February 6, 2023 Share Posted February 6, 2023 Redshift makes this so stupidly hard. But here's a set up that you can probably adapt using stylesheets: https://www.sidefx.com/forum/topic/47014/?page=1#post-372894 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.