Making a Landscape Material that Doesn't Suck

By: Matthew Steinhardt

The Problem

The time had finally come to make a real island that players would sit back and say "wow this looks cool!". Our test map, which we made at the VERY beginning of development (back in ye' old prototyping days), served its purpose beautifully, however it had several glaring gameplay issues. One of them being it didn't really look like a natural island, nor did it have any landscape textures. I set out to create a new map with a modified layout inspired by our test map, but more tuned to the current requirements of our project. The most difficult part turned out to be creating a landscape material that would allow me to paint different textures based on height and other settings. 

The Solution

At first, I thought I could simply create this material from scratch. However, it quickly became apparent that I was way in over my head. I started searching the internet to find an open-source solution or starting point. Eventually I found an extremely useful resource called OpenLand. They had a paid and free version. I opted to look at the free version and see what I could gleam from it. It has a staggering amount of customization to it but most importantly it showed me how to blend multiple materials together. This is done using the Layer Blend node, which becomes available when the material type is set to landscape. 
I elected to follow what OpenLand does and actually have two layers for each. One of them is an alpha layer that allows for smooth transitions between layers based on elevation/slope. This produced a nice effect of blending materials automatically for me.

I also elected to add adopt their method of making literally everything a user parameter. This allowed me to create a master material that I could simply make copies of for each of the different layers which would then have their own set of parameters within the master landscape material. It felt a little "hacky" but the customization it offers is really neat. 

Furthermore, I discovered how to procedurally spawn foliage actors from the material by using a material function to mask out different containers of meshes (i.e. the foliage) based on whatever I wanted. I elected to use elevation and slope again to determine where foliage should automatically spawn. 


The result turned out better than I expected and made texturing the island turn from a dreaded task to actually a lot of fun! 


Comments

Popular posts from this blog

UI Polish

AI Navigation Problems - Yashwant Patel

Round End Cutscene Implementation