Home Unreal Engine

Creating landscape materials?

zombie420
polycounter lvl 10
Offline / Send Message
zombie420 polycounter lvl 10
***I'm fairly new to the ins and outs of creating complex materials so bear with me.

I'm following a tutorial about creating landscape materials and the narrator has ticked a box in the material properties that says "used with landscape". That box doesn't seem to be here in 4.18.2. Is it renamed to something else or no longer necessary?

He also uses the Absolute World Position node, which is causing errors in the material. I saw another tutorial that used the LandscapeLayerCoords node but that seems far less versatile?

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    That checkbox ticks itself when you apply it on a landscape.

    About the coordinates: 
    Landscape layer coord node is very much like uv\texture coordinate node, while world position can be used to do axis aligned mapping. Whats the error it gave you? I guess it isnt scaled so it shows "wrong" (it isnt wrong, its just not scaled). If this is the case, divide the world position by a constant before plugging it into the coordinates of the texture. If lets say you divide it by 200 it means it will tile once on 200 units. You could also use "world aligned texture" and the normal equivalent of that. The benefit of this, is when you raise a mountain on the landscape, x-y axes of the coordinates will kick in, so it wont appear stretched. These nodes utilizes world position node though but the axes are pre blended inside the material function so you can use all axes without a need to make a complex thing yourself.

    EDIT - If you are getting the cant explicitly convert float 2 from float 3 error from the compiler, it means that you are trying to directly plug the world position (float3 - means it has 3 component like rgb or xyz) into the uvs(float2) and it cannot know which 2 components you want, so it doesnt convert. In this case, you can put a component mask before feeding it into the uvs input, and select the two axes you want. But world aligned nodes are usually just better because of the reason I mentioned above.
  • zombie420
    Options
    Offline / Send Message
    zombie420 polycounter lvl 10
    Thanks @Obscura. I'm trying to input the world position node into the textures using a multiply and divide node, but both are giving me the error seen below. It sounds like you understand the problem, I'm just too noob to understand your solution


  • zombie420
    Options
    Offline / Send Message
    zombie420 polycounter lvl 10
    Scratch that, I'm a fool. Looks like I was watching the video too small and didn't see the narrator's errors. If I had waited just a couple seconds longer I would have heard "now you're going to get an error here and that's because..." and then he goes on to suggest exactly the same thing you did. 

    Thanks anyway man
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    That was the float 3 to float 2 error.............
Sign In or Register to comment.