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.

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 · ·
Mikkel Sandner avatar image
Mikkel Sandner answered ·

@Francisco Cunha - Can you get this to work with a simple cube (that has not been made editable)? My magazine pages are made of cubes and not planes, but somehow the shader doesn't work with cubes. Any other object seems to work fine!

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.

Unfortunately this is a current technical limitation, trying to solve this in a future release, yet it's a bit complicated. I guess the only option at the moment is to make the cube editable (make a polygon object).

0 Likes 0 · ·

Or you can use a step effector and read the display color, which is not as straightforward because color transform is involved. See this thread where I posted an example, teste 1 v02.zip.

https://answers.arnoldrenderer.com/questions/22656/assigning-different-colors-to-mograph-object-based.html

0 Likes 0 · ·

Actually I may be able to fix it for Cubes. Will let you know.

0 Likes 0 · ·

Clone indexes should be fixed for Cubes in the latest release, C4DtoA 3.0.1.2.

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

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

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 ·

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.

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

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

0 Likes 0 · ·

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

0 Likes 0 · ·
clone-index.png (45.9 KiB)

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

0 Likes 0 · ·

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

0 Likes 0 · ·

I don't think anything has changed. I made a quick test and seems to be working fine. Can you send me a scene which is not working? Did you try the same in older versions to confirm it's related to R21 and/or Arnold 6?

0 Likes 0 · ·
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 · ·
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.

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.

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.

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.

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.

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.