Go to Gallery           Register for MyTrainz | Login to MyTrainz

Trainz Dev Diary - Detail Map Ground Textures (sneak peek)

By Admin, September 22 2017

Detail mapping allows a secondary texture set to be used as a modifier at a different scale, helping to provide both micro and macro detail in a single draw call.

This is intended to be utilised in two ways:

A heavily repeated texture, such as section of a brick wall or tiled floor or grass field, can have a macro (detail) texture applied to ensure that large expanses of the texture don't look incredibly repetitive. The macro texture does not provide much resolution (perhaps one texel per 50cm or worse) and so isn't substantially visible at near range, however when the material is viewed from some distance and the standard texture can be seen to repeat a large number of times, the macro texture becomes the dominant feature.

In this scenario the macro texture would provide subtle color variation or height/normal changes to the otherwise featureless tiles.

A texture which is adequately detailed so as to cover the entirety of its use case (for example, a brick wall on a house mesh where the entire wall is mapped to a non-tiled texture) or which is tiled but not so extensively that macro repeats are a problem (such as a tiling brick wall inside a house where only a few repeats will be visible and where the real-life application is in fact very repetitive) may use a micro texture to add detail at below the level present in the primary texture. The primary texture may (eg) resolve to one texel per 1cm, but the micro texture may resolve to one texel per 1mm. The micro texture does not change the overall appearance of the wall, but instead ensures that the wall texture does not appear blurry when viewed at close range.

Detail mapping should not be blindly applied to every surface, but should seek to solve a particular problem. If the primary map is sufficient to solve the problem, there is no need to add a detail map and it is just a waste of performance. In some cases, detail mapping may allow the overall texture sizes to be reduced substantially (eg. using a 512x512 + 128x128 texture pair, instead of a single 2048x2048 texture) in which case it may be a performance win (or at least disk space win) in its own right.


For more information on future Trainz development be sure to keep up-to-date at http://trainzportal.com or see all the articles and have your say forums

All content creators wanting to start to look into the technique will find some initial information on the wiki