[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.10.9.2 XML format

The main way to use the terrain2 plugin is via its syntax in the worldfiles.

Terrain factory XML syntax

The majority of the settings are specified on a per factory level. The factory loader recognize the following tags.

<renderer>pluginname</renderer>

Set the renderer plugin to use. Must be specified if rendering is desired.

<collider>pluginname</collider>

Set the collision detection plugin to use. Must be specified for collision detection to work.

<feeder>pluginname</feeder>

Set feeder plugin to use.

<cells>...</cells>

Container for cells and per cell settings. See below for details.

<maxloadedcells>number</maxloadedcells>

Set the maximum number of cells to be loaded at any given time.

<autopreload>yes/no</autopreload>

Set if terrain should automatically preload cells which are outside view but can be expected to come into view shortly.

<virtualviewdistance>factor</virtualviewdistance>

Set enlargement factor for the virtual view used for automatic preloading.

The <cells> container contains definition of default settings as well as setting for individual cells. The <celldefault> accept the same settings as the <cell> except for the position and name tags.

<name>cellname</name>

Set cell name for future reference.

<size x="" y="" z="" />

Set cell size in model space.

<position x="" y="" />

Set the offset in the heightmap to model space transform.

<gridsize width="" height="" />

Set the size of the heightmap

<materialmapsize width="" height="" />

Set desired size of the material map data.

<basematerial>materialname</basematerial>

Set the material to use for the base rendering pass in the renderer.

<materialmappersistent>yes/no</materialmappersistent>

Control if the material map should be persistent or not. A persistent material map allow you to modify it after loading but also results in increased memory usage.

<renderproperties><param name="">value</param>...</renderproperties>

Set one or more named parameters in the renderer. See the documentation for the renderer in use for a list of parameters and their values.

<colliderproperties><param name="">value</param>...</colliderproperties>

Set one or more named parameters in the collider. See the documentation for the collider in use for a list of parameters and their values.

<feederproperties><param name="">value</param>...</feederproperties>

Set one or more named parameters in the data feeder. See the documentation for the data feeder in use for a list of parameters and their values.

Terrain object XML syntax

The terrain2 object loader is very simple and accept only two tags

<factory>factoryname</factory>

Set the terrain2 factory to use.

<materialpalette><material>materialname</material>..</materialpalette>

Set the materialpalette to use for rendering. The material palette is a list of materials numbered in the order specified in the xml tag. The number corresponds to the index in the materialmap.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated using texi2html 1.76.