Can't Follow my own Instructions

Some time back I wrote this tutorial about combining materials based on a grayscale UV image, and going back through it, I find I am stuck on the part about getting my materials into the shader editor. My advice was to start with one, then duplicate it, change the duplicate to another material, and go from there, but I am having trouble with that part, as there seems no way to change the duplicate material to the one I want. Here’s the tutorial…I’ll keep trying to figure it out…: Material Nodes: Making a Planetoid ( intermediate-advanced )

I should mention, I substituted a texture coordinates node for the geometry node, which works fine, tested with a ( pair of ) simple diffuse shader ( s ), the trouble being that t’s my pre-built materials that I want, not a simple diffuse shader.

Your instructions are using old material nodes for blender internal. In the current version, you can’t have a material reference like that in the material editor. The way to do it is to have 2 entire node trees inside the same material and mix them using a mix shader. If that seems too crowded, you can group each node tree by selecting all of it and pressing ctrl+g to collapse it into a single node.

Thanks. I was just about to try that, but is there any way I can easily copy my second material into the mix without having to reconstruct it that you are aware of? For example, if I had two complex materials, already existing, such as grass, and dirt, and wish to combine them without reconstructing one from scratch?

You can just go to the node editor, select the whole node tree, press ctrl+c and then paste it with ctrl+v in the other material. (make sure to click one of the node to make it active, or the copying can fail)

1 Like

It’s better to use mix shader and frames, even mix of 2 materials with BW source can get pretty complex:

Using RGB you can mix 4 materials but nodes can get very quickly out of hand:

1 Like

Thanks. I tried that earlier, but failed for some reason. User error I think. I will retry…I am sure I just missed something the last time.

Ah, missed your update. Yes, that is very cool. I recall someone mentioned that in the comments of my tutorial thread. I think it might be time to update the tutorial with a new one. Thanks again for the help.

MixRGB is much faster than MixShader, FYI

Doesn’t that just affect RGB values though? I need all the texture channels and everything in the mix. I am running into some further glitches so I may have to come back to this thread at some point if I can’t figure it out.

You’re correct, but in @Format64 's screenshot, there’s 4 principled BSDFs and 3 mix shaders. You could get rid of all the Principled BSDFs, use Mix RGBs instead of mix shaders, and the result would be WAY faster and easier on the memory :slight_smile:

You’d have to plug the end color into 1 BSDF at the end, but calculating 1 BSDF is much faster than calculating 4


Getting some better results now, and not too slow. Thanks a lot for the help, guys.

1 Like

Hi there, I think it might be interesting to be mentioned that to get better looking results, instead of a simple Mix Lerp, you could make use of a Height Interpolation, I can’t remember if Blender has it but if you’re curious, here’s an example with formula:

https://www.gamedeveloper.com/programming/advanced-terrain-texture-splatting

That looks interesting and useful…Not sure if Blender has it.

Maybe not same math, but you can recreate it by taking mask and mixing it with height or displacement. Here is source vertex color mask:

image

After some mixrgb node and colorramp manipulation you get more complex mask:

Mixed materials:

Note that material blending follows deeper part of bricks first.

3 Likes