Terran / multi-texture blending model

Today I had an idea for a multi-textured blending model that combines a few popular types of shaders into one. I think I’m going to start working on this soon but I am writing out what it does first to see if anyone has an auggestions or if perhaps the exact same thing has already been made. I know that some very similar ones have been made, but they all lack certain aspects that I plan to include.

Okay, so it basically takes the following textures:
Texture 1 Diffuse
Texture 1 Normal
Texture 1 Specular
Texture 1 Height
Texture 2 Diffuse, N, etc.
Texture 3 Diffuse, N, etc.
Texture 4 Diffuse, N, etc.
RGBA Colormap
RGBA Splatmap

What seems to make it unique is blending between textures by their height while also using a colormap, and also being able to use colormap only within specific portions of the geometry. The portions in which colormap would be used in are spcified by the colormap’a alpha.

The point of this is to allow you to do things like use the colormap to create variety in large areas that contain the same texture (i.e. an open field) while still maintaining the “sharpness” at edges of textures blending by using their diffuse maps at those points instead of the color map - such as the bottom of a cliff.

Below is an image explaining in more broken up steps, made with photoshop:


Only 2 textures are used in the example but up to 4 would be supported by the splatmap.

Any comments? I’ll post more after I’ve begun working on it. I’m a bit confused on how the specular, normal, and heightmaps should be blended though… maybe in the same way as the diffuse maps, just without the extra steps to apply the colormap? Or maybe those should just interpolate normally…

Finally after the blending is working I’ll see about adding some other features:

  • Some form of displacement? My math and shader programming knowledge may not be enough for that.
  • Additional splatmaps allowing more than 4 textures on the same model? (i.e. 4 splatmaps for up to 16 textures)

I would love to see your final results :slight_smile: