How to automate landscape layer painting using a texture map

Basically, I’m trying to use a Brushify landscape material

And instead of painting the different landscape layers myself, I’m trying to come up with a Blueprint solution to take a color map

And have this automatically assign a respective landscape layer to that area only.

Is something of the sort possible?

Totally, take a look at this pack

It’s how it’s done :slight_smile:

1 Like

Thank you! I’ll have a look through this asset!

1 Like

@ClockworkOcean Is it possible to link me towards some documentation/tutorials for this?

The only showcase video on the asset page seems to be private so I went through the asset’s landscape material and understood some things like how they’re using Splat Maps, though the concept is very new to me.

Could you point me towards any documentation that I could use to accomplish this?

1 Like

You have to get it and take a look at the material ( it’s free )

As you can see, the vendor is using a multi-channel texture to control where each texture is going on the mesh

It’s literally just using this texture to lerp where each texture goes :slight_smile:

Yes I understand that. :smiley:

What I’m confused about is, how do I translate that knowledge in order to modify the Brushify landscape automaterial to do the same as that is set up to use landscape layers. That’s what I’m still looking into

1 Like

Ah, that I can’t say. Because it’s not a mesh, for starters.

How is it going to make sense? You can’t sculpt the landscape anymore, if the texture is controlled by a splat map.

1 Like

Hi, the way ClockworkOcean shows gives the best resolution for mixing layers - but there is another way, that comes for free, but slightly less res (a painted resolution).

When you import a heightmap for the landscape, you can assign the landscape material - and specify splatmaps for each of the landscape layers - you could paint 3 textures (the same size as your heightfield map) in diagonal strips like you’re after - then point the correct layers to those splatmaps:

2 Likes

Yeah! :sunglasses:

1 Like

Yes sculpting is not an option anyway

Thank you! I’ve been trying this out at the moment. Though I need to go a bit back and forth with my maps guy. We are basically trying to get a tile and use these annotated images to automatically apply a specific landscape layer to the area under a specific color.
As of now, it keeps giving me an error that the import size doesn’t match the current landscape extent.
image

That being said, I haven’t received a map tile from the mapping guy yet and am just trying to build a system without it at the moment with the default landscape. Not sure why the extent is always 0x0 even when I use the select tool to select the landscape tiles


Once I have all this down, I’m trying to see if I can make an editor utility to import a map tile and an annotated image and have this setup done automatically so that I don’t have to manually assign all of this for every tile. There will be lots of tiles

2 Likes

That way requires you to import the landscape as well rather than apply it to existing tiles.

The sizes of the textures have to be special too - they need to conform to the landscapes section and component values, about 3/4 way down the link below shows the sizes that can be used:

I haven’t tried, but I think you can suffix those paint maps with the same as the heightmaps, and if you’re creating the whole landscape from scratch it will assign the correct heights and paint weights to each tile.

If you’re wanting to build up the level bit by bit - maybe look into Landscape Blueprint Brushes:

1 Like

Thanks! I’ll have a look at those too! As of now, I’ve been trying to see where I can modify the Brushify material to apply each layer according to a Splat Map rather than manually painting landscape layers.

This material function is where we can create and assign new layers to the Brushify materials. I think this is where I can get this done

Check out this tutorial on splatmap based materials:

1 Like

Thank you! Having a look through this

1 Like

Is there a material node that masks according to a custom color not just RGB?


I’m trying to take this texture, turn everything that isn’t this shade of green black.

Need to do this in material. Any tips?

No, no node to do that, but it’s possible by using math on the channel (0-1) to quantize it (eg check for 0.1, 0.2 - 1.0) to a value you can use that for the lerp.

(edited)
Here’s an example of breaking it into 5 lerp’able values:

@RecourseDesign Thank you for this. Could you elaborate a bit further? which node do I connect to the input of this and which nodes do the outputs go to?

Yeah sorry that was a bit vague, I missed a couple of nodes you’ll need too.
What I’ve done in one project is to create a material function that does the splitting - the full function is:

You can choose any number of subdivisions (depending on your compression type).
To blend with that function, you can do something like:

Thank you @RecourseDesign @ClockworkOcean !

I was able to use your solutions with a combination of a solution in this thread ( How do I change a specific color within a texture? - #12 by Marcus-Universe )

And came up with a similar method to blend the landscape layers through annotations:

Essentially converting the annotation color to a black and white opacity mask and then blending material attributes with the opacity mask as alpha.

This is inside the Material Function: The function is just for cleaning up.

Final Result. Grass Dry is the base layer, Grass is layer one, Desert is layer 2.

PS: I should add that the Landscape Coordinates node must have an accurate mapping scale, which should match your map tile resolution.

If you’re importing your map through a heightmap. The resolution should match the heightmap otherwise, the layers will scale incorrectly across the landscape.

Thank you to both of you for so much assistance! <3

I hope this helps anyone in the future.

3 Likes