Hello, I have created a landscape and painted it with weight blended layers. I used rock and grass for the terrain and now I want to add an area of sand. Ideally I’d like to replace the grass in an area with sand. By replacing it this would kill 2 birds with one stone because I wouldn’t have to redo the nice blending I did around the edges, and I can guarantee that all the existing grass texture is gone in that area. I thought there’d be an easy way to do this but it has proven to be quite the challenge. So here’s what I need. I want to preserve the detail of the rock while changing the grass in the area to sand. Hopefully someone out there can help me. This has been a massive headache.
After the most painful journey through figuring this out, I finally solved it. And for anyone else that has this problem, here’s what you do. Landscape > Sculpt > Select. Select the area you want to replace. Check “Use Region As Mask”, uncheck “Negative Mask”. Go to the copy tool (Landscape > Sculpt > Copy). Do this, Clear Gizmo Data > Fit Gizmo to Selected Regions > Copy Data to Gizmo. Now, under “Tool Settings” hit “Advanced”, and under “Gizmo Import / Export” leave the fields blank and hit export. This will export your heightmap and weightmap files for each texture you have in your M_Landscape material. Now under “Gizmo Import / Export”, select the Heightmap file that was generated in the “Heightmap” field by clicking the “…”. The heightmap size varies apparently, but for me it’s usually one of the 2 median numbers (the ones closest to the middle). Now click “Import”, if nothing changes that’s good, you’ve verified you have the correct dimensions, if your selection does look different, try some other dimensions or start over from step 1 (I used ChatGPT to help me know which dimensions to use). Then just under the Heightmap section find “Target Layers” and add an array element. “Target Layer File Name” should be the file you want to replace, for me that’s grass, and “Target Layer Name” is whatever the texture you’re replacing it with is named under Landscape > Paint > Target Layers > Layers, so for me I Chose Sand with the layer name “Rippled Sand”. You can now paint the texture, but you’re not done yet because painting will cause the textures it’s blending into to become black. Luckily this part is easy. For every Texture that is blending with the texture you replaced, you’ll want to make another element for (Landscape > Sculpt > Copy > Tool Settings > Advanced > Gizmo Import / Export > Target Layers > Add Element). And then simply Choose the file for “Target Layer File Name”, in my case “Rock.raw”, and the corresponding texture name, in my case “Rock”. Now you can either paint over the landscape using the copy tool, or you can CTRL + V to paste everything being changed in the selected area. I hope this helped, good luck out there.
UPDATE: If it still isn’t working for you, it might be because you have spaces in your target layer names. That’s what happened to me and i spend all day trying things until I pinpointed the issue. If your layers have a space or spaces in them, there is a way to save the heightmap/weightmap data using Landscape > Manage > Import and exporting the heightmap of your landscape along with whichever target layers you want to export as well. Make sure you check “Single File Export” otherwise you’ll get a file for each partition of your landscape. Then you’ll have to delete your layer infos since you can’t change the layer name they are attached to. Then in your landscape material, select all the layer blend nodes and make sure each texture name includes no spaces. After this apply and save. Go back to Landscape > Paint and hit the button that creates target layers from your material. Create new layer infos for each one of these target layers. Inside each of the infos, make sure to set the blend method to Weight Blended (Legacy). Also if you crash at this part, try loading only a small part of your landscape instead of the whole thing. Now you can import your heightmap/weightmaps by going to Landscape > Manage > Import and importing each of the files you exported before. With that done, you’re finally ready to replace a piece of lands texture with another. i hope this helped.

