OSM2World/Configuration file
When running OSM2World, it is possible to modify various aspects of the program's behaviour by providing a configuration text file with the --config <file>
command line parameter.
File syntax
OSM2World uses the .properties file syntax. This means:
key = value
pairs (one per line) define the actual options- use # or ! at the beginning of a line for a comment
Available options
Materials
To change the color used for the material MATERIAL_NAME, use the key material_MATERIAL_NAME_color
and a hexadecimal RGB color value. Available material names can be found in the Materials.java source code file.
Example: material_TERRAIN_DEFAULT_color = #FFFFFF
changes the color of "empty" terrain to white.
Elevation calculators
To change the strategy for elevation calculations, use the key elevationCalculator
.
Avaliable strategies:
- BridgeTunnelElevationCalculator - sets everything to elevation 0, except bridges and tunnels. No level support. Current default setting.
- ZeroElevationCalculator - sets everything to elevation 0.
- ForceElevationCalculator - advanced strategy that tries to take bridge/tunnel attributes, inclines etc. into account. Slow and buggy.
- EleTagElevationCalculator - uses explicitly mapped ele tags only.
- LevelTagElevationCalculator - uses explicitly mapped level tags only.
Note: The elevation calculation code is currently (May 2013) undergoing a major rewrite. Output and options are going to change.
Other options
Buildings
drawBuildingWindows
enables or disables windows on (certain types of) buildingsuseBuildingColors
enables or disables individual coloring of buildings based on OSM tags. Disable if you want all buildings colored as defined in this config file.
Trees
treesPerSquareMeter
controls the tree density in forestsdefaultTreeHeight
default tree height outside of forestsdefaultTreeHeightForest
default tree height in forests
OpenGL/PNG
backgroundColor
sets the background color in OpenGL. Hexadecimal RGB color value, defaults to #000000backgroundImage
allows using an image instead of a solid color as the background in OpenGL. The value contains the path to the image file.canvasLimit
tuning parameter, controls maximum size for each dimension of the OpenGL canvas used for PNG output. If this is lower than the width or height of the requested png, performance suffers. ncrease it if your graphics hardware is capable of handling larger sizes.forceUnbufferedPNGRendering
tuning parameter, true prevents the PNG export from buffering primitives. This reduces RAM usage, but can increase rendering time.
OBJ
primitiveThresholdOBJ
controls the approximate number of primitives per OBJ file in command line mode. If this parameter is used, OSM2World will create a directory with multiple OBJ files, rather than a single OBJ file. The name of the directory as passed to the --output/-o parameter still needs to end with .obj.
Other
renderUnderground
enables (default) or disables rendering of underground featurescreateTerrain
enables (default) or disables creation of "empty" terrainuseBillboards
enables or disables (default) the use of "billboards" (i.e. rectangles with textures) instead of proper geometry e.g. for trees. Recommended.drivingSide
supportsright
(default) orleft
. Explicitly tagged driving_side=* on ways takes priority.