Rules are used in YATT to automatically generate colourmap or texturemap information from the heightmap. By specifying an expression for the colourmap or texturemap the value for each point in the map can be calculated. One rule can be specified for each colourmap or texturemap. They are specified as a simple string.

There are 3 keywords that you may use in the rules. These are:

The easiest way to see how this is useful is to consider some examples. The easiest is a default colourmap. A colourmap generally looks best when the steepest areas in the map are set to be darkest. To get this effect colourmaps in the current version of YATT default to the following expression: 1.0 - SLOPE giving the desired effect.

An even simpler example is where you wish to load the entire area with a single uniform texture. In this case just a Texturemap in the YATT inputs and set it's rule to a constant value of 1.0.

For a second texture you may then wish to set steep areas to have a cliff or rocky texturing. This is easily achieved by adding a Texturemap with the Rule set to something like 0.7 * SLOPE

YATT also understands simple relational and equality expressions. So if you want the top 20% of areas in you texturemap to be set you can use a Rule similar to HEIGHT > 0.8

You can also combine relational expressions with calculations if you wish. YATT considers true = 0 and false = 0 so something like the following rule would create texturing which varies with slope but is also only present in positions that are in the top 30% of the height. ( HEIGHT > 0.7 ) * SLOPE * 0.8

I hope this gives y'all something to chew on. The grammar YATT understands is fairly simple at the moment, but I hope to add more in the near future. As well as allow for more interesting usage of the Rules.

Latest Version Info

Version: 0.9.16

NWN2 Patch: 1.23.1765