Announcement

Collapse
No announcement yet.

How to "Get texture at location" on landscape?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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
    Easy to use UMG Mini Map on the UE4 Marketplace.
    Forum thread: https://forums.unrealengine.com/show...-Plug-and-Play

    #2
    No answer? So it's just not possible I guess. What other approach to reach the same would you suggest?
    Easy to use UMG Mini Map on the UE4 Marketplace.
    Forum thread: https://forums.unrealengine.com/show...-Plug-and-Play

    Comment


      #3
      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?

      https://forums.unrealengine.com/show...highlight=tile
      http://www.seven-mountains.eu/

      Comment


        #4
        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.
        WCode
        Last edited by WCode; 01-05-2015, 03:29 AM. Reason: spelling

        Comment


          #5
          Some Sort of trace maybe?
          Click image for larger version

Name:	pbTjwKa.png
Views:	1
Size:	95.8 KB
ID:	1064853

          Comment


            #6
            This simple tutorial teachers how to get a trace location.

            https://www.youtube.com/watch?v=DTNO4kULts4
            http://www.seven-mountains.eu/

            Comment


              #7
              I appreciate any answers, I know very well how to do a trace 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
              Last edited by John Alcatraz; 01-05-2015, 02:05 PM.
              Easy to use UMG Mini Map on the UE4 Marketplace.
              Forum thread: https://forums.unrealengine.com/show...-Plug-and-Play

              Comment


                #8
                no idea?
                Easy to use UMG Mini Map on the UE4 Marketplace.
                Forum thread: https://forums.unrealengine.com/show...-Plug-and-Play

                Comment

                Working...
                X