So i have a red boat. The hull is red.
I want to duplicate the boat (like ten times)…and I only want to change the color of the hull. THat’s it.
But whats the best way do do this? The hull material stays the same… I just want to change the color of it. But when I duplicate the boat now… and change the color of 1 boat… all the boats change color and I dont want that…
Do I need to duplicate the material 10 times? Or is there a way to do this more easily?
If you want random colors you can use the object info node and use the “random” ouput connected to a color ramp.
If you want control over your colors you can use the object info node and use the “object index” output. You can set the object index in the object panel ( which is called pass index there for some reason) and set a different index for each object.
Now, the color ramp ranges from 0 to 1. So if you have an object with an index 1 or above it will simply use the maximum value of the color ramp. Becauese of that you have to divide the value of 1 into as many pieces as you have objects. For example if you have 10 objects you would divide 1 by 10 which is 0.1
You then multiply the object index output with 0.1.
Then you divide your color ramp into 10 equal parts. Because of rounding errors you have to set the position a bit lower than the what it acutally would be. For example if the correct position is at 0.9 you would set it to 0.89.
You should also set the color ramp to “constant”.
This is difficult to explain in words but it is simple to see in the image.
If you want a random color, feed Object Info/Random or Object Info/Object Index to a noise node with 42.5, 0, 42.5 as the parameters. The noise color output gives you three random values, although I suggest going through a color contrast node. Use color directly, or go via a CombineHSV node if you want to have some controls over the randomness.
Thanks for you answer…im getting close but not quit yet
I made the shader like the image… and put 10 colors on the ramp … on the right locations.
But im not quite sure how the number of the pass index, relates to what color.
So lets say I have blue on position 0.699 on the color ramp…
What index pass should i put in to use this color?
Personally I mix gloss in the following way. It is a bit more complicated than simply mixing in glossy but more physically accurate. I believe it is more physically accurate than the PBR shaders Albedo/Metallic workflow as well but I´n not certain of that.
You can either eyball the curve or you can get more accurate curves at places like https://refractiveindex.info
You want to grab the green “non polarized” curve right next to “Reflectance”.
Note that the shader setup is different for metallic materials.
And if you have an input on duplicates that keeps count (like particles), you can use the math modulo function to repeat a set of given colors. Dividing it by the number you set it to keeps it in the 0 to 1 range the color-ramp (or any other mixer) is looking for.
It’s not more accurate, as you’re not handling the reduction of output based on roughness as PBR shaders/Principled is doing. Also your first point appears to be zero in y, which is not what fresnel gives for typical dielectric materials. I would simply use the Principled BSDF, additional F0 reflectence control can be achieved with the specular value (0.5 is a very good starting point for most dielectrics - when you change it it’s typically for artistic reasons rather than for accuracy reasons except for specialty materials like liquids and gemstones).
@OP: Replace the Diffuse BSDF with a Principled BSDF and you’re good to go. Adjust roughness as required.
With particles it is often useful to give them a velocity and angular velocity even if the particles are static.
These are 6 more values you can use to control all kinds of things.