Game Editor (Workbench) Material Editing: Difference between revisions
m (Text replacement - " it's" to " it is") |
|||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
= Terrain Materials Editing = | = Terrain Materials Editing = | ||
Terrain material editing is very similar to the HeightMap editing. Tools are the same, but they don't edit the heigtmap, but the alpha channel of the alpha layer texture.<br | Terrain material editing is very similar to the HeightMap editing. Tools are the same, but they don't edit the heigtmap, but the alpha channel of the alpha layer texture.<br> | ||
'''The texture can be found in: ApplicationFolder/Worlds/TerrainFolderName/TerrainName_X_Y_layer.dds''' <br | '''The texture can be found in: ApplicationFolder/Worlds/TerrainFolderName/TerrainName_X_Y_layer.dds''' <br> | ||
<br | <br> | ||
Actually only 5 detail layers can be placed on one block. One layer is a basic (primary) one which covering whole block and doesn't need any channel. After terrain creating is in the channel "default material", which will be replaced by first user editing ( LMB click ). With the first click the "Terrain Manager" window will appears and there you have to choose the size of the layer texture per tile (can be changed later).<br | Actually only 5 detail layers can be placed on one block. One layer is a basic (primary) one which covering whole block and doesn't need any channel. After terrain creating is in the channel "default material", which will be replaced by first user editing ( LMB click ). With the first click the "Terrain Manager" window will appears and there you have to choose the size of the layer texture per tile (can be changed later).<br> | ||
<br | <br> | ||
Other layers is saved in each channel of layer texture B, G, R and as last A. When you paint a layer placed under another layer, it | Other layers is saved in each channel of layer texture B, G, R and as last A. When you paint a layer placed under another layer, it is used but you maybe will not notice, because you will not see it ( it is overlaped with that layer above). | ||
<br | <br> | ||
<br | <br> | ||
'''IMPORTANT NOTE:'''<br | '''IMPORTANT NOTE:'''<br> | ||
SuperTexture has crucial influence for correct displaying of layer material (color is heavily taken from supertexture).<br | SuperTexture has crucial influence for correct displaying of layer material (color is heavily taken from supertexture).<br> | ||
This means you have to recalculate super texture ( shortcut is "B" key ) after you draw layer material to see it correctly (especially at first time when the default texture (orange one) is everywhere ) | This means you have to recalculate super texture ( shortcut is "B" key ) after you draw layer material to see it correctly (especially at first time when the default texture (orange one) is everywhere ) | ||
== Available Materials == | == Available Materials == | ||
[[File:Available_Materials.jpg|thumb]] | [[File:Available_Materials.jpg|thumb]] | ||
<br | <br> | ||
The materials for terrain is defined in global materials in class "TerrainMaterial". To use these materials on current terrain you have to add each material into the current terrain. All usable materials can be found in listbox "Available materials". | The materials for terrain is defined in global materials in class "TerrainMaterial". To use these materials on current terrain you have to add each material into the current terrain. All usable materials can be found in listbox "Available materials". | ||
Line 23: | Line 23: | ||
== Materials Selection == | == Materials Selection == | ||
[[File:Used_Materials.jpg|thumb]] | [[File:Used_Materials.jpg|thumb]] | ||
<br | <br> | ||
To draw a material on terrain you have to select material in "Used layers" listbox (you will see "Material MaterialNameWithPath" in header ).<br | To draw a material on terrain you have to select material in "Used layers" listbox (you will see "Material MaterialNameWithPath" in header ).<br> | ||
* The numbers behind the materials in lilstbox showing their order in current block. If there is no number, the material is not used on the block. | * The numbers behind the materials in lilstbox showing their order in current block. If there is no number, the material is not used on the block. | ||
Line 30: | Line 30: | ||
* "Show used layer only" - showing only actual used materials in block which is currently under cursor. | * "Show used layer only" - showing only actual used materials in block which is currently under cursor. | ||
* "Delete layers above edited layer" when painting material on the terrain with this checked, it will automatically delete above layers used in this block (the materials with the higher number). | * "Delete layers above edited layer" when painting material on the terrain with this checked, it will automatically delete above layers used in this block (the materials with the higher number). | ||
<br | <br> | ||
While painting with material the current material is automatically added into the list of materials in current block. If is already five materials used on block, it will not paint nothing a error message will show up in console (F2). Count of materials per block can be found in menu Terrain -> Other -> Terrain Preview. | While painting with material the current material is automatically added into the list of materials in current block. If is already five materials used on block, it will not paint nothing a error message will show up in console (F2). Count of materials per block can be found in menu Terrain -> Other -> Terrain Preview. | ||
<br | <br> | ||
== Tool Parameters == | == Tool Parameters == | ||
[[File:Tools_Parameters.jpg|thumb]] | [[File:Tools_Parameters.jpg|thumb]] | ||
<br | <br> | ||
Is same as in height map tool, but there is one more button: | Is same as in height map tool, but there is one more button: | ||
* Del - will delete the material from the current block. | * Del - will delete the material from the current block. | ||
<br | <br> | ||
<br | <br> | ||
<br | <br> | ||
<br | <br> | ||
<br | <br> | ||
<br | <br> | ||
<br | <br> | ||
<br | <br> | ||
<br | <br> | ||
<br | <br> | ||
== Layers Operation == | == Layers Operation == | ||
[[File:Material_Context_Menu.jpg|thumb]] | [[File:Material_Context_Menu.jpg|thumb]] | ||
Can be found in material context menu -> double click on material in "Used materials" listbox. When starting with new terrain is usually good to generate basic coverage with materials. Example: We want to have sand on the beach, rock on big slopes of terrain and all the other will be covered with grass. This all can be automated via Layer Generator. | Can be found in material context menu -> double click on material in "Used materials" listbox. When starting with new terrain is usually good to generate basic coverage with materials. Example: We want to have sand on the beach, rock on big slopes of terrain and all the other will be covered with grass. This all can be automated via Layer Generator. | ||
<br | <br> | ||
=== Layer Generator === | === Layer Generator === | ||
Line 90: | Line 90: | ||
** subtract alpha | ** subtract alpha | ||
** multiply alpha | ** multiply alpha | ||
* add non existing material - material is generated only on block where was added by user. This option will generated them also on blocks where is not placed yet (if there is no already five materials).<br | * add non existing material - material is generated only on block where was added by user. This option will generated them also on blocks where is not placed yet (if there is no already five materials).<br> | ||
<br | <br> | ||
If you have some block selected, the layer will be generated only these block, otherwise it will be used on all blocks. | If you have some block selected, the layer will be generated only these block, otherwise it will be used on all blocks. | ||
<br | <br> | ||
=== Remove Whole Layer === | === Remove Whole Layer === | ||
Remove the material from all block on the current terrain (same as "del" button). | Remove the material from all block on the current terrain (same as "del" button). |
Latest revision as of 18:21, 7 September 2020
Terrain Materials Editing
Terrain material editing is very similar to the HeightMap editing. Tools are the same, but they don't edit the heigtmap, but the alpha channel of the alpha layer texture.
The texture can be found in: ApplicationFolder/Worlds/TerrainFolderName/TerrainName_X_Y_layer.dds
Actually only 5 detail layers can be placed on one block. One layer is a basic (primary) one which covering whole block and doesn't need any channel. After terrain creating is in the channel "default material", which will be replaced by first user editing ( LMB click ). With the first click the "Terrain Manager" window will appears and there you have to choose the size of the layer texture per tile (can be changed later).
Other layers is saved in each channel of layer texture B, G, R and as last A. When you paint a layer placed under another layer, it is used but you maybe will not notice, because you will not see it ( it is overlaped with that layer above).
IMPORTANT NOTE:
SuperTexture has crucial influence for correct displaying of layer material (color is heavily taken from supertexture).
This means you have to recalculate super texture ( shortcut is "B" key ) after you draw layer material to see it correctly (especially at first time when the default texture (orange one) is everywhere )
Available Materials
The materials for terrain is defined in global materials in class "TerrainMaterial". To use these materials on current terrain you have to add each material into the current terrain. All usable materials can be found in listbox "Available materials".
- For adding new material Select material you want to use on terrain in the "Available materials" listbox and click on use button (on the right side ) and the material will be added to the "Used Materials" listbox.
- Above the use button is preview of the texture, double click on the picture will show up full size preview of the diffuse texture.
Materials Selection
To draw a material on terrain you have to select material in "Used layers" listbox (you will see "Material MaterialNameWithPath" in header ).
- The numbers behind the materials in lilstbox showing their order in current block. If there is no number, the material is not used on the block.
- On the right is material preview (same as in available materials), but the border shows the defined color for "Layer debug view".
- "Show used layer only" - showing only actual used materials in block which is currently under cursor.
- "Delete layers above edited layer" when painting material on the terrain with this checked, it will automatically delete above layers used in this block (the materials with the higher number).
While painting with material the current material is automatically added into the list of materials in current block. If is already five materials used on block, it will not paint nothing a error message will show up in console (F2). Count of materials per block can be found in menu Terrain -> Other -> Terrain Preview.
Tool Parameters
Is same as in height map tool, but there is one more button:
- Del - will delete the material from the current block.
Layers Operation
Can be found in material context menu -> double click on material in "Used materials" listbox. When starting with new terrain is usually good to generate basic coverage with materials. Example: We want to have sand on the beach, rock on big slopes of terrain and all the other will be covered with grass. This all can be automated via Layer Generator.
Layer Generator
Select height properties
- Maximum height - max terrain height where the generation has max influence
- Minimum height - max terrain height where the generation has max influence
- Maximum height extension - overlap over max terrain height (for continual gradient)
- Minimum height extension - overlap over min terrain height
In range "Minimum height - Minimum height extension" -> "Maximum height + Maximum height extension" will be material generated. Schematic illustration is on the right side.
Select Angle Properties
- Minimum angle - mim terrain slope where the generation has max influence
- Maximum angle - max terrain slope where the generation has max influence
- Minimum angle extension - overlap over min terrain slope
- Maximum angle extension - overlap over max terrain slope
In range "Maximum angle - Maximum angle extension" -> "Minimum angle + Minimum angle extension" will be material generated. Schematic illustration shows rising slope.
Select Alpha Properties
- Minimum alpha
- Maximum alpha
The resolution of the generation is in standard interval from 0 to 255 here you can change it.
Other Setting
- Probability - probability of layer generation example: 0,75 = 75% will be material used, else not - "sharp noise"
- Random added - randomly added value x 255 - "soft noise"
- Restriction - Restriction material generation for exact angle in XY plane. It's good for materials with different mapping than standard XY
- Select filter - final texture filtering
- Filter passes - count of passes through the filter
- Select final operation - what will be done with generation results:
- replace
- add alpha
- subtract alpha
- multiply alpha
- add non existing material - material is generated only on block where was added by user. This option will generated them also on blocks where is not placed yet (if there is no already five materials).
If you have some block selected, the layer will be generated only these block, otherwise it will be used on all blocks.
Remove Whole Layer
Remove the material from all block on the current terrain (same as "del" button).
Replace Layer Material
When selected a combobox appears where you can select a new material which will replace the selected one.
Replace Default Material
If is default material ( the orange one ) present anywhere on the terrain, this option will replace it by selected material.
Show Layer Coverage
Will mark all blocks of terrain (where is the material used ) by green squares.