bw logo

Chapter 13. filters.xml

Used by World Editor to configure the filters available in Terrain Filtering panel, this file is located under bigworld/tools/worldeditor/resources/data.

From the pre-defined set of implemented filters, only the ones specified in this file will be listed in the Terrain Filtering panel's Filters list box (in the order in which they appear). For details, see the document Content Tools Reference Guide's section World Editor Panel summary Terrain Filtering panel.

The grammar of filters.xml is listed below:

<filters.xml>

  *<filter>
      <name>          string       </name>
      <constant>      float        </constant>
      <kernel>        Vector3      </kernel>
      <kernel>        Vector3      </kernel>
      <kernel>        Vector3      </kernel>
      <strengthRatio> float        </strengthRatio>
      <kernelSum>     float        </kernelSum>
      <included>     [true|false]  </included>
   </filter>

</filters.xml>

Grammar of filters.xml

The list below describes the tags in filters.xml:

  • constant

    Base of strength, used in conjunction with the strengthRatio tag.

    When refers to an actual filter, this value is used as strength directly (probably here it should be 0).

    When refers to the terrain height brush (used in the Terrain Height panelA), the final strength will be the product of constant and the value of Terrain Height panel's Strength field.

  • filter

    Section specifying parameters either for a filter (displayed in Terrain Filtering panelB), or for the terrain height brush (used in Terrain Height panelA).

  • included

    Determines if the filter will be listed in Terrain Filtering panelB. Defaults to true.

  • index

    Deprecated tag — used to determine order in which filter was listed in Terrain Filtering panelB.

  • kernel

    The 3 kernel tags (of type Vector3) compose an array of float[9].

    Each float value represents the strength to be applied to a cell enclosed by the brush.

  • kernelSum

    Normally the sum of the 9 kernel values.

    The final height of a cell equals to:

    (nearby cell heights*corresponding kernel + strength*strengthRatio) / kernelSum

  • name

    Name of the filter. The name is used to match the filter pre-defined in the source code, determining thus its working. If an invalid name is listed, then it will be displayed in Terrain Filtering panel'sB Filters list box, but will not be selectable.

    Possible values are:

    • Extra Slow Smooth

    • Slow Smooth

    • Medium Smooth

    • Fast Smooth

    • Nice 'n' Smooth

    • Sharpen

    • Sharpen More

    • Raise 20cm (the shipped file sets the included tag for this filter to false — this section configures Terrain Height panel'sA brush).

  • strengthRatio

    Value to multiply by the Terrain Height panel'sA Strength field before recalculating new height.

    So, if this ratio is 0, no strength is available

A — For details, see the document Content Tools Reference Guide's section World Editor Panel summary Terrain Height panel.

B — For details, see the document Content Tools Reference Guide's section World Editor Panel summary Terrain Filtering panel.