Material Layers tool is used for editing material layers.
To access
Material Layers tool you have to click on the icon
Layers tabs
Click here to select the layer to edit.
|
Layer Index
Index of the current layer to edit
|
Texture Slots
The layer slots for Diffuse and Normal textures.
There are 2 way to assign a texture to one of these slots:
-
Click on the slot and browse for the texture to assign
-
Drag 'n' drop the texture from the project browser directly to the slot
|
Lighting props
Layer PBR settings:
-
Roughness: values from 0 (miniumu roughness) to 1 (max roughness)
-
Reflectivity: values from 0 (minimum) to 1 (maximum), usual values are about 0.25 - 0.65
-
Metallic: values for 0 (no metallic) to 1 (maximum metallic)
The reflectivity and metallic parameters are set to 0 by default.
So, if your material is metallic your have to set the metallic parameters to a value > 0 to see any effect
instead, if your material is non metallic you have to set reflectivity to a value > 0 to see any reflection effect
|
Layer Mask
The mask channel used by the current editable layer
|
Layer Painting
Click on Paint button to enabled painting
|
Texture coordinates transformations
Here you can edit the tiling, the animated scrolling and the mapping index of layer texture coordinates:
-
Diffuse Tiling: Diffuse Texture tiling scale on U and V coordinates.
-
Diffuse Angle: This is the angle the diffuse texture UV coordinates must scroll. It works only if Diffuse Speed has a value > 0.
-
Diffuse Speed: This is the speed of scrolling of diffuse texture coordinates. If 0 the scrolling is disabled.
-
Normal Tiling: Normal Texture tiling scale on U and V coordinates.
-
Normal Angle: This is the angle the normal texture UV coordinates must scroll. It works only if Normal Speed has a value > 0.
-
Normal Speed: This is the speed of scrolling of normal texture coordinates. If 0 the scrolling is disabled.
-
Clamp U coord: Check this if you want to clamp to 0,1 interval the values of the texture U coordinates of current layer
-
Clamp V coord: Check this if you want to clamp to 0,1 interval the values of the texture V coordinates of current layer
-
UV index: The index of the UV mapping to use, 0 or 1, to be applied to the textures of the material. See Materials for more info.
-
Mask UV index: The index of the UV mapping to use, 0 or 1, to be applied to the mask of the current layer. See Materials Mask for more info.
|
Layer colors
Here you can set the color related properties of the layer:
-
Diffuse Color: this is the color multiplied to the diffuse texture of the layer
-
Specular Color: this is the color multiplied to the specular highlight of the layer. It works only for certain types of material (for example transparent).
-
Layer Alpha: use this to set the alpha transparency of the layer. For layer 0 it corresponds to the material alpha.
|
By default a material as only 1 layer enabled (1 diffuse + 1 normal texture).
If you want to enable more than 1 layer you need first to create a mask texture.
To create a mask texture you can proceed in 2 alternate ways:
-
Create a new texture as in Creating Textures paragraph. In this way you have to choose between a 32 bit texture if you need the alpha channel (for example in the case of decal materials) or 24 bit if you do not need it.
Once you created the texture you have to assign it as mask to the material by drag 'n' drop it into the mask slot of the Material Properties tool, like showed into the following animated gif:
-
If you already have a mask produced by an external program (like Photoshop) you can import it directly into an enabled layer.
In this way you have to first enable the layer (as described below) and then click on import button into the Layer Mask section of the enabled layer tab:
The mask to import must be a greyscale texture. If you try to import an RGB texture only the red channel will be imported.
Also note that if you want to import the a mask on the subsequent layers, the texture must be the same resolution as the first one imported
In the case the material hasn't a mask assigned, when importing a mask into the layer, a popup dialog appears, informing you that a new mask for the material has been automatically created and assigned to it.
If the material has already a mask assigned to it, be sure the mask you want to import has the same resolution of the mask assigned to the material, otherwise an error message could appear
By default Layer 0 is always enabled, so it cannot be disabled.
The first time you select a layer different from Layer 0, it is empty, and only enable button is visible, as showed into the following image:
To enable the layer click on Enable button.
At this point, if you haven't assigned a mask to the material yet, a popup dialog appears:
Even if you can import it, layers mask can be also painted directly inside S2Engine
material editor.
Of course you have first to create and assign the
mask to the material.
Once assigned a mask to the material you can select the layer you want to paint and click on Paint button as showed into the following gif:
To paint the mask simply click left mouse button (LMB) on the material in the material vewport, to erase it hold Ctrl+LMB.
You can also paint the material directly on the object into the scen viewport, BUT ONLY IF the object is a static object