Home
Reference Index
Editor
Scenery Tab
NL2MAT Editor
NL2MAT Texture Unit Setup
Introduction
This window is used to configure a texture unit. A material can make use of up to 4 texture units. Here you can assign a texture and control how the texture coordinates are generated. For each texture unit the processing works like this: First, a texture coordinate is generated by the T.C. Gen stage. The texture coordinate is then modified by optional T.C. Mod stages. Depending on the texture unit type and mode settings, a color value is then fetched using the final texture coordinate. That color value is stored in the unit's texture register that can be accessed in the shader core.
Some texture types do not require the texture coordinate generation and modification stages. For example the Constant Color type simply stores a fixed color value into the texture register.
Type Tab
Here you set the type of texture, respectively what type of data is generated in this texture unit.
- No Texture - Will not assign a texture to this unit. Identical to disabling this unit.
- 2D (File specified in Model File) - Use the texture image file that is specified inside the diffuse material of the 3D model file.
- 2D (File) - Custom texture image file. Select the file using the [...] button.
- 2D Animation (List of Files) - Use multiple images from files and play those as a repeated animation. You can configure the speed of the animation using Frequency.
- Constant Color - Use a constant color. Similar to using a texture with a plain color, but more efficient.
- Forward Texture Coordinate - The texture coordinate result from the T.C. Gen and T.C. Mod stages will simply be forwarded into the texture register. This is meant to be able to forward specific data into a custom shader core for being processed there.
- Cube Map - Use a cube map (either one single DDS cube map file or 6 individual side images similar to a skybox). Note that this mode requires a TCGEN that produces 3D texture coordinates.
- Automatic Water Effect Bump Normal Map - Use the internal animated water ripple effect normal map. This can be used as a bump map.
- Video Stream Slot # - A 2D video stream from the scenery object's corresponding video stream slot. A script needs to assign a video file to the object's video stream slot and needs to take care of handling the playback.
- Internal - Used internally only, do not use it.
Mode Tab
Here you need to set how the texture image is being used.
- Standard - This is the default mode that is used for most cases.
- Internal Format - Controls how the texture channels (RGBA) are internally stored and interpreted. Default is the sRGB(A) format which is the typical format for color images. It uses a non-linear gamma curve for the RGB channels, while the alpha channel is stored linearly. The other formats interpret the color channels in a linear way. They are suitable for metallic, roughness and similiar linear intensity maps. The Linear grayscale format only stores one channel in order to reduce texture memory, while the Linear RGBA format stores all 4 channels.
- Bump Mode (using Normal Map) - The texture is used to specify the bump map for the Bump Lighting RGBGen mode and the texture is a normal map.
- Bump Mode (using Height Map) - The texture is used to specify the bump map for the Bump Lighting RGBGen mode and the texture is a height map.
- Height Scale - Controls the intensity of the bump effect. Default value is 2.2
T.C. Gen. Tab
Here you can control how the texture coordinates are generated.
- From Model File - Simply use the UV coordinates from the model file.
- From Model File (Second UV Map) - Use the coordinates from the second UV map from the model file. Only some model file types, such as DAE support a second UV map.
- Environmental - Generate coordinates for environmental sphere reflection mapping.
- Reflection - Generate 3D reflection coordinates. Can be used with cube maps to simulate reflections.
- Normal Vector - Generate 3D coordinates from the normal vectors of the vertices. Can be used with cube maps.
- From Model Vertex Position - Generate the coordinates from the position vectors of the vertices (in model coordinate system), using a transformation matrix.
- From World Vertex Position - Generate the coordinates from the position vectors of the vertices (in world coordinate system), using a transformation matrix.
T.C. Mod. Tab
Here you can add multiple modifications that further modify the generated texture coordinates. Each stage has the previous stage as input. The first stage takes the coordinates from the TCGEN unit as input. The output of the last stage is the final output. If no TCMOD stages are added, the output of the TCMOD unit is identical to the output of the TCGEN unit.
- Scroll - Time controlled shifting of the coordinates. Use Speed S and Speed T to control the scrolling speed.
- Rotate - Time controlled rotation around the center coordinate (0.5, 0.5).
- Scale - Constant scale.
- Stretch - Time controlled scale using a wave function.
- Turbulence - Time controlled offsets using a wave function, to simulate turbulence.
- Transform - Transform using a transformation matrix.
- Scale from Object - Scale the coordinates using a a transformation matrix combined with the object's scale.
- Offset from Object - Offset the coordinates using a transformation matrix combined with the object's position.
Advanced Tab
Here you can select advanced options that affect the texture quality and fetch.
- Clamp To Edge - Coordinates will be clamped to the edge of the texture for coordinates outside of 0..1. When disabled, default mode will repeat the image.
- Force No Mipmapping - Will not create mipmaps when enabled.
- Force No Compression - Will not compress the textures when enabled. Use this for very important textures that need to have highest quality. (will improve quality, but will reduce performance and increase GPU memory usage).
- Force No Resize - Will never downsize the texture image when enabled. Use this for very important textures that need to have highest quality. (will improve quality, but will reduce performance and increase GPU memory usage).
- Nearest Filtering - Will not bilinear filter the texture pixels when enabled.
- Improve Colors with Zero Alpha - Will try to fix texture pixels where the alpha value is zero to avoid bleeding artefacts caused by blinear filtering.
- Improve Alpha Tested Mipmaps - Will try to improve mipmaps when 'Cutout Transparency' mode is used.