Terrain Textures Guide and Setup - Gameslinx/Parallax-Continued GitHub Wiki

Terrain Textures

This is the fabled texture guide which has been highly requested for years. This page will walk you through the texture formats, what they do, and their best practices.

Planet Textures

This is fundamental knowledge you need to know before continuing - please read carefully so that you best understand!

Parallax textures are mostly altitude-based, and the altitudes and situations they appear in can be customised in the config. There are four key textures and they are named according to their use case.

  1. Low Textures - The textures used at the lowest altitude
  2. Mid Textures - The texture used above the lowest altitude, but below the highest altitudes
  3. High Textures - The texture used at the highest altitude
  4. Steep Texture - AKA Slope Texture - The texture used on terrain gradients - used for cliffs

This picture contains all four textures, and should visually convey the purpose of each one:

Some textures, such as the displacement and influence textures, don't use a separate texture for Low/Mid/High/Steep. Instead, since those textures don't contain colour information, each channel in the texture (that's R, G, B and A) is used for Low, Mid, High and Steep respectively. Try not to think of the channels as colour channels in these instances - they are merely a means of storing information.

The Displacement Map

As I mentioned in the Planet Textures section above, the displacement map stores height for each texture in each channel. The red channel corresponds to the Low texture, green Mid, blue High and alpha Steep.

This is an example of a displacement map:

And this is that same texture laid out so you can see each channel in order

This texture stores height information for the other textures. The displacement map is responsible for the extra detail and terrain bumpiness you see when looking at the ground up close

The Influence Map

Understanding the displacement map texture format lays the foundation for knowing how the influence map works. Its RGBA channels are set up in the exact same way - with Low/Mid/High/Steep in RGBA.

What is the purpose of the influence map?

Planet textures in Stock KSP are greyscale images that are overlaid on top of the planet and allow the planet's colour to influence how they look. In Parallax, this is only desired some of the time - it might be preferred for some parts of the surface texture to retain their colour, without being altered by the planet's colour.

A good example that highlights the valuability of the influence map is a situation where you might have dry brown soil with scattered grass, or mossy cliffs, and your planet surface is mostly brown. You don't want the green hues of the grass or the moss to turn brown as well. You want to preserve those colours while allowing the rest of the texture to take on the planet's colour.

This is a visual example of how the influence map affects the final texture:

And this is what the influence map looks like to achieve this:

For the keen eyed, you can see that the brighter the influence map, the more of the texture's colour is shown. Likewise, darker areas on the influence map will show more of the planet's colour

Remember that each channel in the influence map stores the map for that specific height - your final influence map will look like the displacement map.

Workflow

Parallax uses PBR (Physically Based Rendering) textures for its high quality terrain. PBR has two workflows, "Metallic Roughness" and "Specular Glossiness". Parallax uses the Specular Glossiness workflow. If you are authoring textures using industry software such as Quixel or Substance, make sure you set your workflow accordingly. This means you can use most maps without converting them.

Being in the wonderful world of real time rendering, Parallax doesn't use every PBR texture. These are the relevant PBR textures used by the shader:

  • Albedo
  • Glossiness
  • Displacement
  • Normal
  • Emission (coloured texture not supported, emission is intensity only)

Texture Setup

You next need to assemble your textures into a format that parallax understands. The channel setup (that is, what the Red, Green, Blue and Alpha channels are used for) is detailed below.

Parallax Texture Name R Channel G Channel B Channel A Channel Texture Format Remarks
_MainTex Albedo Red Albedo Green Albedo Blue Glossiness DXT5
_BumpMap Normal X (Red) Normal Y (Green) Normal Z (Blue) Emission DXT5NM or DXT5 If using emission, you MUST save as DXT5
_DisplacementMap Low Displacement Mid Displacement High Displacement Steep Displacement DXT5
_Influence Map Low Influence Mid Influence High Influence Steep Influence DXT5 See below for more information on the Influence Map