question

Burak Ozdelice avatar image
Burak Ozdelice asked ·

Anyone help me about a reference material problem please?

screenshot01.pngI 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?

materials
screenshot01.png (163.4 KiB)
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Peter Horvath avatar image
Peter Horvath answered ·

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.

4 comments Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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

1 Like 1 · ·
texture-attr.zip (136.5 KiB)

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!

0 Likes 0 · ·

Sorry but could you give me a hint how <attr> is added? I couldn't find a clue about that.

0 Likes 0 · ·

Image node does not get input. I tried both user_data and python node to give it a filename (string)

0 Likes 0 · ·
Stephen Blair avatar image
Stephen Blair answered ·

Another way is to put the name of the opacity map as user data on each shape. And then use the <attr> texture token

1 comment Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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.

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.