Confused about TextureCoordinate and LandscapeLayerCoordinate

I’m pretty well mired in trying to get decent looking tiled textures onto my terrain, which is the next goal I need to achieve before trying to crack rocks/cliffs/mountains and then foliage. I don’t have a strong background on 3D modeling, textures, and shaders, and one thing that completely confuses me is the difference between LandscapeLayerCoords and TextureCoords. The very first landscape examples I looked at used LandscapeLayerCoords to feed UVs to TextureSamples, and then feed the output of these into a layer blender. Later I wanted to use more advanced techniques to limit visible tiling, and I set aside weight blending for the moment to focus on macro variation and tinting and other tricks like that. Nearly all of those examples used TextureCoordinates to get UVs. The main thing I’m trying to understand is when one is appropriate vs. the other, specifically in the context of texturing terrain (the answer seems obvious in the context of texturing static meshes).


I think I may have figured this out. You guys let me know, please, if I haven’t :).

The TextureSample nodes use the mesh UVs as a default. That’s a key thing I didn’t get, and it’s why you can see the texture on the preview object as soon as you plug it into the base color property. So in my simple material, at least, I would only need TextureCoords/LandscapeLayerCoords if I wanted other than the default mapping from the mesh to the texture. As for the difference between the two, from my perspective it looks like there are landscape-specific versions of several node types, and that they either introduce landscape-specific properties or enable landscape-specific optimizations, or both. So I think LandscapeLayerCoord is basically a TextureCoord with landscape-specific parameters.

Does that sound right?

TextureCoordinateas you figured out is using your meshes’ UVs. As far as I know, LandscapeLayerCoordinateis supposed to be meant for landscape texturing, as you should just have to input your real landscape size to properly and exactly fit a texture on top of it. However if you are looking for tiling a texture, both of them should work the same.

Thanks, Praglik. In fact they do appear to work the same, the main difference being the way the scaling properties are exposed.