How to "Get texture at location" on landscape?

Hey, I would like to get information about which texture is used at a specific location of a landscape.

So I want to be able to know whether there is grass or dirt or anything else. It should be used for letting the player place certain buildings only on ground where for example is grass or stone.
You know, you cant really place a farm on stone, while you also cant place a quarry on dirt.

I don’t want to have to place other objects in the editor for marking where specific “resources” are, because it would be a pain to really keep this synchronous with the applied texture to the ground. It should really just depend on the texture.

How can I do this? Any help is appreciated :slight_smile:

No answer? So it’s just not possible I guess. What other approach to reach the same would you suggest?

The only issue I can see, is that if you find a location, it is just 1 dot in the entire world. It would take a fairly complex set of nodes to look in every direction and confirm that every one of those dots are also “Dirt” for example.

Have you thought about putting down a Hex pattern over you landscape, and run the results from that?

Have you toght about using a trace and have it return the Physical Material?
It should be ferly simple to to pick up i don`t have any code in front of my atm but.

You do a trace and check the Physical material of that, its a good idea to add the Trace Channel that will only hit landscape.
And that should be it, check what Physical Material is returnd and do what ever.

Hope it helps.

Some Sort of trace maybe?

This simple tutorial teachers how to get a trace location.

I appreciate any answers, I know very well how to do a trace :wink: I have tried getting the physical Mat out of a trace of course before I posted here, but since a landscape only has one material with different layers, the trace always just return this one material which is useless since it contains all textures like grass, dirt, stone etc.
I have no problem with only getting 1 dot in the whole world, I would always make multiple traces per building which needs to be placed, for example one in every corner.
I would not really like to use tiles, generation and handling would waste a lot of performance since I don’t really need them.
Still, thanks for the answers :slight_smile:

no idea? :frowning: