Using multiple textures based on geometry... how?

I found the “Slope and altitude based materials in Cycles” tutorial by Pelle Nilsson on the BlenderNation page, and found it a good way to solve a problem in my pet project.

It works very well, but where this tut applies only two different textures based on sloping, I have eight different textures that need to be applied.

I managed to build up a node setup that provides me with an index value to tell me where to use which texture.

But the only way to use these different textures on a single object that I found is the use of the “mix shader” with a fitting factor applied.

With eight different textures, this results in an enourmously complicated noodle node setup.

Is there a simpler way to index textures and use them by simply calling up this index value?

You would simply extract the normal and slope information as a black and white mask and then use color-ramps to dictate the exact values needed for height and slope.

You then mix the textures and values like normal.

Textures can also be mixed via Mix RGB node.

This I managed to achive. Noodly enough. :wink:

You then mix the textures and values like normal.

“Like normal”… that means: two at a time, doesn’t it? That is what I wanted to circumvent.
But there isn’t any other way, is there?

It is always: “mix input 1 and 2 by factor x”. It is not possible to have “use input specified by index x”.

Or did I miss something here?

Textures can also be mixed via Mix RGB node.

That doesn’t answer my initial question, but it helps to simplify the node setup. Thank you!