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

Multi texture shader to cloner objects

Message 1 of 33
3584 Views, 32 Replies

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.

Tags (2)
Labels (2)
Message 2 of 33
in reply to: helloVPV7X

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

Message 3 of 33
in reply to: helloVPV7X - Watch this you'll get all the info you need.

Message 4 of 33
in reply to: helloVPV7X

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.

Message 5 of 33
in reply to: helloVPV7X

One Arnold Shader with multi textures (Maya):
Use Tokens <attr:> or <shapename>
video here:

Message 6 of 33

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:

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.

Message 7 of 33
in reply to: helloVPV7X

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.

Message 8 of 33
in reply to: helloVPV7X

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


Message 9 of 33

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

Message 10 of 33
in reply to: helloVPV7X

i forgot there was a tutorial( ) on this..(arnold 4)

Message 11 of 33
in reply to: xebajac

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.

Message 12 of 33
in reply to: Mike_Ligocki


Message 13 of 33
in reply to: helloVPV7X

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.

Message 14 of 33
in reply to: helloVPV7X

when you post the tutorial, link it up here.

Message 15 of 33

The new version, C4DtoA 2.5.1 exports the index of the clones as a user data. So now you should be able to use a user_data_int shader with the attribute index, to do an easy linear shading over the clones.

Message 16 of 33
in reply to: helloVPV7X

Thanx @Peter Horvath that's great and it works perfectly! 🙂

Message 17 of 33

Please show an example..I've forgotten the way.

Message 18 of 33

Here's a simple example with a switch shader and the user_data_int reading the index of the clones.


Message 19 of 33

Thanks..I'd already figured it out some days ago..still thanks

Message 20 of 33

Hello, somehow in C4D R21 and Arnold 6, this isn't working... what has happened?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums