Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Anyone help me about a reference material problem please?

7 REPLIES 7
Reply
Message 1 of 8
delizade
292 Views, 7 Replies

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?

Tags (1)
Labels (1)
7 REPLIES 7
Message 2 of 8
Stephen.Blair
in reply to: delizade

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



// Stephen Blair
// Arnold Renderer Support
Message 3 of 8
delizade
in reply to: Stephen.Blair

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.

Message 4 of 8

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.

Message 5 of 8

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!

Message 6 of 8

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

Message 7 of 8

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

Message 8 of 8

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.

Post to forums  

Autodesk Design & Make Report