| Filename: | index.ground |
| Location: | themes/grounds/*/ |
| Description: | groundtheme configuration |
General info
Boson supports multiple ground themes, although ATM we only have one theme - "earth".
These themes are in separate directories under themes/grounds/. Every theme must provide an index.ground file which specifies the name of the theme and the ground textures contained in this theme.
The rest of this document describes possible config groups in index.ground.
[Boson Ground] group
This group contains general info about the ground theme
- Identifier=text
Name of this ground theme, shown to the user.
- Grounds=number
Specifies the number of different ground types (textures) in this theme. Must be at least 1.
[Ground_x] group
Every ground type is described by a Ground_x group where x is an integer in range 0 to Grounds-1.
- Name=text
Name of the ground type, e.g. Grass or Snow.
- Texture=text
Basename of the texture(s) which should be used for rendering this ground type.
Basename means that it mustn't contain the filename extension. All images with names <texture>*.jpg and <texture>*.png are used where <texture> is the specified name.
You can use animated textures this way, e.g. by having images grass-1.jpg, grass-2.jpg and grass-3.jpg and specifying grass or grass- as the texture name.
- BumpTexture=text
Basename of the bumpmap texture of this ground type.
See Texture key for info about what basename means and how to use animated textures.
Bumpmaps are used only with shaders.
The bumpmap texture must be RGBA image, containing normals in RGB channels and heightmap in alpha channel.
Default is bump-null which is a dummy bumpmap looking same as using no bumpmap.
- BumpScale=float
Specifies value which should be used to scale heightmap given in alpha channel of the bumpmap.
See shader section on how to use this.
Default is 0.04.
- BumpBias=float
Specifies value which should be substracted from the height value given in alpha channel of the bumpmap.
See shader section on how to use this.
Default is 0.5.
- TextureSize=float
Specifies how many cells (in both directions) should the texture of this ground type cover.
This applies to both usual texture and bumpmap texture.
Default is 5.0.
- AnimationDelay=number
How many advance calls to wait before using next texture of this ground type (if animated textures are used).
E.g. if this is 20 advance calls (= 1 second), the texture would change every second.
Default is 1 which switches texture after every advance call.
- Shader=text
Name of the shader which should be used to render this ground type.
Default is ground-default.
- MiniMapColor=color
List of 3 color values (in range 0-255) which specify which color should be used to render this ground type in minimap.
E.g. 128,255,128 would show it in light green color.
Shaders
When shaders are turned on, they are used to render the ground as well. You can specify a different shader for every ground type to better simulate the look of different materials.
Following special uniform variables are available in the shader:
- sampler2D texture_0 - diffuse texture (usual texture)
- sampler2D texture_1 - fog texture
- sampler2D texture_2 - bumpmap texture
- sampler2DShadow texture_3 - shadowmap
- float bumpScale - bumpmap height scale, as specified in config file
- float bumpBias - bumpmap height bias, as specified in config file
Bumpmap height scale and bias should be used to calculate height of the surface in a given point like this:
height = height * bumpScale - bumpBias