Hi, I’m practicing landscape design, but I got stuck in this, I want to have multiple textures on the same material of the landscape
I followed these tutorials from Ryan King Art, but only works with two textures per material, I couldn’t find how to use the same method with more than two, I can only have two textures per mix shader, I can’t find how to add more. Or there’s other different settings or method to do that?
It’s simple, you just add an other mix shader at the end of the chain with the third material. If you want more materials to blend, you can just keep adding more mix shaders in a chain. You will need to paint multiple masks to do this.
You want to chain the material like this. Each new mix shader adds only 1 extra material to the mix, as the rest of the material that previously existed will take one of the 2 slots.
Here, I have used materials without textures for simplicity, but yours would have their set of textures each.
For the different masks, you create a separate image texture for each. You can choose which one you paint by selecting the node in the material editor.
It’s basically a matter of chaining this, with a new image for the mask each time:
You can also pack three masks into one image by using red, green, and blue, and a Separate RGB node. It’s easier than switching between images while painting, instead you just change the brush color
That is the basis for the splatter group node i have in this video for free on my gumroad. I made it possible to just plug in the four image textures and then paint the colors - but the finesse is in using the four separate masks using alpha for combination to avoid the dirty edge mixing.
But I got another question, I changed the scale of the textures with the mapping node, when I bake the textures it resets the value to default on the baked images and it looks weird, I tried to fix it but couldn’t find how. How can I texture bake keeping the mapping values?
The scale isn’t resetting during the bake, you just don’t have enough resolution to capture the fine detail.
If you are working with this mask / blending workflow, you shouldn’t bake the end result. In fact you would use this workflow specifically for situations where a baked texture couldn’t possibly have enough resolution, like a full landscape.
When you bake a texture, you will always be limited to the finite resolution of a single non-repeating texture square. That’s fine for a single prop that’s not too big, but a large landscape would need a texture resolution that’s not feasible. That’s why you use tiling textures, it’s a way to get finer detail by repeating it.
I don’t know how you plan to use this landscape, but ideally you would keep the full setup. If you were to bring this to a game engine, you would be better importing all the textures in the engine (masks included) and re-create the full material setup over there. Many game engines even have a dedicated system to paint landscape with masks like this.
If you absolutely need to bake the end result, increase the resolution of the texture receiving the bake as much as is reasonable, but don’t expect miracles. By the way, you can set the render samples to 1 when baking a material like this, it makes no difference except make the bake slower.
My idea is to keep my designs low poly and low graphic, they’re easier to use and my PC can’t handle bigger graphics
Later with more practice I want to make bigger scenes, with landscapes like this one, and have multiple objects like trees, houses, buildings. So I wanted to have the landscape textures baked to a single material, so it’s lighter than the full material setup with multiple textures, so that frees memory and graphic space to add all those objects and details. I try to have baked textures for most models and I only use textures with 1k resolution or smaller
Without tiling, 1k isn’t enough for large landscapes. Say you have a block 1 kilometer square. With a 1k texture, you will have 97 centimeters per pixel (10000 cm / 1024 pixels). That’s nearly a meter per pixel. If you printed your texture at 300 dpi, you would be using one-tenth of an inch of printed paper to contain the information for a meter of terrain. Your full kilometer of texture data would fit onto a piece of paper 13 inches square.
Tiling helps with this significantly. If you tile a 1k texture 3x3, now you have 32 centimeters per pixel. It’s still not great, if you can go up to 2k, then you’d be at 16 centimeters per pixel, or about half a foot. Ultimately, you can use this basic math to figure out what level of detail you need and work backwards from there
And you could also bake several different resolutions of one material, one version with 1k, another with 2k and one with 4k, maybe even one with 8k, and then use bigger resolution material for objects closer to camera, and lower for the ones further away. I do this often for my baked textures to have flexibility later.
Something you can do to make this setup lighter (instead of baking it) is to limit the number of textures you are using. I see you are using the roughness texture for each material that’s being blended. Is this necessary? Your textures are very rough looking and probably don’t have much variation, so you could probably remove the roughness textures and just directly set a high roughness value on each material.
Also, you could try reusing the color texture as bump by passing it through a bump node (the bump node would need to have its distance value adjusted). This doesn’t work for all textures, but a noisy ground texture might very well give good enough results. If you can pull this off, you can also remove the normal maps and use only the color textures for everything.
Finally, what is the resolution of the painted masks? Those aren’t directly visible, so you could probably get away with using a pretty low resolution. 512x512 would probably be enough for this landscape. Or even better for memory use, you could probably use vertex attributes instead of image textures for the masks (if there are enough vertices to get the level of masking detail needed).
Thanks for the suggestions and help
I tried those different settings and methods, what worked better for my style was to keep it the lightest, either use the baked textures, or to make lighter the material setup by removing roughness and normal for the side textures, and reduced the colour masks to 256x256 and they look the same. Later I want to make bigger landscapes too, so this will work for them to keep them lighter