how to combine two landscape materials

I have a material for the landscape with 3 textures and another material for the landscape with 6 textures, how to leave it in a single material for the landscape

You would have to combine the logic of the two materials. At least copying one into the other and adjusting for the differences in textures.

One material might be basecolor + normals + height textures and the other have more textures. You noted 3 vs 6 textures so I don’t know w/o seeing. Depending on how each material is built, it might take some legwork to do this.

What do they hold, what are the textures named? Is, for example, one set using a packed rough/specular/height and in the other, they all happen to be the same textures just different files (unpacked)? Does one material use something the other does not, for example, is one using a heightmap but the other material isn’t?

I’m not going to rope myself in and explain step by step since I don’t know what your end-result is supposed to be, but if it’s not a proprietary product, and you can snap a picture? What kinds of textures are we talking about? I might be able to at least offer some direction.

2 Likes

Thank you very much, how do I show you the nodes since there are several and in the screenshot it does not look as detailed, in an email or something passing the material? or remote desktop

1 Like






1 Like

Thank you very much, how do I show you the nodes since there are several and in the screenshot it does not look as detailed, in an email or something passing the material? or remote desktop

1 Like

It is a material (landscape). The first material is the one with all the color boxes, and the other material is on the left side alone without the box. I would like those two materials to be able to paint with both at the same time in the land

So this is what is ultimately going out to the shader:

That node that says ‘BaseColor’ (in blue) then hooked to the ‘Base Color’ node on the right is what is going out as, well, the base-color, the RGB of what you are seeing. The one hooked to Metallic, the same, Roughness, etc; anything that has something plugged into it is being used. That node they are plugging INTO is the output node of the entire shader, so whatever ends up being plugged into that is what is ultimately included in the compiled shader.

That being said, it looks like there are lots of textures at play, you are likely looking at combining/packing a few of them… As for the logic, the rough 10,000-meter view is that the set of things that drive the basecolor path, for each material, would need be merged. Same for Roughness, Specular, etc. As well, to make it even more complex, each of those logic-paths might intersect, it can very from shader to shader as it’s all up to the artists to decide what means what, if a texture gets used for both Roughness AND Specular (as an example, not a rule!), or if there are other sharing/trade-offs at play. There’s no ‘correct’ way to write these things, it’s mostly art.

If you right-click that blue BaseColor node and pick select upstream-nodes, you can see what ends up feeding into that particular node, so you can a least work towards isolating particular maths. Otherwise what you are asking about is something moderately-advanced as you are looking to break down both shaders and combine them vs making a brand-new one. Dipping-in to someone else’s code is always a trick-affair.

Specifically in terms of sharing, we can see how this same texture is apparently the height for both rock and dirt (grainy pic, assume that is what the labels say):

To my way of doing things, that’s…odd. I’d be using distinct heightmaps for each layer, distinct basecolor and the like. Here it seems there is a lot of sharing, so that’s just going to add complexity :frowning:

What’s wrong is that the terrain was made in the program (world creator) and imported into unreal, now I have a material and I want to add more textures to paint the terrain, I can pass the file to it but not from where and how

When using landscapes, you typically would add named-layers into the stack in the material with the landscape layer sample node:

Once you add those to the material, they should show up as paintable-layers in the editor UI. Make sure you are in landscape edit mode and in the paint panel:

Here’s a good tutorial to bone up on material and landscape skills. It’s a bit dated, but the tech all still works in 5.x. If you are newer to Unreal, or materials at least, this might be a good place to start learning: https://www.youtube.com/watch?v=NAJhppttJgI