High Priority – Game Art

Shaders: Correct Height Blending

2-way Height-Blending

High Priority - Game Art - ASE 2Way VertPaint Height Blend

Most terrain blending you see out there is done with lerp nodes and using only a single heightmap. The result is that the blending between two textures is inaccurate. One of the textures and its height values is not being used. This is a missed opportunity in creating a more interesting environment.

What you want is to have both your textures and their height maps interacting with each other. This is where 2-way height blending comes in. At the point of intersection, the shader looks at which part is highest and will prioritize those areas over lower parts. This adds more layers to your environment. Pun intended.

A popular article about this is Advanced Terrain Texture Splatting by Andrey Mishkinis

To make it easy during production, we have a pre-built Shader Function that does this calculation. With this, you can simply drag it into your shader graph where you can jump straight into building the core purpose of your shader. From there, you can create a vertex color painting setup for terrain blending. Or any other setup that you might need. If you’re wondering how you can get your hands on that pre-built Shader Function, don’t worry, it’s all listed below.

High Priority - Game Art - ASE 2Way VertPaint Height Blend Graph
High Priority - Game Art - ASE 2Way VertPaint Height Blend Graph B

3, 4 or 5-way Height Blending 

High Priority - Game Art - ASE 4-Way VertPaint Height Blend

We’re still using the vertex colors as shown in the 2-way section above. We’ll use this to upgrade our shader to include the other vertex color channels: Green, Blue, and if you want also the Alpha channel as a bonus.

This makes it possible to paint 3, 4, or even 5(!) texture sets. That’s right, you’re getting a fifth color absolutely for free! If that isn’t value we don’t know what is.

But to get back to the serious business at hand, some minor adjustments are needed in the shader function. To show you what you need to do, take a look at the shader graph images below.

With that, you’ve graduated to 3, 4, and 5-way height blending. Creating detailed environments is literally at your fingertips.

High Priority - Game Art - ASE 3Way VertPaint Height Blend Graph
High Priority - Game Art - ASE 4-Way VertPaint Height Blend Graph
High Priority - Game Art - ASE 3-Way VertPaint Height Blend Graph B