Up to date

This page is up to date for Godot 4.0. If you still find outdated information, please open an issue.

Standard Material 3D and ORM Material 3D

Introduction

StandardMaterial3D and ORMMaterial3D (Occlusion, Roughness, Metallic) are default 3D materials that aim to provide most of the features artists look for in a material, without the need for writing shader code. However, they can be converted to shader code if additional functionality is needed.

This tutorial explains the parameters present in both materials.

There are 4 ways to add these materials to an object. A material can be added in the Material property of the mesh. It can be added in the Material property of the node using the mesh (such as a MeshInstance3D node), the Material Override property of the node using the mesh, and the Material Overlay.

../../_images/add_material.webp

If you add a material to the mesh itself, every time that mesh is used it will have that material. If you add a material to the node using the mesh, the material will only be used by that node, it will also override the material property of the mesh. If a material is added in the Material Override property of the node, it will only be used by that node. It will also override the regular material property of the node and the material property of the mesh.

The Material Overlay property will render a material over the current one being used by the mesh. As an example, this can be used to put a transparent shield effect on a mesh.

BaseMaterial 3D settings

StandardMaterial3D has many settings that determine the look of a material. All of these are under the BaseMaterial3D category

../../_images/spatial_material1.png

ORM materials are almost exactly the same with one difference. Instead of separate settings and textures for occlusion, roughness, and metallic, there is a single ORM texture. The different color channels of that texture are used for each parameter. Programs such as Substance Painter and Armor Paint will give you the option to export in this format, for these two programs it's with the export preset for unreal engine, which also uses ORM textures.

Transparency

In Godot, materials are not transparent unless specifically configured to be. The main reason behind this is that transparent materials are rendered using a different technique (sorted from back to front and rendered in order).

This technique is less efficient (many state changes happen) and makes the materials unusable with many mid- and post-processing effects (such as SSAO, SSR, etc.) that require perfectly opaque geometry.

For this reason, materials in Godot are assumed opaque unless specified otherwise. The main settings that enable transparency are:

  • Transparency (this one)

  • Blend mode set to other than "Mix"

  • Enabling distance or proximity fade

When transparency other than 0 or 1 is not needed, it's possible to set a threshold to prevent the object from rendering semi-transparent pixels using the alpha scissor option.

../../_images/spatial_material12.png

This renders the object via the opaque pipeline when opaque pre-pass is on, which is faster and allows it to use mid- and post-process effects such as SSAO, SSR, etc.

Blend Mode

Controls the blend mode for the material. Keep in mind that any mode other than Mix forces the object to go through the transparent pipeline.

  • Mix: Default blend mode, alpha controls how much the object is visible.

  • Add: The final color of the object is added to the color of the screen, nice for flares or some fire-like effects.

  • Sub: The final color of the object is subtracted from the color of the screen.

  • Mul: The final color of the object is multiplied with the color of the screen.

../../_images/spatial_material8.png

Cull Mode

Determines which side of the object is not drawn when backfaces are rendered:

  • Back: The back of the object is culled when not visible (default).

  • Front: The front of the object is culled when not visible.

  • Disabled: Used for objects that are double-sided (no culling is performed).

Note

By default, Blender has backface culling disabled on materials and will export materials to match how they render in Blender. This means that materials in Godot will have their cull mode set to Disabled. This can decrease performance since backfaces will be rendered, even when they are being culled by other faces. To resolve this, enable Backface Culling in Blender's Materials tab, then export the scene to glTF again.

Depth Draw Mode

Specifies when depth rendering must take place.

  • Opaque Only (default): Depth is only drawn for opaque objects.

  • Always: Depth draw is drawn for both opaque and transparent objects.

  • Never: No depth draw takes place (do not confuse this with the No Depth Test option below).

  • Depth Pre-Pass: For transparent objects, an opaque pass is made first with the opaque parts, then transparency is drawn above. Use this option with transp