Up to date
This page is up to date for Godot 4.0
.
If you still find outdated information, please open an issue.
BaseMaterial3D¶
Inherits: Material < Resource < RefCounted < Object
Inherited By: ORMMaterial3D, StandardMaterial3D
Default 3D rendering material.
Description¶
This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details.
Tutorials¶
Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods¶
get_feature ( Feature feature ) const |
|
get_texture ( TextureParam param ) const |
|
void |
set_feature ( Feature feature, bool enable ) |
void |
|
void |
set_texture ( TextureParam param, Texture2D texture ) |
Enumerations¶
enum TextureParam:
TextureParam TEXTURE_ALBEDO = 0
Texture specifying per-pixel color.
TextureParam TEXTURE_METALLIC = 1
Texture specifying per-pixel metallic value.
TextureParam TEXTURE_ROUGHNESS = 2
Texture specifying per-pixel roughness value.
TextureParam TEXTURE_EMISSION = 3
Texture specifying per-pixel emission color.
TextureParam TEXTURE_NORMAL = 4
Texture specifying per-pixel normal vector.
TextureParam TEXTURE_RIM = 5
Texture specifying per-pixel rim value.
TextureParam TEXTURE_CLEARCOAT = 6
Texture specifying per-pixel clearcoat value.
TextureParam TEXTURE_FLOWMAP = 7
Texture specifying per-pixel flowmap direction for use with anisotropy.
TextureParam TEXTURE_AMBIENT_OCCLUSION = 8
Texture specifying per-pixel ambient occlusion value.
TextureParam TEXTURE_HEIGHTMAP = 9
Texture specifying per-pixel height.
TextureParam TEXTURE_SUBSURFACE_SCATTERING = 10
Texture specifying per-pixel subsurface scattering.
TextureParam TEXTURE_SUBSURFACE_TRANSMITTANCE = 11
Texture specifying per-pixel transmittance for subsurface scattering.
TextureParam TEXTURE_BACKLIGHT = 12
Texture specifying per-pixel backlight color.
TextureParam TEXTURE_REFRACTION = 13
Texture specifying per-pixel refraction strength.
TextureParam TEXTURE_DETAIL_MASK = 14
Texture specifying per-pixel detail mask blending value.
TextureParam TEXTURE_DETAIL_ALBEDO = 15
Texture specifying per-pixel detail color.
TextureParam TEXTURE_DETAIL_NORMAL = 16
Texture specifying per-pixel detail normal.
TextureParam TEXTURE_ORM = 17
Texture holding ambient occlusion, roughness, and metallic.
TextureParam TEXTURE_MAX = 18
Represents the size of the TextureParam enum.
enum TextureFilter:
TextureFilter TEXTURE_FILTER_NEAREST = 0
The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
TextureFilter TEXTURE_FILTER_LINEAR = 1
The texture filter blends between the nearest