Materials
This page goes over the topic of materials and its types.
Last updated
This page goes over the topic of materials and its types.
Last updated
Materials in Unity are how you add color and texture to your assets in a space. Many other elements within a matarial can enhance your space as well, such as emission and normal maps to add light or bump effects to your assets.
Right-click in the Project hierarchy, in the '_AddYourArtHere/Materials' folder, for example, and select Material. Name as you see fit.
You can apply materials to an asset by either dragging the material onto the asset in the Scene Viewport or Hierarchy. This will only be applied to this one object. The other option is applying it to the materials on the asset directly in the Materials tab, this will apply the material to all assets.
Once your material is created, you can select and modify different elements to get the desired effect.
It is highly recommended to keep textures to the power of two, such as 64x64, 128x128 up to 2048x2048. It is also possible to use other variations, such as 128x256 or 512x1024. Make sure to reduce the size of your textures as much as possible. This can be done in Unity or on the texture itself.
Also known as diffuse, it is the base color of the material. You can click on the color to affect that directly or drag an image into the square at the left.
Metallic is a certain type of reflective property on the material. Usually, you will keep this at 0 or 1, but this is up to you. The Standard shader uses Smoothness rather than Roughness compared to many other applications. So 0 or black is rough and not polished through to 1, or white is very shiny or polished.
If you want to create a texture for this, use the Red channel for the Metallic and the Alpha channel for smoothness. This is done to reduce filesize. Programs like Substance Painter can export this out correctly; otherwise, you can manually use Photoshop to create the texture.
The Normal map is a special texture that allows the light to display a bumpy surface. You may get a warning when applying a normal map that says 'Fix now' as Normal map textures require a 'Normal map' setting in their Texture Type. This can also be done on the Texture itself.
These are usually not recommended in WebGL spaces due to the filesize of textures in comparison to the benefit that these textures bring or functionality in WebGL spaces.
Turning on Emission offers a color and texture slot that allows the texture to emit light. The Bloom effect in a space will use the Emission Intensity, and also apply light within lightmaps. If you click on the color, you can adjust elements such as the emissive color and its intensity.
Intensity settings between 0.5 - 2 are recommended. More than that, and the bloom effect gets a bit much.
Tiling allows you to tile the texture more or less in two axes. If the mapping is not as you would like, improving the texture scale as you want is possible. This allows you to use smaller textures to create detailed materials.
Offset allows you to slide the texture along axes as needed. This is great for when you want to animate a texture along a direction (if the UVMaps allow it).
Secondary maps allow you to add more detail to your texture as Albedo and normal, with the ability to adjust its tiling and offset. This is very useful to break up tiling a bit at the cost of added filesize. Using smaller images to do so can improve the texture in detail, depending on the situation.
Specular Highlights and reflections can be turned off for faster processing if needed.
Render Queue - This defines the order that the material is rendered and only used in specific cases.
optimizingEnable GPU Instancing - This is used for optimizing material use in a space. If you have a lot of assets that use the same material, this could help.
Double-Sided Global Illumination - This will set the material to double-sided when rendering Global Illumination, as most materials are single-sided. Occasionally you may get a lightmap that looks incorrect or 'scattered'; this may fix that issue.