Norwegian landscape rendering.
- Build code:
cargo build release
- Download geotiff maps from https://hoydedata.no/LaserInnsyn2 (select 'eksport' -> 'landsdekkende')
- Index maps in each zip file:
cd /my/geodata/maps for z in *.zip; do (...)/gamlenorge/target/release/index --maps . z done
- Create a configuration (use ./gamlenorge.ini as template)
- Render landscape:
./target/release/gamlenorge -c mylandscape.ini
The main program for rendering the beautiful old Norwegian mountain landscapes. E.g.:
gamlenorge -c mylandscape.ini --output mylandscape.tif
Used for creating atlas-files from a zipped package of geotiff maps, or a directory of geotiff files.
index --maps <mapdir> <zipfile> index --maps <mapdir> <tiffdir>
Shows the angles of the sun (altitude and azimuth) for a given position and a given time. Useful for adjusting the time parameter in order to get optimal lightning for a landscape.
sun <position> <time>
Configuration parameters can be specified in the configuration file ./gamlenorge.ini, or a custom configuration specified on command line with the -c / --config parameter.
The parameters in the configuration file can be overridden on command line prefixing the parameter with a '--', e.g:
gamlenorge -c custom.ini --haziness=1.5
Path to the maps directory. The directory is expected to contain atlas.json files which contain references to tiff-files or zip-files containing tiff-files, typically stored in the same directory. The atlas-files are created using the command: index -m map_dir mapdata.zip
Coordinate of the observer. Some location names are accepted. Otherwise, EU89 UTM33 coordinates must be used, the format is N<northing>>E<easting>. The observer height is the terrain level plus observer_height_offset. Defaults to 'Nordre Trolltind'.
Coordinate of the target. Some location names are accepted. Otherwise, EU89 UTM33 coordinates must be used, the format is N<northing>E<easting>. The target height is the terrain level plus target_height_offset. Defaults to 'Store Vengetind'.
Relative adjustment of observer position height level. Defaults to 10.
Relative adjustment of target position height level. Defaults to 10.
Pixel width of the rendered image. Defaults to 1600.
Pixel height of the rendered image. Defaults to 400.
Horizontal angle of view (radians) from center to edge of the picture. efaults to 0.6.
Minimum depth (meters) at which to start rendering. The parameter is typically used to increase performance if it is known that the area between observer and min_depth is free from obstacles. It can also be used to 'see through' a landscape in order to render the terrain behind it. Defauls to 0.
Maximum depth (meters) to follow each ray. Defaults to 150.
Degree of atmospheric haziness. Defaults to 1.
Maximum height level of green landscape. Defaults to 800.
Minimum height level of snow. Defaults to 10000.
Degree of luminance on the sky towards the horizon. 0 is constant blue sky, higher values give more light. Defaults to 1.
Ratio of reflection vs constant blue sea color. 1 is only reflections, 0 is only sea color. Defaults to 0.5.
Amount of ripples on the water surface. The parameter adds fuzz to the reflection angles. Defaults to 1.
The number of reflection angles to trace in order to determine reflection light. Defaults to 10.
Time of the rendering. The time is used for calculating the position of the sun. Defaults to 2023-07-01T18:00:00+0200
Output filename of tiff image.