JOSM/Plugins/Kendzi3D/textures configuration

From OpenStreetMap Wiki
< JOSM‎ | Plugins‎ | Kendzi3D
Jump to navigation Jump to search

Configuration file

Configuration can be stored inside xml file. Configuration file can be load using menu "3d > Load texture library from file"

Example xml file format:

<?xml version="1.0" encoding="UTF-8"?>
<ns2:textureLibrary 
	xmlns:ns2="http://www.kendzi3d.org"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.kendzi3d.org xsd/TextureLibrary.xsd"	
	author="">

    <textureSet key="buildings.facade_stone">
        <textureData 
            tex0="/textures/any_unique_file_name.png" 
            tex1="/textures/any_unique_file_name.png" 
            height="2.0" width="2.0"
            colorable="true" />
    </textureSet>
</ns2:textureLibrary>

This example add new texture to stone wall. This texture well be used for building wall described by tag building:material=stone.

  • tex0 - first texture layer. This layer will be multiply by color if color is setup. Path to file is relative from plugin root directory. Texture file can be stored inside jar or in plugin temporary directory. Files from temporary directory have priority.
  • tex1 - second texture layer. This layer is not multiply by material color. It can be used for presenting eg. mortar between the bricks. If not used can be omitted.
  • height - height of the texture in meters
  • width - width of the texture in meters
  • colorable - determines if the material can be used together with the set color

Adding new texture file

All texture file have be copy to kendzi3d directory:

{JOSM_DIR}/plugins/kendzi3d

In this directory create sub-directory textures and put textures there.

In configuration file use use patch relative to directory {JOSM_DIR}/plugins/kendzi3d

Example

Lets say you want to add new texture named myStone.jpg Copy this file into location

{JOSM_DIR}/plugins/kendzi3d/textures/myStone.jpg

in configuration xml use key: /textures/myStone.jpg


Tip: You can check plug-in directory using "Menu > 3d > Adv > Show Plugin Directory"