# Material Editor

**Material Editor** \[Textures] is part of the **Land Editor** (Land). \
This tool is designed for editing and configuring materials applied to the ground surface in the game world.

## Key elements of the Material Editor

<figure><img src="https://2358506489-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UV9d5d9aTZPISbocWyo%2Fuploads%2FzfhYeG6Zu0NAt5l69sUB%2Fimage.png?alt=media&#x26;token=c5606b82-61db-45ea-839f-74bf81dc1963" alt=""><figcaption><p>Interface elements of the Material Editor</p></figcaption></figure>

1. Textures brush
2. Sliders for brush parameter adjustment
3. List of all ground materials on the map
4. Texture preview window for selected material
5. Properties window of the selected material

## Quick guide to using the Material Editor

1. **Selecting a material**
   1. Select the desired material from the material list \[3] or use the eyedropper to select a material from the map.
   2. If the desired material is not on the map, add it using the `Add` button \[3.1] or import materials from another map using the `Import` button \[3.2].

<figure><img src="https://2358506489-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UV9d5d9aTZPISbocWyo%2Fuploads%2FZlEhmWJukgQKrEvv2klL%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202024-07-18%20%D0%B2%2013.32.19.png?alt=media&#x26;token=2acd9eec-4d45-4468-adf3-40b35296686e" alt="" width="518"><figcaption></figcaption></figure>

2. **Configuring texture parameters in a material**

   1. In the properties window of the selected material \[5], choose the material scheme for each layer:
      * \[5.3] - layer1;
      * \[5.4] - layer2.

   <figure><img src="https://2358506489-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UV9d5d9aTZPISbocWyo%2Fuploads%2FSx4oxbBy1X8zqhcUxlGT%2Fimage.png?alt=media&#x26;token=dfd95ff6-e3c7-41db-b474-eb1ae684ccd0" alt="" width="446"><figcaption></figcaption></figure>

   2\.   Configure the material parameters for each layer:

   * select the diffuse texture \[4];
   * adjust the density and tile size \[5.1];
   * set the parameter values for each layer of the material \[5].

<figure><img src="https://2358506489-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UV9d5d9aTZPISbocWyo%2Fuploads%2FClpKxpEn83LMYOFzPNZu%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202024-07-18%20%D0%B2%2017.28.28.png?alt=media&#x26;token=97d522fa-2763-47f1-8a0c-15fce5059f66" alt="" width="416"><figcaption></figcaption></figure>

2. **Brush Settings**
   1. Adjust the brush size using the `+` and `-` keys on the Numpad.
   2. Use the `Soft-Sharp` and `Slow-Fast` sliders to adjust the brush edge softness and texture application speed.
   3. Adjust the texture blending in the material if necessary.

<figure><img src="https://2358506489-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UV9d5d9aTZPISbocWyo%2Fuploads%2FqiqZ7Hgt1CsHCFNnXh7Z%2FBrush%20Settings.png?alt=media&#x26;token=91eb4f44-bb96-43c9-aa45-95ef88af0558" alt="" width="458"><figcaption></figcaption></figure>

3. **Applying Material Textures**
   1. Use the brush to apply the selected material to the desired areas of the map.
   2. Create smooth transitions between materials by using the same texture in both materials..

## Detailed information for each Quick guide point

### **Material List**

Material List displays available materials for painting.\
All available materials on the map are displayed in a separate window as a list, with each entry showing the names of two textures.

<figure><img src="https://2358506489-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UV9d5d9aTZPISbocWyo%2Fuploads%2FZlEhmWJukgQKrEvv2klL%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202024-07-18%20%D0%B2%2013.32.19.png?alt=media&#x26;token=2acd9eec-4d45-4468-adf3-40b35296686e" alt="" width="518"><figcaption></figcaption></figure>

<table><thead><tr><th width="222">Element</th><th width="250">Description</th><th>Note</th></tr></thead><tbody><tr><td><code>[Name1]...[Name2]</code></td><td><p>A ground material consists of a pair of textures:</p><ul><li><strong>primary</strong> <strong>texture</strong> - left;</li><li><strong>secondary texture</strong> - right.</li></ul><p></p></td><td>By default, when creating a new map, the entire surface is filled with the primary texture of <a href="#base-material">the base material</a></td></tr><tr><td> <code>Add</code></td><td>Button to add material to the list.</td><td>When you click the <code>Add</code> button, the editor adds a copy of the currently selected material from the list. <br>Then, in the newly added material row, you need to change one of the textures: left or right, to save the added material in the list.</td></tr><tr><td><code>Import...</code> </td><td>Button to import a material list from another map.</td><td>The editor allows you to choose a map from the list available for loading in the editor.</td></tr></tbody></table>

### **Base Material**

When creating a new map, the entire surface is filled with the default material, where the left and right textures are the same.

It is recommended to immediately replace the right texture in the default material, creating a base material for the ground surface so that it is convenient to make transitions with other materials.

## **Material Selection**

There are two ways to select a material from those available on the map:

1. Left-click (LMB) on the material row in the material list \[3].

<figure><img src="https://2358506489-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UV9d5d9aTZPISbocWyo%2Fuploads%2FZlEhmWJukgQKrEvv2klL%2F%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%202024-07-18%20%D0%B2%2013.32.19.png?alt=media&#x26;token=2acd9eec-4d45-4468-adf3-40b35296686e" alt="" width="518"><figcaption></figcaption></figure>

2. Use the eyedropper to select a material. To activate the eyedropper, hold down the `Ctrl` key and click LMB on the visually suitable point on the map surface.

## **Material configuration**

Selecting a material will highlight the corresponding row in the material list \[3]. \
The preview \[4] and settings \[5] windows will display information about the textures in the selected material.

<figure><img src="https://2358506489-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UV9d5d9aTZPISbocWyo%2Fuploads%2FH021rejznlr47OzrlRDF%2FPreview%20textures%20window.png?alt=media&#x26;token=333ced4e-78bf-4712-bbcf-4e6ea39671a7" alt="" width="508"><figcaption><p>The Preview textures window</p></figcaption></figure>

### **Managing textures in a material**

<table><thead><tr><th width="123">Action</th><th width="180">Description</th><th>Note</th></tr></thead><tbody><tr><td><strong>Replace texture in material</strong></td><td>LMB on the texture visualization tile [4] opens the texture selection window.</td><td><p>When replacing a texture in a material, it will be replaced not only in the material but also in all places on the map where the selected material is applied. </p><p>This can spoil the visualization of transitions between materials. It is recommended to replace textures in a material only when absolutely necessary</p></td></tr><tr><td><strong>Swap</strong></td><td>Swap textures in a material.</td><td>This action will change textures not only in the material but also in all areas where the material is applied on the map, which can spoil the transitions between materials. It is recommended to do this only when absolutely necessary</td></tr><tr><td><strong>Fill</strong></td><td>Paint the entire map with the primary texture of the selected material.</td><td>Useful if you need to completely change the map's texture painting (e.g., change the season on the map)</td></tr></tbody></table>

### Main material parameters

<table><thead><tr><th width="78">№</th><th width="145">Parameter</th><th width="251">Description</th><th>Recommended Value</th></tr></thead><tbody><tr><td>4.1</td><td>Texture size</td><td>Side length of the texture square in pixels</td><td>1024</td></tr><tr><td>4.2</td><td>Texture density</td><td>Number of texture pixels per 1 meter of terrain surface in the game space</td><td>128 pix/m</td></tr><tr><td>4.3</td><td>Tile size</td><td>Step with which the texture will repeat when evenly covering the terrain surface</td><td>Should be chosen so that the texture density on the terrain surface varies within 120-130 pix/m</td></tr><tr><td>5.1</td><td>Lend texture basis</td><td>Base value of the material tile</td><td>15</td></tr><tr><td>5.2</td><td>MTL№</td><td>Field for setting the material type (one-layer or two-layer)</td><td>Only two-layer materials are used for applying to the terrain surface. Single-layer materials are used in the Water Editor</td></tr><tr><td>5.3</td><td>Layer 1</td><td>Field for choosing the scheme type for the first layer texture</td><td>The scheme type affects the composition of texture maps in the layer and the set of parameters in the texture settings</td></tr><tr><td>5.4</td><td>Layer 2</td><td>Field for choosing the scheme type for the second layer texture</td><td>-</td></tr></tbody></table>

## Brush

The textures brush allows you to apply materials to the ground surface in the game world. Texture application occurs on the vertices of the terrain mesh that fall within the brush circle.

### **Brush settings management**

<table><thead><tr><th width="288">Action</th><th width="260">Tool</th><th>Note</th></tr></thead><tbody><tr><td>Changing sizes of a brush</td><td><code>+</code> and <code>-</code> keys on the Numpad</td><td></td></tr><tr><td>Adjusting brush edge softness</td><td><code>Soft-Sharp</code> slider</td><td>Soft - soft edges; <br>Sharp - sharp edges</td></tr><tr><td>Adjusting texture application speed</td><td><code>Slow-Fast</code> slider</td><td></td></tr><tr><td>Selecting material from the list</td><td>LMB on the desired row in the material list window [3]</td><td>-</td></tr><tr><td>Pick a material from the map</td><td>The eyedropper tool</td><td>Hold down the <code>Ctrl</code> key and click LMB on the desired point on the map</td></tr></tbody></table>

## Ways to apply material textures

### **Pure Application**

* To apply a texture to the surface, move the mouse while holding down the LMB or RMB (for applying primary or secondary textures respectively).

### **Blending**

* Apply one texture over another by clicking LMB or RMB.
* Fix the degree of texture blending using the slider position in the texture visualization window.

<figure><img src="https://2358506489-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UV9d5d9aTZPISbocWyo%2Fuploads%2Fe1GlL9hgtJm3bkN5WWm0%2Fimage.png?alt=media&#x26;token=758e323d-9b06-4662-bacf-8dd3beb2a134" alt="" width="464"><figcaption><p>Texture b<strong>lending slider</strong></p></figcaption></figure>

## Transitions between materials

To create smooth transitions between materials, use the same texture in both materials at their borders. This ensures a seamless gradient from one material to another.

<figure><img src="https://2358506489-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2UV9d5d9aTZPISbocWyo%2Fuploads%2Fb3LLvlqqZ97CGxEJLLHC%2Fimage.png?alt=media&#x26;token=0ca2a6d8-18b5-4398-b486-17031c209d6a" alt=""><figcaption><p><strong>Illustration of transitions between materials 1 and 2</strong></p></figcaption></figure>

<details>

<summary>Illustration Description</summary>

In the example shown, materials 1 and 2 share the same secondary texture – `forest_ground01_pbr`.

Smooth and visually seamless transitions between materials are achieved by applying their common texture, `forest_ground01_pbr`, along the entire perimeter of the transition.

In the illustration, the transition contour between materials 1 and 2 is shown with an orange arc, where the secondary texture of both materials is used to create a smooth transition.

Attempts to join materials using different textures result in sharp seams, as shown in the area marked by the red square.

It doesn't matter which texture (primary or secondary) is shared. The key is that the transition between materials is made through a common texture.

</details>
