How to make paint dirt square

Hi everyone,

I have a question about the correct material and how to make landscape painting square instead of round. I have the following brush material:

And this is how I’m using it in my blueprint to paint dirt on the landscape:

Everything works fine, but the issue is that the dirt is round:
image

while I would like to make it square shape around the building. I have found how to make a material square:

But this doesn’t help me to make the painting under the building square shape regardless of how I’m adding this to my Brush.
Does anyone know the way of doing this?

Thanks a lot.

1 Like

What’s much easier, is to use distance fields.

Then whatever shape you put down, the sand is always correct :slight_smile:

The ‘distance to nearest surface’ node ( usually divided by 100 and clamped between 0 and 1 ) can be used to lerp between the land and sand.

Thanks for your answer, but could you please elaborate as I’m not so good in materials.

BR

1 Like

I use it all the time with ground materials

DF ground

It’s just this

image

( make the DF intensity param 1 )

and you use it to lerp between sand and the other kind of texture. In the grass mat above, I just use it to change the power of the texture to make it look darker.

Thanks, I will chck this now

1 Like

( you also need to turn off ‘affect distance field lighting’ for the ground mesh )

What am I doing wrong in here:

Cause it doesn’t work with the spawned buildings. Also, where can I find this param: ‘affect distance field lighting’?

1 Like

In the mesh details, in the level, you need to turn off ‘affect distance field’, otherwise it will just be black, because its affecting itself.

It’s the main thing you need to do :smiley:

Thanks for your help, but I definitely missing something as I still do not have any effect on landscape around meshes.

I have disabled affect distance field lighting on the landscape.

so if I change DF_Intensity to 0 I have sand everywhere and if I set it to 1 I have grass everywhere. Now how do I force it to change based on the mesh on the landscape?

Thanks for your help.

I think I have found a solution. The issue was in the project settings - rendering - “generate distance fields” this should be enabled, otherwise it doesn’t make any difference.

Thanks a lot for your help.

1 Like

Yes, I though that was the default :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.