The standard shader presents you with a list of material parameters. These parameters vary slightly depending on whether you have chosen to work in the Metallic workflow mode or the Specular workflow mode. Most of the parameters are the same across both modes, and this page covers all the parameters for both modes.
These parameters can be used together to recreate the look of almost any real-world surface.
The first option is Rendering Mode. This allows you to choose whether the object uses transparency, and if so, which type of blending mode to use.
Opaque - Is the default, and suitable for normal solid objects with no transparent areas.
Cutout - Allows you to create a transparent effect that has hard edges between the opaque and transparent areas. In this mode, there are no semi-transparent areas, the texture is either 100% opaque, or invisible. This is useful when using transparency to creat the shape of =materials such as leaves, or cloth with holes and tatters.
Transparent - Suitable for rendering realistic transparent materials such as clear plastic or glass. In this mode, the material itself will take on transparency values (based on the texture’s alpha channel and the alpha of the tint colour), however reflections and lighting highlights will remain visible at full clarity as is the case with real transparent materials.
Fade - Allows the transparency values to entirely fade an object out, including any specular highlights or reflections it may have. This mode is useful if you want to animate an object fading in or out. It iss not suitable for rendering realistic transparent materials such as clear plastic or glass because the reflections and highlights will also be faded out.
The Albedo parameter controls the base color of the surface.
Specifying a single colour for the Albedo value is sometimes useful, but it is far more common to assign a texture map for the Albedo parameter. This should represent the colours of the surface of the object. It’s important to note that the Albedo texture should not contain any lighting, since the lighting will be added to it based on the context in which the object is seen.
The alpha value of the Albedo colour controls the transparency level for the material. This only has an effect if the Rendering Mode for the material is set to one of the transparent mode, and not Opaque. As mentioned above, picking the correct transparency mode is important because it determines whether or not you will still see reflections and specular highlights at full value, or whether they will be faded out according to the transparency values too.
When using a texture assigned for the Albedo parameter, you can control the transparency of the material by ensuring your albedo texture image has an alpha channel. The alpha channel values are mapped to the transparency levels with white being fully opaque, and black being fully transparent. This will have the effect that your material can have areas of varying transparency.
The specular parameter is only visible when using the specular workflow. Specular effects are essentially the direct reflections of light sources in your scene which typically show up as bright highlights or shines on the surface of objects (although specular highlights can be subtle or diffuse too).
Both the specular and metallic workflow will produce specular highlights, so the choice as to which to use is more a matter of workflow and artistic preference. In the specular workflow you have direct control over the brightness and tint colour of specular highlights, wheras in the metallic workflow you control other parameters and the intensity and colour of the specular highlights emerge as an natural result of the other parameter settings.
When working in Specular mode, the RGB colour in the specular parameter controls the strength and colour tint of the specular reflectivity. This includes shines from light sources and reflections from the environment. The smoothness parameter controls the clarity of the specular effect. With a low smoothness value, even strong specular reflections appear blurred and diffuse. With a high smoothness value, specular reflections are crisper and clearer.
The concept of Smoothness applies to both the Specular workflow and the Metallic workflow, and works in very much the same way in both. By default, the smoothness of the material is controlled by a slider. This slider allows you to control the “microsurface detail” or smoothness across a surface.
The “microsurface detail” is not something directly visible in Unity, it is a concept used in the lighting calculations. You can however see the effect of this microsurface detail represented by the amount the light is diffused as it bounces off the object. With a smooth surface, all light rays tends to bounce off at a predictable and consistent angle. Taken to its extreme, a perfectly smooth surface reflects light like a mirror. Less smooth surfaces reflect light off over a wider range of angles (as the light hits the microsurface bumps) and therefore the reflections have less detail and are spread across the surface in a more diffuse way.
A smooth surface has very low microsurface detail, or none at all, and so light bounces off in uniform way creating clear reflections. A rough surface has high peaks and troughs in its microsurface detail, so light bounces off in a wide range of angles creating a diffuse colour with no clear reflections.
At low levels, the reflected light at each point on the surface comes from a wide area, because the microsurface detail is bumpy and scatters light. At high values of smoothness, the light at each point comes from a narrowly focused area, giving a much clearer reflection of the object’s environment.
Similar to the previous parameters mentioned, instead of a single value a texture map can be assigned. This allows greater control - you can vary the strength and colour of the specular light reflections across the surface of the material.
When working in the specular workflow, if you have a specular texture assigned, the smoothness slider is no longer available because the Alpha channel of the specular texture will be used as the smoothness values across the surface of the material. This means you can create materials which include a variety of smoothness levels across the surface (usually designed to match what is shown in the albedo texture).
Smoother surfaces are more reflective and have smaller more tightly focused specular highlights. Less smooth surfaces do not reflect as much, and specular highlights are less noticable and spread wider across the surface. By matching the specular and smoothness maps to the content in your albedo map, you can begin to create very realistic looking textures.
Here an example of a 1000kg weight with a strong specular reflection from a directional light. The specular reflection and smoothness values are defined by a colour and slider, no texture has been assigned - so the specular and smoothness level is constant across the whole surface. This is not always desirable, particularly in the case where your albedo texture maps to a variety of different areas on your model (also known as a texture atlas).
Here a texture map controls the specularity and smoothness. This allows the specularity to vary across the surface of the model. Notice the edges have a higher specular effect than the centre, there are some subtle colour responses to the light, and area inside the lettering no longer has specular highlights. Pictured to the right are the RGB channels controlling the specular colour and strength, and the Alpha channel controlling the smoothness.
When working in the Metallic workflow (as opposed to the Specular workflow), the the reflectivity and light response of the surface are modified by the Metallic level and the Smoothness level. Specular reflections are still generated when using this workflow but they arise naturally depending on the settings you give for the Metallic and Smoothness levels, rather than being explicitly defined.
Metallic mode is not just for materials which are supposed to look metallic! This mode is known as metallic because of the way you have control over how metallic or non-metallic a surface is.
The metallic parameter of a material determines how “metal-like” the surface is. When a surface is more metallic, it reflects the environment more and its albedo colour becomes less visible. At full metallic level, the surface colour is entirely driven by reflections from the environment. When a surface is less metallic, its albedo colour is more clear and any surface reflections are visible on top of the surface colour, rather than obscuring it.
As mentioned above, The smoothness value controls the theoretical “microsurface detail” of the material. This is essentially the same as when working in Specular mode.
By default, with no texture assigned, the Metallic and Smoothness parameters are controlled by a slider each. This is enough for some materials. However if your model’s surface has areas with a mixture of surface types in the albedo texture, you can use a texture map to control how the metallic and smoothness levels vary across the surface of the material.
With a texture assigned to the Metallic parameter, both sliders will disappear. Instead, the Metallic levels for the material are controlled by the values in the Red channel of the texture, and the Smoothness levels for the material are controlled by the Alpha channel of the texture. (This means the Green and Blue channels are ignored). This means you have a single texture which can define areas as being rough or smooth, and metallic or non-metallic, which is very useful when working texture maps that cover many areas of a model with varying requirements - for example a single character texture map often includes multiple surface requirements - leather shoes, cloth clothes, skin for the hands and face and metal buckles.
In the example above, on the left, the case has an albedo map, but no texture for Metallic. This means the whole object has a single metallic and smoothness value, which is not ideal. The leather straps, the metal buckles, the sticker and the handle should all appear to have different surface properties.
On the right, a Metal/Smoothness texture map has been assigned. The buckle now has a high metallic value and responds to light accordingly. The leather straps are shinier than the leather body of the box, however they have a low “Metallic” value, so it appears to be shiny non-metal surface. The black and white map on the far right shows the lighter areas for metal, and mid to low greys for the leather.
Describes relief/bumpiness of surface. Normal maps are a special kind of texture map where the red, green and blue values represent distortions to the otherwise smooth surface of the triangles which make up the mesh of your model. These distortions affect the surface lighting, giving the impression of detailed geometry on the surface of the model without requiring actual geometry to represent the detail.
For example, you might want to show a surface which has grooves and screws or rivets across the surface, like an aircraft hull. One way to do this would be to model these details as geometry, as shown below, however this would generate a very large number of triangles and vertices which is not good for performance.
If we instead represent this detail with a normalmap, the surface geometry can become much simpler, and the detail is represented as a texture which modulates how light reflects off the surface. This is something modern graphics hardware can do extremely fast. Your metal surface can now be a low-poly flat plane, and the rivets will catch the light and appear rounded because of the texture.
In modern game development art pipelines, artists will use their 3D modelling applications to generate normal maps based on very high resolution source models. The normal maps are then mapped onto a lower-resolution game-read version of the model, so that the original high-resolution detail is rendered using the normalmap.
For information about creating, importing and using normalmaps, see this guide.
Heightmapping (or parallax mapping) is a similar concept to normal mapping, however this technique is more complex (and therefore also more performance-expensive). Heightmaps are usually used in conjunction with normalmaps, and often they are used to give extra definition to surfaces where the texture maps are responsible for rendering large bumps and protrusions.
While normal mapping modifies the lighting across the surface of the texture, heightmapping goes a step further and actually shifts the areas of the visible surface texture around, to achieve a kind of surface-level occlusion effect. This means that apparent bumps will have their near side (facing the camera) expanded and exaggerated, and their far side (facing away from the camera) will be reduced and seem to be occluded from view.
This effect, while it can produce a very convincing representation of 3D geometry, is still limited to the surface of an object. This means that while surface bumps will appear to protrude and occlude each other, the “silhouette” of the model will never be modified, because ultimately the effect is drawn onto the surface of the model and does not modify the actual geometry.
A heightmap should be a greyscale image, with white areas representing the high areas of your texture and black representing the low areas. Here’s a typical albedo map and a heightmap to match.
From left to right in the above image: 1. A rocky wall material with albedo assigned, but no normalmap or heightmap. 2. The normal assigned. Lighting is modified on the surface, but rocks do not occlude each other. 3. The final effect with normalmap and heightmap assigned. The rocks appear to protrude out from the surface, and nearer rocks seem to occlude rocks behind them.
Often (but not always) the greyscale image used for a heightmap is also a good image to use for the occlusion map. For information on occlusion maps, see the next section.
The occlusion map is used to provide information about which areas of the model should receive high or low indirect lighting. Indirect lighting comes from ambient lighting and reflections, and so steep concave parts of your model such as a crack or fold would not realistically receive much indirect light.
Occlusion texture maps are normally calculated by 3D applications directly from the 3D model using the modeller or third party software.
An occlusion map is a greyscale image, with white indicating areas that should receive full indirect lighting, and black indicating no indirect lighting. Sometimes this is as simple as a greyscale heightmap, for simple surfaces (such as the knobbly stone wall texture shown in the heightmap example above).
At other times, generating the correct occlusion texture is slightly more complex. For example, if a character in your scene is wearing a hood, the inside edges of the hood should be set to very low indirect lighting, or none at all. In these situations, occlusion maps will be often be produced by artists, using 3D applications to automatically generate an occlusion map based on the model.
Controls colour and intensity of light emitted from the surface. When an emissive material is used in your scene, it appears to be a visible source of light itself. The object will appear “self illuminated”.
Emissive materials are usually used on objects where some part should appear to be lit up from inside, such as the screen of a monitor, the disc brakes of a car braking at high speed, glowing buttons on a control panel, or a monster’s eyes which are visible in the dark.
Simple emissive materials can be defined using a single colour and emission level. If you set the emission level to a value higher than the default zero, the emission colour and strength field will appear:
Objects using these materials will appear to remain bright even when in dark areas in your scene.
As well as simple control over emission using a flat colour and brightness setting, you can assign an emission map to this parameter. As with the other texture map parameters, this gives you much finer control over which areas of your material appear to emit light.
If a texture map is assigned, the full colour values of the texture are used for the emission colour and brightness. The emission value numeric field remains, which you can use as a multiplier to boost or reduce the overall emission level of your material.
As well as the emission colour and brightness, the Emission parameter has a Global Illumination setting, allowing you to specify how the apparent light emitted from this material will affect the contextual lighting of other nearby objects. There are three options
None - The object will appear emissive, but the lighting of nearby objects will not be affected.
Realtime - The emissive light from this material will be added to the realtime global illumination calculations for the scene, so the lighting of nearby objects, even moving objects, will be affected by the emitted light.
Baked - The emissive light from this material will be baked into the static lightmaps for the scene, so other nearby static objects will appear to be lit by this material, but dynamic objects will not be affected.
Detail maps allow you to overlay a second set of textures on top of the main textures listed above. You can apply a second Albedo colour map, and a second Normal map. Typically, these would be mapped on a much smaller scale repeated many times across the object’s surface, compared with the main Albedo and Detail maps.
The reason for this is to allow the material to have sharp detail when viewed up close, while also having a normal level of detail when viewed from further away, without having to use a single extremely high texture map to achieve both goals.
Typical uses for detail textures would be: - Adding skin detail, such as pores and hairs, to a character’s skin - Adding tiny cracks and lichen growth to a brick wall - adding small scratches and scuffs to a large metal container
If you use a single normal map do ALWAYS plug it into the primary channel. The Secondary normal map channel is more expensive than the primary one but has the exact same effect.
The detail mask texture allows you to mask off certain areas of your model to have the detail texture applied. This means you can show the detail texture in certain areas, and hide it in others. In the example of the skin pores above, you might want to create a mask so the pores are not shown on the lips or eyebrows.
One important visual cue of objects in the real world has to do with how they become more reflective at grazing angles (illustrated below). This is called the Fresnel effect.
There are two things to note in this example; firstly, these reflections only appear around the edges of the sphere (that’s when its surface is at a grazing angle), and also that they become more visible and sharper as the smoothness of the material goes up.
In the Standard shader there is no direct control over the Fresnel effect. Instead it is indirectly controlled through the smoothness of the material. Smooth surfaces will present a stronger Fresnel, totally rough surfaces will have no Fresnel.