How to use lots of images texture on a terrain mesh

Hi There,

I’m working on a project to represent a portion of land with Blender.

I have one mesh that represents the terrain morphology and lots of .tiff (and/or .png) images, with the same extent of the terrain, that covered the different land covers/uses (e.g. roads, rivers, urban areas, parks).

here the terrain mesh:

here an example of an image representing the river:

My goal is to use the images to select different colour and effects (on the mesh) for each land covers/uses.

I tried to do this with the Shader Editor and build a structure with some images inside a single material applied at the terrain mesh.

here the shader editor structure with just two images as texture:

However, using the mix shader the ‘influence’ of a single image is lower as you insert more of them.

here the result of the shader editor applied at the mesh:

Do you have any suggestions for using the images to give different colours and effects at the mesh?

Thanks in advance,
Giulio

If I want to mix more than two materials, I’ll often create a normalized weight (by adding all weights the dividing by the number of lookups), mix each material from black emission (really, just an empty socket, same thing) by the normalized weight, and then use add shader nodes to mix them all together. That way, there aren’t any issues from mix count or order.

Edit: I described normalization poorly/wrong. Divide each weight by the sum of all weights for a normalized weight to use like this.

1 Like

If the terrains are not overlapping

Create each materials

Mix two materials with the black white image as the factor

Mix the output with another material with the bw image as factor …

If the order matter the latter terrian would overwrite the previous one

Blender doesnt have a functioning layering system yet

1 Like

Hi @bandages, thanks for replying!

Yes, your method it’s really interesting!! Can you just attach a screenshot of the shader editor as an example?

Thanks a lot,
Giulio

You can use masks to create more than one layer. Another way are cryptomattes. https://www.youtube.com/watch?v=VBJQM-gIob8

Sorry, I’m stuck on mobile for a few days. But I’ll try to remember to show a quick demo when I get back to my Blender box.

Here I’m doing it with images/mix RGB, to mix 3 rock textures, but it’s the same technique for shaders (if you want to mix glossy/diffuse/whatever):

For shaders, just use mix shader instead of mix rgb and add shader instead of add rgb. Same inputs.