Material System Overview

Materials contain data that control how model surfaces appear in a 3D environment. All materials have a material type, which classifies materials that share the same properties such as hard surfaces, cloth, or skin. Materials inherit properties either directly from the material type, or from other materials.

Materials and material types are stored as data items in JSON files. The Atom Material Builder converts the data files into material assets. The material assets are then consumed by the application and applied to a mesh’s surface.

Physically Based Rendering in Atom

Physically based rendering (PBR) is a rendering technique that simulates realistic interaction between materials and light. Atom supports PBR and features PBR material types such as StandardPBR, EnhancedPBR, and other variations. These follow industry standard workflows using metallic and roughness properties. Atom’s material system is also capable of rendering non-photo-realistic techniques and special effects through alternate material types. We provide built-in material types focused on PBR rendering, but users can author their own material types to suit their needs.

A full list of material types in Atom is listed in Material Types in Atom .

For more information on PBR, see Physically-based Rendering (PBR) .

Materials

A material is a data item that references a material type and defines the material’s property values. The material must reference a material type, which defines how the material works and what properties are available. Alternatively, a material might reference another material and inherit its property values. The material inheritance tree can go as deep as needed.

Material files (*.material) are in JSON format. They can be edited using the Material Editor or authored directly. The file is in a simple JSON format and can be authored or machine-generated by scripting outside the Material Editor.

For more information, see Material File Specification .

Material File Example

In the following example, the material uses the StandardPBR material type and contains the properties baseColor, roughness, and normal.

{
    "materialType": "StandardPBR.materialtype",
    "properties": {
        "baseColor": {
            "textureMap": "Textures\\Default\\default_basecolor.tif"
        },
        "roughness": {
            "textureMap": "Textures\\Default\\default_roughness.tif"
        },
        "normal": {
            "factor": 0.8,
            "textureMap": "Textures\\Default\\default_normal.tif"
        }
    }
}
Note:
The textures in the sample above can be found in Gems/Atom/Feature/Common/Assets/Textures/Default.

Material Types

A material type is a data item that includes everything that’s needed to describe how to render a mesh:

  • A set of material property definitions
  • Links to shaders
  • Scripts that describe how to consume the material properties
  • Metadata for the Material Editor to use when displaying material properties

Material type files (*.materialtype) are in JSON format and can be authored directly. This will link together several other files as well, to form a complete material type definition. These additional files include .shader, .azsl, and .lua files.

For more information, see Material Type File Specification .

Material Types in Atom

Atom comes built with common material types that you can create materials from. To suit individual needs, you can also create and configure new material types by defining properties, shaders, and functors.

The following material types are included in Atom:

  • StandardPBR
    A full-featured PBR material type, but adopts certain feature limitations in order to improve performance. It is meant to provide as much functionality as possible with a limited number of render targets.

    This file is located in Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR.materialtype.

  • EnhancedPBR
    An enhanced version of StandardPBR that includes additional features, but comes at a higher performance cost. It supports more advanced features that require additional render targets (g-buffers).

    This file is located in Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype.

  • MinimalPBR
    A simple PBR material type with three common properties: base color, metallic factor, and roughness factor. This material type is considered the “hello world” of PBR materials and is provided as an example. It is a good place to start for creating custom material types.

    This file is located in Gems/Atom/TestData/TestData/Materials/Types/MinimalPBR.materialtype.

  • AutoBrick
    A procedural brick material type that includes settings for color, ambient occlusion, brick (width, height, offset), and grout line (width, depth). This material type is an example of a completely custom material type, expanding from the MinimalPBR material type.

    This file is located in Gems/Atom/TestData/TestData/Materials/Types/AutoBrick.materialtype.

Material and Material Type Assets

Material and material type files produce Material Assets and Material Type Assets in the cache, respectively.

A material type file (*.materialtype) produces a Material Type Asset (*.azmaterialtype) in the cache. It contains property layout information, a list of shaders to use, and possibly functors for special processing.

A material file (*.material) produces a Material Asset (*.azmaterial) in the cache. Every Material Asset references a single Material Type Asset. It contains the inherited tree of material property values and compresses it into a single list. Material Assets can be referenced by Model Assets and/or assigned to a model using a Material Component in the Open 3D Engine (O3DE). Material Assets can create any number of material instances at runtime for the renderer to use. You can change the property values of a material instance without impacting other instances of the same material. Unlike a Material Asset, a material instance only exists in memory and not on disk.


Copyright © 2022 Open 3D Engine Contributors

Documentation Distributed under CC BY 4.0.
For our trademark, privacy and antitrust policies, code of conduct, and terms of use, please click the applicable link below or see https://www.lfprojects.org.


The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Policy page.