====== The material editor ====== The //Material editor// window, shown below, is opened using the '//Edit//' button in the [[l3dt:userguide:climates:matmanager|material manager]] window, or by selecting a material name in L3DT's '//Resources->Materials//' menu.

{{l3dt:userguide:dialogs:matedit.png}}

The various settings and controls in this dialog box are explaied below: ===== Material name ===== A unique string that identifies this material. ===== Material filename ===== The file name of the material file (.mat.xml). Materials should be placed in the following directory or in subdirectories thereof: ^ Win 8/7/Vista | C:\Users\[username]\L3DT\Resources\[version]\Climates\ | ^ Win XP | C:\Documents and Settings\[username]\L3DT\Resources\[version]\Climates\ | ===== Texture/bump-map layers ===== The texture and bump-map for each material is built up from a number of layers. A material only needs to have one layer, but more can be added to provide detail at high texture / light-map resolutions. Typical materials in L3DT climates might have three to four texture layers. The layer list shows the texture / bump-map layers used by this material. ==== Copy / Create ==== Create a new layer, or create a copy of an existing layer if a layer is selected in the list. This option will open the [[l3dt:userguide:climates:layeredit|layer editor dialog box]], in which you may edit the new layer's settings. ==== Edit ==== Edit the selected material using the [[l3dt:userguide:climates:layeredit|layer editor dialog box]]. ==== Remove ==== Remove the selected layer from the material's layer list. ===== Enable bump mapping ===== Enables or disables bump-mapping for this material in the normal map and light map calculations. If disabled, this will override the bump map settings of each texture/bump-map layer. ==== Bump mapping strength ==== The weighting of the bump map as a fraction of the final terrain normal vector. Values of 0.5-1 are typical, but larger values may be used for 'extreme' bump-mapping. ===== Enable strata overlay ===== Enables or disables the strata texture overlay for this material (//[[l3dt:algorithms:cli:material#strata_overlays|what's a strata overlay?]]//) ==== Strata file name ==== {{l3dt:algorithms:cli:land_type:sandstrata1.png?20 }} The name of the image file to be used as the strata profile. This image should be a 1-dimensional 'vertical' image (i.e. long y-axis, example at left), the colour values of which are used to //modulate// the texture colour. The behavour is as follows: * For no colour change, an RGB value of {128, 128, 128} should be used. * To blacken a band in the strata map, set the colour to {0, 0, 0}. * To double the intensity of red, green or blue in a strata band, set the colour to r = 255, b = 255 or g = 255. ==== Strata scale ==== The physical 'height' of a pixel in the strata profile. A value //larger// than the heightfield resolution is recommended to avoid dodginess on sloped terrain. ==== Strata strength ==== The weighting of the strata effect. A value of 0 gives no strata effect (just the regular texture), and a value of 1 gives the full strata effect. ===== Enable colour balancing ===== If you would like to modify the colour balance of the material's texture, check the //Enable colour balancing// box and set the colour scaling factors in the edit boxes. For example, a Red value of 1.5 will make the red channel in the texture 50% brighter (i.e. more red), and a value of 0.5 will make it 50% darker (i.e. less red). ===== Preview ===== If you would like a preview of what the material's texture and bump-maps will look like after blending, press the //preview// button on the lower-left corner of the //material editor// dialog box. When you press this button, L3DT will generate a 1024x512 preview image of the texture and the bump-map side-by-side, such as the examples shown below:
| {{:l3dt:userguide:climates:matedit:matpreview.jpg}} | ^ Material preview for 'std_cliffs'. ^ | {{:l3dt:userguide:climates:matedit:matpreview2.jpg}} | ^ Material preview for 'std_grass_lush'. ^
There are some things to note about the preview option: * The preview does not apply light-mapping to the texture, so it will look as if it was lit from directly overhead without bump-mapping. * The preview textures and bump-maps are generated with texture and normals resolution of 4x (for L3DT standard) and 16x (for L3DT Professional).