Up to date
This page is up to date for Godot
If you still find outdated information, please open an issue.
Standard Material 3D and ORM Material 3D¶
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.
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
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.
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
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.
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.
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.
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).
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 transparent grass or tree foliage.
No Depth Test¶
In order for close objects to appear over far away objects, depth testing is performed. Disabling it has the result of objects appearing over (or under) everything else.
Disabling this makes the most sense for drawing indicators in world space, and works very well with the Render Priority property of Material (see the bottom of this page).
Godot has a more or less uniform cost per pixel thanks to depth pre-pass. All lighting calculations are made by running the lighting shader on every pixel.
As these calculations are costly, performance can be brought down considerably in some corner cases such as drawing several layers of transparency (which is common in particle systems). Switching to per-vertex lighting may help in these cases.
Additionally, on low-end or mobile devices, switching to vertex lighting can considerably increase rendering performance.
Keep in mind that when vertex lighting is enabled, only directional lighting can produce shadows (for performance reasons).
However, in some cases you might want to show just the albedo (color) and ignore the rest. To do this you can set the shading mode to unshaded
Specifies the algorithm used by diffuse scattering of light when hitting the object. The default is Burley. Other modes are also available:
Burley: Default mode, the original Disney Principled PBS diffuse algorithm.
Lambert: Is not affected by roughness.
Lambert Wrap: Extends Lambert to cover more than 90 degrees when roughness increases. Works great for hair and simulating cheap subsurface scattering. This implementation is energy conserving.
Oren Nayar: This implementation aims to take microsurfacing into account (via roughness). Works well for clay-like materials and some types of cloth.
Toon: Provides a hard cut for lighting, with smoothing affected by roughness. It is recommended you disable sky contribution from your environment's ambient light settings or disable ambient light in the StandardMaterial3D to achieve a better effect.
Specifies how the specular blob will be rendered. The specular blob represents the shape of a light source reflected in the object.
SchlickGGX: The most common blob used by PBR 3D engines nowadays.
Blinn: Common in previous-generation engines. Not worth using nowadays, but left here for the sake of compatibility.
Phong: Same as above.
Toon: Creates a toon blob, which changes size depending on roughness.
Disabled: Sometimes the blob gets in the way. Begone!
Disable Ambient Light¶
Makes the object not receive any kind of ambient lighting that would otherwise light it.
This setting allows choosing what is done by default to vertex colors that come from your 3D modeling application. By default, they are ignored.
Use as Albedo¶
Choosing this option means vertex color is used as albedo color.
Most 3D modeling software will likely export vertex colors as sRGB, so toggling this option on will help them look correct.
Albedo is the base color for the material, on which all the other settings operate. When set to Unshaded, this is the only color that is visible. In previous versions of Godot, this channel was named Diffuse. The change of name mainly