Starting in December, we will archive content from the community that is 10 years and older. This FAQ provides more information.
I have 100 objects that should use same Arnold material. The different thing is every objects needs different opacity map. I should create 100 materials that uses a base material but different opacity map only. (I can't use switch_rgba)
I used a base material as a reference material but I can't give it a opacity node input (you can see them as screenshots). How can I do that?
Another way is to put the name of the opacity map as user data on each shape. And then use the <attr> texture token
I was trying to use user data right now but I could not get it via user_data_rgb node. I tried to add a color data as user data. But I think you are suggesting to use string(file name) but I don't understand <att> thing. I will look for that to understand what is it. thank you.
Material reference does not support inputs currently, it can only be connected to a network as a leaf node.
You can have the path of your texture as a User Data on the shapes and connect a user_data_string shader to image filename connected to the opacity.
You can also use the <attr> tag as Stephen suggested, which is probably easier and performs a bit better. In this case just write <attr:myuserdata> in the filename of the image shader, where myuserdata is the name of your user data attribute. Note that it does not work with absolute paths on Windows, you have to set the file name in the attribute and setup the texture search folder in the render settings.
Note, that textures defined this way are not showing up in the Tx Manager and not converted to Tx automatically. You have to do the conversion manually and reference the tx files in the scene.
thank you
I tried below but it didn't work. I spent time about it but I couldn't make it. I will check this and your other suggestions. Thank you!
Check out this demo scene: texture_attr.zip
The Plane has a string user data called 'image'. The image shader filename attribute is then set to <attr:image>.
Can't find what you're looking for? Ask the community or share your knowledge.