question

Ariff Jeff avatar image
Ariff Jeff asked ·

Color gradient on cloner objects that is NOT random?

I'm basically trying to recreate this image with Arnold in C4D on a cloner: Radial rainbow pencils

Notice how each colored pencil has a color that is one part of the gradient that combines to create a nice rainbow gradient of colored pencils. This is what I want. Unfortunately, I cannot figure out how to do this. The closest I got was Greyscalegorilla creating RANDOM rainbow colors on legos. I managed to produce a random mess via the tutorial with the utility and ramp_rgb nodes where each pencil is just randomly colored like this. I would share a screenshot of my work for reference but Arnold Answers isn't letting me upload/link images right now for some reason ("Error parsing the uploaded file.").

I do not want random. I want a nice smooth gradient created from all the pencils.

How can I do this with Arnold? Thanks!

textureshader
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 ·

Check out this thread. Since C4DtoA 2.5.1 you can read the index of the clones via a user_data shader, which you can convert to a [0;1] interval with the range shader and control a ramp.

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.

Thanks, Peter! Your advice was perfect and I've got it working now with just those 3 nodes. The hardest part was figuring out that I had to set the Range node Input Max to the total number of cloned objects in order for any actual color gradient to show up (unless there's a better way to do it?).

That thread contained info that was useful up to a point where I just started to get confused with a lot of stuff. Turns out I'm not very good at creating shaders.

Regardless, thanks again!

1 Like 1 · ·
Ariff Jeff avatar image
Ariff Jeff answered ·

@Lee Griggs I definitely can. That was my first idea. I’m only trying this other method now because I wanted to be smart about it and not have to create a whole lot of shaders with only a color correction change on the diffuse color for each. Trying to be efficient but it ironically is causing me to take up much more time!

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.

Lee Griggs avatar image
Lee Griggs answered ·

Can't you create shaders for the pencils (only 20)?

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.

Ariff Jeff avatar image
Ariff Jeff answered ·

@Lee Griggs I should probably mention that the cloner objects are going to be animated somewhat complexly and so I think simply projecting a ramp isn’t going to work.

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.

Lee Griggs avatar image
Lee Griggs answered ·

Have you tried projecting a Radial Ramp?

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.