question

Francisco Cunha avatar image
Francisco Cunha asked ·

Multi texture shader to cloner objects

Hello. Is it possible to aplly a multi texture shader, in a linear order (1st, 2nd, 3rd, ...) to the objects of a linear cloner, just as the mograph shader does? Let's say, like pages in a magazine, one shader for multiple pages with the textures in the right pages in sequence, not randomly. I'm trying to do it with the Switch Shader nome but getting stuck in the index parameter. I've tryed the Range none attached to the index value of the Switch Shader, but no success.
Any help would be appreciated, thank you.

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

Eden Soto avatar image
Eden Soto answered ·

I'd like to know the answer to this as well... I ran into a similar issue the other day and couldn't find a way.. wound up creating 20+ individual materials for a stack of vinyl record covers in a cloner... was super tedious

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.

xebajac@zdfpost.net xebajac@zdfpost.net avatar image
xebajac@zdfpost.net xebajac@zdfpost.net answered ·

https://www.youtube.com/watch?v=Eh7FG3r9rFA - Watch this you'll get all the info you need.

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.

Francisco Cunha avatar image
Francisco Cunha answered ·

No good for me. That example is for randomization. What I need is to make it linear.

What I'm working on is a linear cloner, and the textures must be apllied in the correct order.

1st texture applied to the 1st clone, 2nd to the 2nd, 3rd to the 3rd, and so on. So, I need a way to linearize the index of the "switch shader". I believe there was a "linearize" node (which was driven by object ID) in the first versions of arnold, but it's not there anymore, and I can't figure out which node replaces it.

Anyway, thank you. Every knowledge is good knowlege.

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.

rachid Hadj Abderrahmane avatar image
rachid Hadj Abderrahmane answered ·

Hi
One Arnold Shader with multi textures (Maya):
Use Tokens <attr:> or <shapename>
video here: https://www.youtube.com/watch?v=OtL7HMWyBPI

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.

Peter Horvath avatar image
Peter Horvath answered ·

Currently you can access only the display color of the clones from the shader network. So you can use a gradient based on the index and than drive a switch shader with the display_color user data. Also note that the color in Arnold is linearized, so you need to apply a 2.2. gamma. See the attached scene: cloner-multi-texture.zip

What we're missing currently is accessing the index of the clones, which makes this a lot easier. I'll add it in a future release.


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.

Francisco Cunha avatar image
Francisco Cunha answered ·

Thanks @Peter Horvath. It was a great help. I took a dive into your file and a light shone inside my head. I went ahead and made some changes, I don't know yet if it solves my problem but I've found a way to distribute the colors on to the objects in the correct order... well... actualy is the reverse order, but is a start. I've changed the shader effector for a step effector and in attributes>parameter>color mode I've selected "effector color" (because the step effector applies different shades to the cloner objects in the display window, and the "user_data_rgb" node was huge discovery for me) then selected "use alpha/strenght" and "subtract" for the blending mode. And voilá... the colors are distributed in the correct order, but from end to start, like the last clone has the zero index (can't figure out this part). Anyway, I'm attatching the file. And I'll later try with textures rather than just colors, which is what I'm aiming for.
Again thank you so much for your help.


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.

Francisco Cunha avatar image
Francisco Cunha answered ·

@Peter HorvathI've figured out how to distribute the colors in the right order from start to end. One just need to adjust/invert the spline of the the effector, as shown in the picture. And I've tested with images and it works. Perfect!!! Thanks again for your help.


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.

Peter Horvath avatar image
Peter Horvath answered ·

Great, I'm glad it's working, hopefully the workflow will be easier soon.

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.

xebajac@zdfpost.net xebajac@zdfpost.net avatar image
xebajac@zdfpost.net xebajac@zdfpost.net answered ·

i forgot there was a tutorial( https://vimeo.com/139620806 ) on this..(arnold 4)

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

This is fine for random color but you can't control the iteration of the shaders in this execution. It's not a replacement for the Multi-shader and doesn't get you anywhere close.

0 Likes 0 · ·

True........

0 Likes 0 · ·
Francisco Cunha avatar image
Francisco Cunha answered ·

I'll post a tutorial soon, based on my findings.

I've already fine tuned the shader since my previous post.

I'm testing it on different projects and so far it's working, At this point I'm able to distibute the textures in a linear order, from 1st to Nth, in any kind of cloner object. But, I don't know yet the limit number of clones that allows this to work properly. So far the maximum I've tested was ten clones, anyways the "switch_rgba" node only supports 20 different inputs, so maybe that will be the limit.

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.

when you post the tutorial, link it up here.

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.