Configuration
A configuration is a JSON file the terraingen command, GenerateTerrain and
terraingen.load_config read. This reference is generated from the same field lists
the parser reads, so it always matches the library; the raw schema is
the same information as JSON, for editors and tools.
Ranges are the values each field accepts on its own; validation also checks the rules
that tie fields together.
Top level
| Key |
Type |
Default |
Range |
Unit |
Description |
schema_version |
integer, fixed |
1 |
|
|
Version of the configuration format, which this library reads; required. |
body |
bodies |
{"type": "plane", ...} |
|
|
What the terrain lies on: a plane in metres, or a whole body (a sphere, ellipsoid or shape model) in longitude and latitude degrees. |
base |
base sources, optional |
null |
|
|
The starting heights, read from a GeoTIFF or a chain of them, whose grid outputs cover unless they give a region; unset for the body's datum, 0 m, everywhere. |
layers |
list of layers |
[] |
|
|
Relief and features added to the base's heights, applied in order: noise, craters, boulders and more. |
outputs |
list of outputs |
[] |
|
|
Files written after generation, each over its own region or the whole body: heightmaps, crater and boulder lists, boulder models, albedo and meshes. |
albedo: The terrain's albedo: a source and the layers that change it, written by albedo outputs; none when unset.
| Key |
Type |
Default |
Range |
Unit |
Description |
source |
albedo sources |
{"type": "synthetic", ...} |
|
|
Base albedo of the terrain, before its layers: a synthetic colour or a raster map. |
layers |
list of albedo layers |
[] |
|
|
Layers applied to the source's albedo in order, such as bright crater ejecta and rays. |
materials: The material map: soil, sand, dust, bedrock and rock shares, and their Hapke parameters, written by materials and photometry outputs; none when unset.
| Key |
Type |
Default |
Range |
Unit |
Description |
dust_cover |
number |
0.0 |
[0, 1) |
|
About the share of the surface under bright dust patches, from 0 up to 1. |
dust_patch |
number |
50.0 |
(0, inf) |
m |
Typical width of a dust patch, in metres. |
seed |
integer |
0 |
|
|
Seed of the dust patches. |
exposure: Thresholds marking bare ground as bedrock, read on the ground beneath the first layer that lays a material; unset for no bedrock.
| Key |
Type |
Default |
Range |
Unit |
Description |
reach |
number |
12.0 |
(0, inf) |
m |
Distance in metres around a point at which its surroundings are read, to tell rises from lows. |
rise_soil |
number |
0.01 |
|
|
Height above the surroundings, as a share of the reach, at or below which the ground is soil. |
rise_boulder |
number |
0.035 |
|
|
Height above the surroundings, as a share of the reach, at or above which the ground is bedrock; above the soil threshold. |
slope_soil |
number |
0.2 |
|
|
Slope, as rise over run, at or under which soil holds. |
slope_boulder |
number |
0.4 |
|
|
Slope, as rise over run, at or over which no soil holds and the ground is bedrock; above the soil threshold. |
floor_cover |
number |
0.0 |
[0, 1) |
|
Share of level ground that is bedrock too, in noise patches, as on a swept lava floor; from 0 to below 1, and 0 for none. |
floor_patch |
number |
60.0 |
(0, inf) |
m |
Width of the bedrock patches on level ground, in metres. |
seed |
integer |
0 |
|
|
Seed of the bedrock patches on level ground. |
photometry: Hapke parameters of each material class, which photometry outputs mix.
| Key |
Type |
Default |
Range |
Unit |
Description |
reference |
one of none, mars_pancam |
"none" |
|
|
Published Hapke parameters to start from; each class given below replaces its own. |
soil: Hapke parameters of soil; unset keeps the reference's.
| Key |
Type |
Default |
Range |
Unit |
Description |
albedo |
number |
0.0 |
[0, 1] |
|
Single-scattering albedo w, from 0 to 1. |
b |
number |
0.0 |
[0, 1] |
|
Asymmetry b of the two-term Henyey-Greenstein phase function, from 0 to 1. |
c |
number |
0.0 |
[0, 1] |
|
Backscatter fraction c of the two-term Henyey-Greenstein phase function, from 0 to 1. |
roughness |
number |
0.0 |
[0, 90) |
deg |
Macroscopic roughness theta-bar, in degrees below 90. |
sand: Hapke parameters of sand; unset keeps the reference's.
| Key |
Type |
Default |
Range |
Unit |
Description |
albedo |
number |
0.0 |
[0, 1] |
|
Single-scattering albedo w, from 0 to 1. |
b |
number |
0.0 |
[0, 1] |
|
Asymmetry b of the two-term Henyey-Greenstein phase function, from 0 to 1. |
c |
number |
0.0 |
[0, 1] |
|
Backscatter fraction c of the two-term Henyey-Greenstein phase function, from 0 to 1. |
roughness |
number |
0.0 |
[0, 90) |
deg |
Macroscopic roughness theta-bar, in degrees below 90. |
dust: Hapke parameters of dust; unset keeps the reference's.
| Key |
Type |
Default |
Range |
Unit |
Description |
albedo |
number |
0.0 |
[0, 1] |
|
Single-scattering albedo w, from 0 to 1. |
b |
number |
0.0 |
[0, 1] |
|
Asymmetry b of the two-term Henyey-Greenstein phase function, from 0 to 1. |
c |
number |
0.0 |
[0, 1] |
|
Backscatter fraction c of the two-term Henyey-Greenstein phase function, from 0 to 1. |
roughness |
number |
0.0 |
[0, 90) |
deg |
Macroscopic roughness theta-bar, in degrees below 90. |
bedrock: Hapke parameters of bedrock; unset keeps the reference's.
| Key |
Type |
Default |
Range |
Unit |
Description |
albedo |
number |
0.0 |
[0, 1] |
|
Single-scattering albedo w, from 0 to 1. |
b |
number |
0.0 |
[0, 1] |
|
Asymmetry b of the two-term Henyey-Greenstein phase function, from 0 to 1. |
c |
number |
0.0 |
[0, 1] |
|
Backscatter fraction c of the two-term Henyey-Greenstein phase function, from 0 to 1. |
roughness |
number |
0.0 |
[0, 90) |
deg |
Macroscopic roughness theta-bar, in degrees below 90. |
rock: Hapke parameters of rocks and boulders; unset keeps the reference's.
| Key |
Type |
Default |
Range |
Unit |
Description |
albedo |
number |
0.0 |
[0, 1] |
|
Single-scattering albedo w, from 0 to 1. |
b |
number |
0.0 |
[0, 1] |
|
Asymmetry b of the two-term Henyey-Greenstein phase function, from 0 to 1. |
c |
number |
0.0 |
[0, 1] |
|
Backscatter fraction c of the two-term Henyey-Greenstein phase function, from 0 to 1. |
roughness |
number |
0.0 |
[0, 90) |
deg |
Macroscopic roughness theta-bar, in degrees below 90. |
Sections