Getting physical surface from landscape material.

Problem:
I have to know where on my landscape is water, grass, mountains etc., but I use landscape material from Kite Demo where all textures are generated based on landscape shape not by painting tool and LandscapeLayer are empty. I don’t want to repaint whole landscape layer by layer because it’s too big and when i change later in game some mountains I don’t want to repaint again.
My solution:
Now I use LineTraceByChannel to shot in the ground and I read the physical Material from it. It works for simple stuff like object, but not for Landscape because it always shows the same Physical material for every texture. Is there any way to attach independent physical material to every texture used on landscape or bake this textures on independent LandscapeLayers? Is there another way to solve this problem?

You can get get different physical materials from landscape, but only for weight-blended layers. You can’t bake distribution of physical materials from landscape shader yet, but there was a feature request for such functionality.

So there is no chance for that solution yet… Maybe there is some other way to deal with it? It don’t have to be super precise. Maybe some screenshot of my top-down landscape and searching this texture for specific colors ( white = ice, green = grass, blue = water etc.) but i need some guidance here because I don’t now how to implement this in Unreal. I’m just trying to thing outside of the box here :stuck_out_tongue:

Well, I am not a coder, but theoretically you could render your landscape once with a different material, where you would encode surface ID yourself. On game start you would read pixel data from the texture, you’ve baked and store it some sort of array. An when you need to retrieve physical surface(collision, footstep, w.e.), you would select corresponding value from this array. Pretty sure it lies outside of what API can offer, but should be doable. At least this was my initial plan to solve the problem.