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.
OSM2World uses the .properties file syntax. This means:
key = valuepairs (one per line) define the actual options
- use # or ! at the beginning of a line for a comment
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.
material_TERRAIN_DEFAULT_color = #FFFFFF changes the color of "empty" terrain to white.
To change the strategy for elevation calculations, use the key
- 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.
drawBuildingWindowsenables or disables windows on (certain types of) buildings
useBuildingColorsenables or disables individual coloring of buildings based on OSM tags. Disable if you want all buildings colored as defined in this config file.
treesPerSquareMetercontrols the tree density in forests
defaultTreeHeightdefault tree height outside of forests
defaultTreeHeightForestdefault tree height in forests
backgroundColorsets the background color in OpenGL. Hexadecimal RGB color value, defaults to #000000
backgroundImageallows using an image instead of a solid color as the background in OpenGL. The value contains the path to the image file.
canvasLimittuning 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.
forceUnbufferedPNGRenderingtuning parameter, true prevents the PNG export from buffering primitives. This reduces RAM usage, but can increase rendering time.
primitiveThresholdOBJcontrols 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.
renderUndergroundenables (default) or disables rendering of underground features
createTerrainenables (default) or disables creation of "empty" terrain
useBillboardsenables or disables (default) the use of "billboards" (i.e. rectangles with textures) instead of proper geometry e.g. for trees. Recommended.