Home 3D Art Showcase & Critiques

[FREE] Unreal Engine 4 Landscape Shader

polycounter lvl 4
Offline / Send Message
gestoryscht polycounter lvl 4
Hi guys, Auke here.
Visual Storyteller and Lead Environment Artist at Sooii.

In the last year I learned a lot about landscape creation and besides Unreal, I used a lot of different tools to get the result I was looking for. My journey began with World Machine and I started to love and hate it. The results were amazing, but the usability was and still is a pain. I decided to look for something different and ended up using Houdini with the Gaea Bridge. These tools are the fundament for my landscape creation workflow, but when the work is there done, I ended up in Unreal with a grey landscape without much character to it.

You’ll find some tutorials out there about landscape materials, but a lot of them incomplete or just a fraction of what you need for your landscape. Besides that, creating natural landscapes is kind of a niche in CG and that’s makes it’s even harder to find proper ressource. So I decided, after reading dozens of forum threads or watching tutorials, it’s about time to give something back to you guys. Something you can learn from or just use it as your own.

I’ve made an advanced and most important, modular landscape material with a pretty nice performance and some nifty material functions in it, which I made with the help of Rodrigo Villani.

So to not waste your time, here is a little breakdown about the inherited nodes and a description what they do.
I hope you can learn something from it and I wish you a merry christmas - hope you’ll find this present useful :)

Material Layer

When working with landscapes, you have multiple kinds of surfaces. In my case, the mongolian scene, I used a soil, grass, gravel, cliff and snow layer. Managing these can really be a waste of time. Duplicating texture sample for texture sample, repeating this step over and over again. For exactly this problem I created this material function. Out of the box, you just have to plug in your textures, connect it with the rest of your node system and it works. You probably should rename the basic parameters to get access in your material instance, but beside that it’s a out of the box solution. 
One thing to mention is, I multiply by default the AO channel on top of the BaseColor. Technically this is wrong and breaks the PBR workflow, but it really helps to get better definitions in your material, because most of the time a regular material can’t handle the self-shadowing in small crevices. So I added this little option, which you can always turn of using a simple boolean.
Also, for saving some texture samples, I am using the AO multiplied by 0.5 for getting some kind of an specular approximation.

Adjustment Layer

Sometimes your material does not look right and you do not want to change these parameters in Substance, Mixer etc. and it’s easier and faster to do this in the material. For this case, I added a pretty big adjustement layer function. Most of it is pretty self explaining, so just play a bit around with it, open it if you like and look through it. The most important part of this function are the Heightmap functions. With these parameters you can control the contrast of your heightmap for - and this is imporant - the blending between your materials. Using a normalized heightmap is often not enough to get nice transition, especially when you are dealing with sharp rocks, so you need to raise up the contrast.
The result is still not perfect, but I am working on a better solution for this, not using the internal LayerBlend node.

Distance Overlay

The problem with big and open landscapes is that you quickly see repetitions on your surface, caused by the tiling textures. To overcome this, I created a distance overlay function to lerp an overlay over your albedo and normal channel. This one is pretty expensive, because it is using a high res texture - in my case a 8k one - which I made with the data maps from gaea, processed in Substance Designer. When you are interested in creating this texture, let me know and I’ll make a written tutorial for it.
You can control the overall intensity of the basecolor and the normal channel. More important is the option for excluding material layers from the overlay. In my case, I excluded the cliff surface to preserve the rock structure projected via a special stochastic tri-planar function, made by Rodrigo Villani. More about it later.

Color Variation

I’ve made this one for the same reason like the distance overlay function. On far distance the surfaces tiles to much and it looks repetitive and that’s not how nature work. When you take a look at a grass surface, you’ll see a lot of different colors like dead grass patches, fresh green grass - or something in between. To mimic this behavior, I created this node.
It’s not uncommon to do this, but to complete the collection it’s totally necessary. It’s basically again just a color multiply with some other parameters like intensity, contrast etc.

Distance Reflection

The problem with large landscapes is, that on a certain distance, the landscapes reflects too much and it does not look believable at all. For this I created this little ‘hack’ to overcome these problems when using PBR in realtime applications.
Unreal is restricted in how much it can show on screen and so, for example grass, get culled out on distance. In the real world, the grass is still there and scatters the light in every direction. It’s comparable with a really rough surface which reflects the rays of light in a very chaotic way. So, the easiest way to solve this problem is, to use a mask based on distance to manipulate the roughness and specular values and to mimic this behavior.


Do you know Brushify or any other auto landscape material? That’s basically the same. You can utilize it for every task - in my case I use it for the cliff detection and to not be restricted by resolution … and it’s just easier to add slopes. So yeah. Use it as you like.

Stochastic Tri-Planar

On this one I am extremely proud and the best thing, I didn’t do anything for it…
During work I am watching a lot of GDC talks to stay up to date and learn new things in areas, I am not even related to. One day I watched a talk about the rendering in FarCry 4 and I was blown away. Beside the procedural approach of creating this beautiful world and all the super technical stuff, I was also very interested of how they are dealing with cliff faces. They developed a super cheap method of creating a tri-planar function using just a single texture sample. They also released a paper with even more information - when you are interested in, you can find the paper here.
Long story short, I am more of an artist and so I looked for some help to get this function into Unreal ... and I got help from Rodrigo Villani. I understand the basic logic of this function but I basically have no idea how he accomplished this node. You can just use it, or visit his YouTube channel and watch his video about how he’s creating this tri-planar projection node. It’s not up yet, so be sure to subscribe to his channel to not miss it.

There are some more material functions in it, but these are just to basic to cover them here. Just download the sample scene and study the material or just grab it and migrate it to your project. I hope you’ll find this material useful and before I end this article, I want to thank some people for their help. Beside Rodrigo Villani I want to say thanks to Ayden Yanik, who helped me with his VDB Cloud Pack. For me, finding proper clouds to use, is pretty hard. You always have to paint, stamp and adjust the clouds and in the end, you do have still a lot of clouds with different lighting scenarios. So I used his cloud pack and simply rendered some clouds. When you are interested in it, be sure to visit his ArtStation Shop.

And last, but not least, Sooii. I started my career there last year as a professional 3D artist and I got a lot of support from my coworkers and especially my boss. So I want to say thank you. I get a lot of freedom to develop my skills there - so thank you :)

So thanks for your time and I wish all of you a merry christmas and have nice holidays.


  • Cg_Creator
    Offline / Send Message
    Cg_Creator polycounter lvl 8
    Looking great, would be good to make a little video to show how it works in the editor
  • TheGabmeister
    Offline / Send Message
    TheGabmeister interpolator
    I decided to look for something different and ended up using Houdini with the Gaea Bridge.
    Very interesting. How's your experience with Gaea? I heard about it when it came out, and many said that it was unstable. I'm thinking about testing it again in the near future.
  • zachagreg
    Offline / Send Message
    zachagreg ngon master
    I decided to look for something different and ended up using Houdini with the Gaea Bridge.
    Very interesting. How's your experience with Gaea? I heard about it when it came out, and many said that it was unstable. I'm thinking about testing it again in the near future.

    I've only gotten a few crashes in Gaea its honestly great in my opinion and the free large texture export is awesome as well.
  • gestoryscht
    Offline / Send Message
    gestoryscht polycounter lvl 4
    Looking great, would be good to make a little video to show how it works in the editor

    Thanks, but I don't plan to make videos for it.
    Overall this is 'just' a product of my personal progress and the nice side effect - you get it for free. I don't want to make product of it.

    I decided to look for something different and ended up using Houdini with the Gaea Bridge.
    Very interesting. How's your experience with Gaea? I heard about it when it came out, and many said that it was unstable. I'm thinking about testing it again in the near future.

    Gaea is awesome - beside the fact it's unstable as you said - but in the end it's still the best program out there. World Machine generates great results, but the UX is from hell and every other competitor like World Creator are just not good enough. So yes, it's pretty unstable and already fixed functions are getting bugged from time to time, but overall - sadly - it's the best one out here :D
  • WrathX
    Thank you for this, I'm learning a lot by messing around with it and am working on my own version, I'm stuck on part of the sky though. I can't seem to locate where LFI_CloudySky is incorporated. Reference viewer shows it as referenced by the lighting sublevel, but I've looked through that level blueprint as well as the actors included in that level and am unable to determine where LFI_CloudySky is being called.

    I have the landscape down with my own textures and overlays, you've given us a great tool. Now I'm just hoping to make my own version of your sky :)
  • WrathX
    Of course, after posting above I immediately found it :)

    If anyone else is running into the same issue, you can find the call by selecting SunSky in the outliner, choosing the directional light component, and scrolling down on the details to Light Function.
  • Joe H
    Offline / Send Message
    Joe H polycounter lvl 8
    TY For your hard work and sharing this. I have only been using UE4 for a couple weeks since I got home from cancer surgery and stuck in the house recovering.  Have been trying to learn and make my own shader with over 200 tries all failures (I think its the pain meds etc affecting me) Hopefully I can find where the master is and try it out on my project.

    Again  million thanks for this
  • xyz
    Wow, this landscape material is amazing. Thanks a lot for sharing this, I'm not smart enough to do something like this and it always scared me from doing some terrain stuff. Again thank you very very much!

    PS: I also prefer Gaea, fast clean and very confortable to use.
Sign In or Register to comment.