# Metalness Material Definition

When using objects and materials in interactive applications, such as game engines, the Metalness material definition has become widely accepted. This has the advantage over the classic material definition that the RGB channels of the loaded textures can be used more effectively. It can also be used to simplify material creation.

This type of material definition is based on the consideration that materials can be divided into metallic and non-metallic. The main difference between these groups of materials is the appearance of gloss and reflections. For non-metallic surfaces (e.g., plastic, water, glass or wood), the gloss usually maintains the color of the light source. In addition, the intensity of the gloss changes with the viewing angle on the surface. Areas viewed flatly reflect and shine particularly intensively, while areas viewed frontally show only weak reflections and shine effects (Fresnel effect).

The situation is different for metallic surfaces. There, the reflection and gloss often assume the color of the metal, and the change in reflection and gloss intensities is also less pronounced, depending on the viewing angle.

This metallic property is therefore specified in the Metalness material definition via a numerical value between 0 and 1 or can also be controlled with a grayscale texture. In fact, however, these textures often use only white or black to indicate basic metallic or just non-metallic properties. Using a texture also allows for variations in metallic behavior on a surface, such as rust or peeled paint on metal. Where paint, lacquer or rust lies on a metal, there is no longer a metallic surface.

Figure 1 For metalness materials, a metalness texture fundamentally determines whether the material should be metallic or non-metallic. The evaluation of the color properties and the specularity calculation changes accordingly.

While we are used to the Cinema 4D material system that an increase in specular properties leads to a reduction in diffuse color, this is not so with the Metalness material definition. Depending on the Metalness value, the assigned color is used either for the diffuse coloring of the surface (for small Metalness values) or for the coloring of the metal and reflections (for larger Metalness values).

Another important component is the roughness of the surface. As is also familiar from standard materials in Cinema 4D, greater roughness in non-metallic materials results in more homogeneous shading. As a result, the surface loses contrast and appears more dull. With metallic materials, the roughness leads to a softening of the reflections, making the surface appear rougher.

Other material properties, such as bump mapping (or relief), normal, transparency, glow or displacement can also be used. It should be noted, however, that refractive transparencies cannot currently be realistically displayed in real-time applications. In addition, most applications do not offer support for real-time displacement.

## Metalness Materials in Cinema 4D

If you have textures of a Metalness material, e.g., from another 3D application, they can also be used in Cinema 4D. The easiest way to do this is to render with Redshift. Among other things, the standard material that directly supports the Metalness property is available there. In order to correctly assign the textures to the properties of the Redshift material, you can often use the names of the textures as a guide. As a rule, standard terms are already used there to describe the material property that is to be controlled by the respective texture. These are often these terms:

- Base Color / Albedo / Diffuse: One of these terms often identifies the texture used to describe the visible color of the material. This colored texture should therefore be linked to the Base Color of the Redshift material.
- Metalness: This is usually a grayscale or black and white texture used to describe the metallic property. The lighter the texture, the more metallic the surface looks. This texture is directly linked to the Base Metalness property.
- Roughness: This grayscale texture describes the quality of the surface. The lighter the texture, the rougher the surface will appear later. This affects the sharpness of the visible reflections and highlights on the surface. You link this texture with Reflection Roughness
- Normal: This color texture describes the direction of the surface normals and thus influences the shading of the surface. This texture is usually present in the tangential axis system. Use a Normal Map Node to interpret this texture, then route the result to the Geometry Bump Map input on Redshift's default material.
- AO: This grayscale texture describes the Ambient Occlusion (AO) effect, so it is often used to darken ridges or generally enhance the shading contrast on the surface. In the Redshift Standard material, for example, this texture could be multiplied by the linked surface color used as the Base Color.
- Height: This grayscale texture describes the deformation of the surface, e.g., to add fine structures during rendering that are missing from the geometry. This effect corresponds to displacement and is therefore connected directly to the displacement input of the output Node via a displacement node. You could also use this texture as a bump map if you lack a suitable standard texture.
- Emission: This texture describes the color and intensity of the glow on the surface. You can connect this texture directly to the Emission Color. However, also remember to increase the Emission Weight accordingly so that the effect is also visible.
- Opacity: This texture describes the general opacity of the material. Black areas of the texture are thus cut out and appear completely transparent. You can link this texture to the Geometry Opacity property of the Redshift material.

Figure 2 Sample textures for a Metalness material. A characteristic feature is the Metalness texture, which is used to identify metallic and non-metallic areas of a material. The evaluation of the Base Color texture for the coloring of the surface and the reflections changes accordingly.
Figure 3 Using the textures of a Metalness material description with a Redshift Standard material.
Figure 4 Rendering of the Metalness material defined above using Redshift. The Metalness texture clearly separates the shiny metallic areas and the rusty parts here.

## Export Metalness materials

Exporting Cinema 4D materials, for example, to use textured objects directly in interactive applications, requires some preparation for the Standard/Physical Renderer materials. There are no direct material channels or parameters there, e.g., for the Metalness property. However, a solution exists, which is described below (the standard Redshift material already uses the Metalness material system by itself, here e.g. glTF can export directly).

Create a new standard material and open the Reflectivity channel there. Delete all existing layers there and have a new Beckmann layer created. The existing textures of a Metalness material description must now be loaded into the following material channels and properties:

- Base Color / Albedo / Diffuse: Load this texture into the Color channel of the material. Alternatively, the texture can be loaded as a color into the reflectivity channel. If no texture is to be used, the desired color can also be set directly via the color field.
- Metalness: Load this texture for controlling the Specularity in the Beckmann reflectivity layer. If the material is non-metallic throughout, there is no need to use a Metalness texture (equivalent to a black texture).
- Roughness: Load this texture as Roughness in the Beckmann reflectivity layer. If no variation is to be created by a texture, the roughness numerical value can also be set directly to match.
- Normal: Load this texture into the Normal material channel(Method: Tangent).
- AO: Load this texture into the Diffusion channel of the material
- Emission: Load this texture into the material's Glow channel . If you want the entire material to glow in one color, you can also omit the texture and define the desired color directly.
- Opacity: This texture should be loaded into the Alpha channel of the material. If you just want to give the material some transparency in general, you can alternatively use a gray value for the color in the transparency channel for this purpose. The brighter this gray level is, the more transparent the object is displayed.

The displacement, i.e. the height texture, is usually not evaluated by real-time applications. This is therefore not exported by Cinema 4D.
Also note that the Multiply blend mode is also supported for the loaded textures. The blend strength and the color then also play a role for the export.
If you use the Attenuation Additive in the reflectivity layer, the color of the material is preserved in the Viewports, which makes it easier to control the material. For export this setting is not taken into account.

Figure 5 The texture for the Base Color can simply be loaded into the Color channel. If you still want to change the colors of this texture, you can also use a normal color and let it mix with the texture via the Multiply blend mode. This is demonstrated in the right half of the figure.
Figure 6 The Metalness texture is loaded to control the specularity, which you set to 100%. The Roughness texture controls the roughness, which is also defined as 100%. In order for this material description to keep the surface color visible in the editor, use the Additive attenuation. This setting does not affect the export of the material and only improves the material display in Cinema 4D.
Figure 7 An existing Normal texture is loaded into the Normal material channel as usual.
Figure 8 View of the exported objects with the Rust Metalness material in a glTF viewer. There, the desired lighting mood can often still be adjusted by loaded HDR images.

## Remarks and limitations

- Since the Metalness texture in this material setup controls the specularity, the material will look different in Cinema 4D than it does in the external application. This also has to do with the different evaluation of surface color for metallic and non-metallic materials. To achieve comparable results, you can first assemble Metalness materials with Redshift and test render them in Cinema 4D. Then load the textures used into the properties of a Cinema 4D Standard material described above, and then have it exported.
- At each material, only one plane in the reflectivity channel is evaluated for export.
- The resolution of the textures for Specularity and Roughness must be identical, since these grayscale textures are internally combined into one RGB texture. The same applies to the color and alpha textures(Base Color and Opacity).
- Node materials are currently not supported for Metalness export.
- Restriction of materials to polygon selections is supported by exporting a single object with a single material for each polygon selection.
- Multiple materials on the same polygons are not supported.
- When exporting textures, the Interpolation setting in the program settings is used for texture interpolation.
- Shaders must be converted to bitmap textures before export. To do this, you can use the Material Bake Tag.