Announcement

Collapse
No announcement yet.

Blending Landscape Material by Height and by Splatmap

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

    Blending Landscape Material by Height and by Splatmap

    Hello I'm having trouble with blending materials on my landscape by height while still being able to control the placement using a splatmap from World Machine.

    I don't want my materials to blend softly, but I can't manage to find a solution, most tutorials just use the height blend as a RGB channel from the splatmap, which defeats the purpose of the height blend.

    I've only found one thread online about this issue and it was never answered https://answers.unrealengine.com/que...d-splat-m.html

    #2
    BUMP
    I really need to know a solution to this

    Comment


      #3
      You should describe in details, what exactly are you trying to achieve.

      Comment


        #4
        Originally posted by Deathrey View Post
        You should describe in details, what exactly are you trying to achieve.
        I'm trying to set up a material for a landscape, I have a heightmap which I'm using as terrain, plus some masks/splatmaps that define the placement of certain layers on the terrain.
        Now to set up that material I have 3 choices, one is to use Height Blending and use the mask as height input, another option is to use weight blending and use the mask as layer info and the last option is to use material functions and blend them together with the mask as alpha input.

        All of these options don't allow me to use Height Blending the way it's meant to be used: having rocks for example sticking out of grass.

        I wanted to know if anyone knows a solution to this, I know it is possible because in the Kite Demo they did it

        Comment


          #5
          Just overlay a tiling contrasty B/W map on splat map channels.
          Artstation
          Join the support channel
          Gumroad Store

          Comment


            #6
            Originally posted by Maximum-Dev View Post
            Just overlay a tiling contrasty B/W map on splat map channels.
            Ok thanks a lot for replying, I'm new to unreal engine, but I think I got what you mean.
            I overlay the tiling height map of my rocks for example with the alpha channel (mask from the splat map) for the height based blending?

            With what settings do I overlay it? Just a 50% blend or what?

            Comment


              #7
              You can use the material function "Height Lerp" with splat maps and then you don't need to mess with the landscape layers at all. If you want to use them with the layers it is possible but a bit more work. basically you get your layers imported as height layers and then you sample them inside of the material by placing a layer sample node and using that as the "Transition Phase" of the height lerp node and then you hook up whatever rock heightmap you want as the Height input.

              There is also a built in kind of height blending in landscape by using the "Layer Blend" node and selecting Height Blending. It just depends on if you want to give final control of the layers to the landscape system or just keep them as splat maps. If you do the latter you won't be able to use the landscape painting tools.
              Ryan Brucks
              Principal Technical Artist, Epic Games

              Comment


                #8
                Originally posted by JakBB View Post
                I'm trying to set up a material for a landscape, I have a heightmap which I'm using as terrain, plus some masks/splatmaps that define the placement of certain layers on the terrain.
                Now to set up that material I have 3 choices, one is to use Height Blending and use the mask as height input, another option is to use weight blending and use the mask as layer info and the last option is to use material functions and blend them together with the mask as alpha input.

                All of these options don't allow me to use Height Blending the way it's meant to be used: having rocks for example sticking out of grass.

                I wanted to know if anyone knows a solution to this, I know it is possible because in the Kite Demo they did it
                Either do it somewhat like this:
                 
                Spoiler


                Or use landscape layer blend node, plugging in heightmaps, and import your weigthmaps one by one.

                Comment


                  #9
                  Originally posted by RyanB View Post
                  You can use the material function "Height Lerp" with splat maps and then you don't need to mess with the landscape layers at all. If you want to use them with the layers it is possible but a bit more work. basically you get your layers imported as height layers and then you sample them inside of the material by placing a layer sample node and using that as the "Transition Phase" of the height lerp node and then you hook up whatever rock heightmap you want as the Height input.

                  There is also a built in kind of height blending in landscape by using the "Layer Blend" node and selecting Height Blending. It just depends on if you want to give final control of the layers to the landscape system or just keep them as splat maps. If you do the latter you won't be able to use the landscape painting tools.
                  Whatever method I have always tried it always ends up having a soft falloff at the end of the height blend.
                  For example here you see the height map blending doing well until it gets close to the sand, there's still a soft falloff where it just "fades out" to the sand.




                  As opposed to what I've seen in a Frostbite 3 video where there's no fade out at all. (Image scaled up, resulted in some blur).





                  In case you already know a solution can you please break it down for us? everybody would appreciate it.
                  thanks.
                  Artstation
                  Join the support channel
                  Gumroad Store

                  Comment


                    #10
                    Originally posted by RyanB View Post
                    You can use the material function "Height Lerp" with splat maps and then you don't need to mess with the landscape layers at all. If you want to use them with the layers it is possible but a bit more work. basically you get your layers imported as height layers and then you sample them inside of the material by placing a layer sample node and using that as the "Transition Phase" of the height lerp node and then you hook up whatever rock heightmap you want as the Height input.

                    There is also a built in kind of height blending in landscape by using the "Layer Blend" node and selecting Height Blending. It just depends on if you want to give final control of the layers to the landscape system or just keep them as splat maps. If you do the latter you won't be able to use the landscape painting tools.
                    Originally posted by Maximum-Dev View Post
                    Whatever method I have always tried it always ends up having a soft falloff at the end of the height blend.
                    For example here you see the height map blending doing well until it gets close to the sand, there's still a soft falloff where it just "fades out" to the sand.

                    As opposed to what I've seen in a Frostbite 3 video where there's no fade out at all. (Image scaled up, resulted in some blur).


                    In case you already know a solution can you please break it down for us? everybody would appreciate it.
                    thanks.
                    Ok so you don't know a solution either Maximum?

                    Ryan didn't you work on the Kite demo? If yes, could you enlighten us on the methods you used to avoid the soft blend on that map?

                    Comment


                      #11
                      Its what I already mentioned, we used the "height lerp" material function and sampled the landscape using "Layer Sample". Then I simply took "Layer Sample" and hooked that to the Alpha of a Lerp node with 0 as A and 1 as B and then used it with the height lerp node as mentioned above.
                      Ryan Brucks
                      Principal Technical Artist, Epic Games

                      Comment


                        #12
                        Originally posted by RyanB View Post
                        Its what I already mentioned, we used the "height lerp" material function and sampled the landscape using "Layer Sample". Then I simply took "Layer Sample" and hooked that to the Alpha of a Lerp node with 0 as A and 1 as B and then used it with the height lerp node as mentioned above.
                        Ryan, please be so kind and reply me. How do you sample the landscape layers in your material for kite demo, when there is no landscape layer blend node? How do you create the layer info? I found your material way to complex (to understand) for the realism it has to offer (worn-out) and in some places very weird - tilling cliff tilling method (you could do it inside the material function more organized )

                        Comment


                          #13
                          You don't need a blend node to sample layers.
                          in fact, I get better performance creating layer samples manually vs using a layer blend.
                          I'm not sure if that's why kite demo was made that way, but I took that idea and ran with it. Its A+ compared to the other method's frame-drop.

                          Just create a layer sample and rename it to whatever your layer needs to be called.
                          use it in the materials as the alpha of a layer blend node, of the input pin of a grass node.
                          its especially helpful for the grass node, you have to remember that they overlay each other unless you do the math though.

                          you can subtract sample B from sample A to create grass,
                          and sample A from sample B to create dead grass. For instance.
                          you can also power that output for a softer falloff.

                          Easiest way to test it is to lerp 3 colors.
                          I'll toss you a screenshot in a few.
                          Click image for larger version

Name:	image_185623.png
Views:	88
Size:	74.0 KB
ID:	1731012
                          Bonus GIF of the node
                          https://gyazo.com/b1b8cb07c81e2ccff2e8f85109855b95
                          Last edited by MostHost LA; 03-10-2020, 06:35 AM.

                          Comment

                          Working...
                          X