Mixing materials using color ramps (and distributing with a random seed)

I’m creating some procedural abstract art in Blender. My goal is to create a material that mixes multiple shaders, with a seed driving the distribution of the mixed shaders across my geometry.

Right now I think I’ve got it working, but since I’m pretty new to materials in Blender it would be great if someone could take a look at what I’ve done to make sure I’m getting it right :slight_smile: I want to make sure that:

  • I’m using the color ramps correctly to cleanly divide up my mixed shaders (I don’t want any shaders to blend together and affect each other, if that makes sense?)
  • My distribution of shaders is random, but even.
  • Even if what I’m doing is correct, there’s not a more efficient/better way of doing what I’m trying to accomplish.

Here is my material setup: enter image description here

Here is the result on my geometry (I’m using ugly colors for now, just so we can see what we’re doing): enter image description here

And here is the random seed in action, affecting the distribution of the mixed shaders. enter image description here

If what I’ve done so far shows a misunderstanding of how any of these material nodes should be used, an explanation would be greatly appreciated – as a heads up, it’s entirely possible that I stumbled upon my current solution by accident! Thanks in advance.

1 Like

Nice solution! For me the take-away is that you can have additional “seeding” to the Random object info node’s output.

I have my doubts as to application though as my feeling is that this particular procedural generation will be difficult to generalize for more than 4 materials. When you get to that amount, particle instancing or geometry node instancing of a collection of linked objects with separate materials start to make more sense.

I understand that you may want wildly different materials, but for this example a single constant color ramp with multiple controls (i.e. pressing the “+” button in the color ramp node) into one principled shader would have been enough.

Unfortunately I think this may lead to the “just because you can do it, should you do it?” discussion, as the result of that discussion ultimately lies in what it is you want to do with it.

Good work!

1 Like

I was just about to say this. I did something similar to randomise the colour of stones here. Nodes below. I maybe misunderstanding what you mean/require here.

It depends how even you want them, for me it was not such an issue. But if you evenly spaced the breaks in the colour presumably you’d get near enough (oh god, probabilities were not my strong point).

1 Like

Thanks for the insight! I think the max amount of materials I would want to mix is 5, but more commonly I would use 3-4, so this setup works for now… Weirdly, I hadn’t thought about separate materials for separate objects instanced through geometry nodes. It’s so obvious now that you say it!

I guess I was trying to keep my geometry setup as elegant as possible and just assumed I would have a complex material. Currently, I’m using a bunch of nested geometry nodes to create the structure, with everything instanced off one cube, a wireframe cube, or an empty cube. And I also have a random seed driving the geometry layout too! Man, I’m loving geometry nodes :sunglasses:

And yes, my plan is to eventually have some big variations in material appearance (metallics, glass, plastic, clay, etc) but it’s good to know that for this example something more simple would have sufficed.

Thanks again!

1 Like