Kite Demo lake material shoreline

Hey everyone,

I’ve been trying to figure out how the M_TilingDisplacementTest_01_LAKE material works, in particular the Landscape_Intersection_Blend material function. I understand the blueprint for it and everything, but what I cannot for the life of me figure out is why the final material seems to use a sort of ‘static’ representation of the landscape and even figure out how to update this.

Take for example this shoreline here:

This follows the shoreline perfectly and blends / calculates it correctly.
However, if I move the landscape backwards:

Then the material doesn’t blend correctly anymore. It’s almost like at some point the layout of the landscape is calculated once and then stored in a cache and this is what the material looks up in. How do I force it to update this, so the material properly calculates the shoreline along landscape that has been moved?

I havent looked at the kite demo (too many gb’s to download ^^), but I think they probably did it with vertex painting -> go to the vertex paint mode and try to paint :slight_smile:

Ah, my mistake for not mentioning. I’m using the ‘Landscape_Intersection_Blend’ set to true here here:

and yeah, in case I don’t use that, you’re right and it’s using the Vertex Color as expected from looking at the material.

This is the material function used: (I don’t really know if this is the correct way to share blueprints, but here it is in pictures from the blueprint editor)

But your information did give me an idea as to what caused this and I figured it out. So to any future people arriving at this thread:

You can see the Texture Sample that just appears as gray in the middle? That’s infact this heightmap:

Combining that heightmap with the 4 values taken from Parameter collection, that’s effectively the mask for the entire landscape in a nice pretty range between 0 and 255. All I had to do was update the Corner1 and Corner2 values to the min and size of my own level and then update the heightmap there to one that matches my own landscape. After I did that and rebuilt the shader, everything works perfectly.

So thanks a lot for your help .