Web Update 19.10.2024

KIND Texturing

You are here:
Estimated reading time: 3 min
In this article

Trainz texture files in ASCII text format specification files describing a single texture. Texture files have “texture.txt.” Extension, the file structure is specified in the Config.txt file or similar, “. Txt” this extension must be used”. Texture”.

 

Files with *. Texture.txt and extensions are used to configure texture behavior in Trainz. These files can also control how textures are handled in Content Manager. These files are located in the same folder as the texture source files, (.BMP .TGA or .JPG). These files are generated automatically, but can be edited manually when specialization is needed.

Syntaxe

Primary=Texture.tga
Alpha=Texture.tga
Tile=st
AlphaHint=masked
Anisotropy=16
MagFilter=linear
MinFilter=linear
MipFilter=linear
Primary=diffusemap.bmp

This tag specifies the name of the image file representing the colors (R,G,B) of the texture channels. Any alpha channel in the image file is ignored. The resulting texture will be pure white (100%) alpha channel.

Primary=diffusemap.jpg
Alpha=diffusemap.bmp

This command specifies the filenames of an image file representing the colors (R,G,B) of the texture channels, and an image file representing the alpha (A) of the texture channel. The image’s alpha channel should be in grayscale. Neither file should contain an alpha channel.

Primary=diffusemap.tga
Alpha=diffusemap.tga

This command combines the filenames from a single image file representing the color and alpha channel (R,G,B,A) of the texture channels. In this case, both tags must refer to the same name. The image file must contain an alpha channel.

Compression=dxt1

This tag will force a special texture compression mode to be used. If omitted, Trainz will choose an appropriate texture compression system based on the content of the supplied image files. If you don’t have specific effects in mind, don’t include this tag. Valid options are ‘none’, ‘dxt1’, ‘dxt3’, ‘dxt5’. See DXT compression.

NormalMapHint=normalmap

The ‘NormalMapHint’ tag allows the texture to be specified as a normal map. By default, Trainz will assume that the structure is a diffuse map and will apply some processing options that are not appropriate for normal maps. You must specify this option for a normal map. Valid options are “none” and “normalmap”.

ModifyMap=flipgreen

The “ModifyMap” option enables the green color channel of the texture, allowing the curvature to be rendered. Some programs like 3ds Max can create normal maps with the Y axis facing the opposite side to what is expected using Trainz shaders. This option can be used to make the effect look correct in Trainz. This option is applied in Content Manager to Commit. Valid options are “none” and “flipgreen”.

AlphaHint=opaque

The ‘AlphaHint” tag allows you to force a certain alpha mode on a texture. Valid options are “opaque” (which means the alpha channel is unused and effectively pure white), “semitransparent” (which means the alpha channel is a grayscale blend), and “masked” ( meaning the alpha channel is a pure black and white bitmap. ) if omitted, Trainz will supply the appropriate value for that tag based on the alpha channel. Using this option will prevent the slight tinting in the texture mask from triggering the blended alpha path.

Anisotropy=1

Anisotropic sampling quality. The higher the number, the better the visual quality, but at a significant performance cost. Where quality texture is required specify a higher value. Trainz currently defaults to very high anisotropic filtering, which is subsequently limited by the anisotropic slider in the game. Valid values are integers “1” (default) – No anisotropic filtering, “2” – low, “4” – medium, “8” – high, and “16” – Very high

MagFilter=linear

Controls the filtering style for Texel magnification. This is used when the display texel is larger than the actual size (eg one texel is represented by more than one pixel.) Valid settings for the zoom filter are “‘nearest”, “linear” and “default”. default). Trainz currently defaults to linear interpolation. Selecting “nearest” will use the nearest neighbor filtering mode, which results in “pixelated” output.

MinFilter=linear

Controls the filtering style for Texel Minification. This is used when the texel is displayed smaller than the actual size (eg one pixel is represented by more than one texel.) Valid settings for the Minification filter are “closest”, “linear” and “default”. Trainz currently defaults to linear interpolation. The “closest” option will use the quantized filtering mode, which will result in a “noisy” output.

MipFilter=linear

Controls the filtering style for mipmap texture selection. Mipmaps are used during Minification to help prevent the moiré effect of the pattern. The cost of using a mipmap is that the resulting image will be slightly blurry. The advantages of using Mipmaps are: reduced quantization noise and reduced memory requirements (since higher MIP level data can be freed if not used.) Valid settings for MIP filter are “nearest”, “nearest”, “default” and “none”. Trainz currently defaults to Trilinear interpolation. The “closest” option causes the hardware to select one Slider for each pixel, resulting in visible stripes on the boundary mipmap. The “none” option disables mipmaps, resulting in lower performance, higher memory usage, and “noisy” output.

In computer graphics, mipmaps or pyramids are pre-calculated, optimized sequences of images, each a progressively lower resolution representation of the previous one. The height and width of each image or level in the mipmap is twice that of the previous level. Mipmaps don't have to be square.
Tile=st

Tiling refers to the ability for texture coordinates outside the range (0.0 .. 1.0) to be treated as valid coordinates for infinitely squaring the texture. With tilings active, coordinates that go through the right/bottom side of the texture effectively wrap back on the left/top side, and so on. Valid options are ‘s’ (tiles horizontally), “t” (tiles vertically), “street” (tiles both horizontally and vertically), and “none” (does not tile the image).

Was this article helpful?
Dislike 0 0 of 0 found this article helpful.
Views: 9
Alpinetrainz
Logo
Shopping cart