BaseMaterial3D

Hereda: Material < Resource < RefCounted < Object

Heredado por: ORMMaterial3D, StandardMaterial3D

Clase base abstracta para definir las propiedades de renderizado 3D de mallas.

Descripción

This class serves as 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.

Tutoriales

Propiedades

Color

albedo_color

Color(1, 1, 1, 1)

Texture2D

albedo_texture

bool

albedo_texture_force_srgb

false

bool

albedo_texture_msdf

false

float

alpha_antialiasing_edge

AlphaAntiAliasing

alpha_antialiasing_mode

float

alpha_hash_scale

float

alpha_scissor_threshold

float

anisotropy

0.0

bool

anisotropy_enabled

false

Texture2D

anisotropy_flowmap

bool

ao_enabled

false

float

ao_light_affect

0.0

bool

ao_on_uv2

false

Texture2D

ao_texture

TextureChannel

ao_texture_channel

0

Color

backlight

Color(0, 0, 0, 1)

bool

backlight_enabled

false

Texture2D

backlight_texture

bool

bent_normal_enabled

false

Texture2D

bent_normal_texture

bool

billboard_keep_scale

false

BillboardMode

billboard_mode

0

BlendMode

blend_mode

0

float

clearcoat

1.0

bool

clearcoat_enabled

false

float

clearcoat_roughness

0.5

Texture2D

clearcoat_texture

CullMode

cull_mode

0

DepthDrawMode

depth_draw_mode

0

DepthTest

depth_test

0

Texture2D

detail_albedo

BlendMode

detail_blend_mode

0

bool

detail_enabled

false

Texture2D

detail_mask

Texture2D

detail_normal

DetailUV

detail_uv_layer

0

DiffuseMode

diffuse_mode

0

bool

disable_ambient_light

false

bool

disable_fog

false

bool

disable_receive_shadows

false

bool

disable_specular_occlusion

false

float

distance_fade_max_distance

10.0

float

distance_fade_min_distance

0.0

DistanceFadeMode

distance_fade_mode

0

Color

emission

Color(0, 0, 0, 1)

bool

emission_enabled

false

float

emission_energy_multiplier

1.0

float

emission_intensity

bool

emission_on_uv2

false

EmissionOperator

emission_operator

0

Texture2D

emission_texture

bool

fixed_size

false

float

fov_override

75.0

bool

grow

false

float

grow_amount

0.0

bool

heightmap_deep_parallax

false

bool

heightmap_enabled

false

bool

heightmap_flip_binormal

false

bool

heightmap_flip_tangent

false

bool

heightmap_flip_texture

false

int

heightmap_max_layers

int

heightmap_min_layers

float

heightmap_scale

5.0

Texture2D

heightmap_texture

float

metallic

0.0

float

metallic_specular

0.5

Texture2D

metallic_texture

TextureChannel

metallic_texture_channel

0

float

msdf_outline_size

0.0

float

msdf_pixel_range

4.0

bool

no_depth_test

false

bool

normal_enabled

false

float

normal_scale

1.0

Texture2D

normal_texture

Texture2D

orm_texture

int

particles_anim_h_frames

bool

particles_anim_loop

int

particles_anim_v_frames

float

point_size

1.0

float

proximity_fade_distance

1.0

bool

proximity_fade_enabled

false

bool

refraction_enabled

false

float

refraction_scale

0.05

Texture2D

refraction_texture

TextureChannel

refraction_texture_channel

0

float

rim

1.0

bool

rim_enabled

false

Texture2D

rim_texture

float

rim_tint

0.5

float

roughness

1.0

Texture2D

roughness_texture

TextureChannel

roughness_texture_channel

0

ShadingMode

shading_mode

1

bool

shadow_to_opacity

false

SpecularMode

specular_mode

0

Color

stencil_color

Color(0, 0, 0, 1)

StencilCompare

stencil_compare

0

int

stencil_flags

0

StencilMode

stencil_mode

0

float

stencil_outline_thickness

0.01

int

stencil_reference

1

bool

subsurf_scatter_enabled

false

bool

subsurf_scatter_skin_mode

false

float

subsurf_scatter_strength

0.0

Texture2D

subsurf_scatter_texture

float

subsurf_scatter_transmittance_boost

0.0

Color

subsurf_scatter_transmittance_color

Color(1, 1, 1, 1)

float

subsurf_scatter_transmittance_depth

0.1

bool

subsurf_scatter_transmittance_enabled

false

Texture2D

subsurf_scatter_transmittance_texture

TextureFilter

texture_filter

3

bool

texture_repeat

true

Transparency

transparency

0

bool

use_fov_override

false

bool

use_particle_trails

false

bool

use_point_size

false

bool

use_z_clip_scale

false

Vector3

uv1_offset

Vector3(0, 0, 0)

Vector3

uv1_scale

Vector3(1, 1, 1)

bool

uv1_triplanar

false

float

uv1_triplanar_sharpness

1.0

bool

uv1_world_triplanar

false

Vector3

uv2_offset

Vector3(0, 0, 0)

Vector3

uv2_scale

Vector3(1, 1, 1)

bool

uv2_triplanar

false

float

uv2_triplanar_sharpness

1.0

bool

uv2_world_triplanar

false

bool

vertex_color_is_srgb

false

bool

vertex_color_use_as_albedo

false

float

z_clip_scale

1.0

Métodos

bool

get_feature(feature: Feature) const

bool

get_flag(flag: Flags) const

Texture2D

get_texture(param: TextureParam) const

void

set_feature(feature: Feature, enable: bool)

void

set_flag(flag: Flags, enable: bool)

void

set_texture(param: TextureParam, texture: Texture2D)


Enumeraciones

enum TextureParam: 🔗

TextureParam TEXTURE_ALBEDO = 0

Textura que especifica el color por píxel.

TextureParam TEXTURE_METALLIC = 1

Textura que especifica el valor metálico por píxel.

TextureParam TEXTURE_ROUGHNESS = 2

Textura que especifica el valor de rugosidad por píxel.

TextureParam TEXTURE_EMISSION = 3

Textura que especifica el color de emisión por píxel.

TextureParam TEXTURE_NORMAL = 4

Textura que especifica el vector normal por píxel.

TextureParam TEXTURE_BENT_NORMAL = 18

Texture specifying per-pixel bent normal vector.

TextureParam TEXTURE_RIM = 5

Textura que especifica el valor del borde por píxel.

TextureParam TEXTURE_CLEARCOAT = 6

Textura que especifica el valor del barniz por píxel.

TextureParam TEXTURE_FLOWMAP = 7

Textura que especifica la dirección del mapa de flujo por píxel para su uso con anisotropy.

TextureParam TEXTURE_AMBIENT_OCCLUSION = 8

Textura que especifica el valor de oclusión ambiental por píxel.

TextureParam TEXTURE_HEIGHTMAP = 9

Textura que especifica la altura por píxel.

TextureParam TEXTURE_SUBSURFACE_SCATTERING = 10

Textura que especifica la subsurface scattering por pixel.

TextureParam TEXTURE_SUBSURFACE_TRANSMITTANCE = 11

Texture specifying per-pixel transmittance for subsurface scattering.

TextureParam TEXTURE_BACKLIGHT = 12

Textura que especifica el color de luz de fondo por píxel.

TextureParam TEXTURE_REFRACTION = 13

Textura que especifica la fuerza de refracción por píxel.

TextureParam TEXTURE_DETAIL_MASK = 14

Textura que especifica el valor de mezcla de la máscara de detalles por píxel.

TextureParam TEXTURE_DETAIL_ALBEDO = 15

Textura que especifica el color de detalle por píxel.

TextureParam TEXTURE_DETAIL_NORMAL = 16

La textura que especifica el detalle de la normal por píxel.

TextureParam TEXTURE_ORM = 17

Texture holding ambient occlusion, roughness, and metallic.

TextureParam TEXTURE_MAX = 19

Representa el tamaño del enum TextureParam.


enum TextureFilter: 🔗

TextureFilter TEXTURE_FILTER_NEAREST = 0

The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).

TextureFilter TEXTURE_FILTER_LINEAR = 1

The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).

TextureFilter TEXTURE_FILTER_NEAREST_WITH_MIPMAPS = 2

The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true). This makes the texture look pixelated from up close, and smooth from a distance.

TextureFilter TEXTURE_FILTER_LINEAR_WITH_MIPMAPS = 3

The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true). This makes the texture look smooth from up close, and smooth from a distance.

TextureFilter TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC = 4

The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.

TextureFilter TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC = 5

The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter is true) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level.

TextureFilter TEXTURE_FILTER_MAX = 6

Representa el tamaño del enum TextureFilter.


enum DetailUV: 🔗

DetailUV DETAIL_UV_1 = 0

Usa UV con la textura de detalle.

DetailUV DETAIL_UV_2 = 1

Usa UV2 con la textura de detalle.


enum Transparency: 🔗

Transparency TRANSPARENCY_DISABLED = 0

El material no usará transparencia. Es el más rápido de renderizar.

Transparency TRANSPARENCY_ALPHA = 1

The material will use the texture's alpha values for transparency. This is the slowest to render, and disables shadow casting.

Transparency TRANSPARENCY_ALPHA_SCISSOR = 2

El material cortará todos los valores por debajo de un umbral, el resto permanecerá opaco. Las porciones opacas se renderizarán en el pre-paso de profundidad. Esto es más rápido de renderizar que la mezcla alfa, pero más lento que el renderizado opaco. Esto también admite la proyección de sombras.

Transparency TRANSPARENCY_ALPHA_HASH = 3

The material will cut off all values below a spatially-deterministic threshold, the rest will remain opaque. This is faster to render than alpha blending, but slower than opaque rendering. This also supports casting shadows. Alpha hashing is suited for hair rendering.

Transparency TRANSPARENCY_ALPHA_DEPTH_PRE_PASS = 4

El material utilizará el valor alfa de la textura para la transparencia, pero descartará los fragmentos con un alfa inferior a 0,99 durante el pre-paso de profundidad y los fragmentos con un alfa inferior a 0,1 durante el paso de sombra. Esto también admite la proyección de sombras.

Transparency TRANSPARENCY_MAX = 5

Representa el tamaño del enum Transparency.


enum ShadingMode: 🔗

ShadingMode SHADING_MODE_UNSHADED = 0

El objeto no recibirá sombras. Es la forma más rápida de renderizar, pero desactiva todas las interacciones con las luces.

ShadingMode SHADING_MODE_PER_PIXEL = 1

El objeto se sombreará por píxel. Útil para efectos de sombreado realistas.

ShadingMode SHADING_MODE_PER_VERTEX = 2

El objeto se sombreará por vértice. Útil cuando se quieren shaders más económicos y no importa la calidad visual.

ShadingMode SHADING_MODE_MAX = 3

Representa el tamaño del enum ShadingMode.


enum Feature: 🔗

Feature FEATURE_EMISSION = 0

Constante para establecer emission_enabled.

Feature FEATURE_NORMAL_MAPPING = 1

Constante para establecer normal_enabled.

Feature FEATURE_RIM = 2

Constante para establecer rim_enabled.

Feature FEATURE_CLEARCOAT = 3

Constante para establecer clearcoat_enabled.

Feature FEATURE_ANISOTROPY = 4

Constante para establecer anisotropy_enabled.

Feature FEATURE_AMBIENT_OCCLUSION = 5

Constante para establecer ao_enabled.

Feature FEATURE_HEIGHT_MAPPING = 6

Constante para establecer heightmap_enabled.

Feature FEATURE_SUBSURFACE_SCATTERING = 7

Constante para establecer subsurf_scatter_enabled.

Feature FEATURE_SUBSURFACE_TRANSMITTANCE = 8

Constante para establecer subsurf_scatter_transmittance_enabled.

Feature FEATURE_BACKLIGHT = 9

Constante para establecer backlight_enabled.

Feature FEATURE_REFRACTION = 10

Constante para establecer refraction_enabled.

Feature FEATURE_DETAIL = 11

Constante para establecer detail_enabled.

Feature FEATURE_BENT_NORMAL_MAPPING = 12

Constante para establecer bent_normal_enabled.

Feature FEATURE_MAX = 13

Representa el tamaño del enum Feature.


enum BlendMode: 🔗

BlendMode BLEND_MODE_MIX = 0

Modo de mezcla por defecto. El color del objeto se mezcla sobre el fondo en base al valor alfa del objeto.

BlendMode BLEND_MODE_ADD = 1

El color del objeto se añade al fondo.

BlendMode BLEND_MODE_SUB = 2

El color del objeto se resta del fondo.

BlendMode BLEND_MODE_MUL = 3

El color del objeto se multiplica por el fondo.

BlendMode BLEND_MODE_PREMULT_ALPHA = 4

The color of the object is added to the background and the alpha channel is used to mask out the background. This is effectively a hybrid of the blend mix and add modes, useful for effects like fire where you want the flame to add but the smoke to mix. By default, this works with unshaded materials using premultiplied textures. For shaded materials, use the PREMUL_ALPHA_FACTOR built-in so that lighting can be modulated as well.


enum AlphaAntiAliasing: 🔗

AlphaAntiAliasing ALPHA_ANTIALIASING_OFF = 0

Disables Alpha AntiAliasing for the material.

AlphaAntiAliasing ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE = 1

Enables AlphaToCoverage. Alpha values in the material are passed to the AntiAliasing sample mask.

AlphaAntiAliasing ALPHA_ANTIALIASING_ALPHA_TO_COVERAGE_AND_TO_ONE = 2

Enables AlphaToCoverage and forces all non-zero alpha values to 1. Alpha values in the material are passed to the AntiAliasing sample mask.


enum DepthDrawMode: 🔗

DepthDrawMode DEPTH_DRAW_OPAQUE_ONLY = 0

Default depth draw mode. Depth is drawn only for opaque objects during the opaque prepass (if any) and during the opaque pass.

DepthDrawMode DEPTH_DRAW_ALWAYS = 1

Objects will write to depth during the opaque and the transparent passes. Transparent objects that are close to the camera may obscure other transparent objects behind them.

Note: This does not influence whether transparent objects are included in the depth prepass or not. For that, see Transparency.

DepthDrawMode DEPTH_DRAW_DISABLED = 2

Objects will not write their depth to the depth buffer, even during the depth prepass (if enabled).


enum DepthTest: 🔗

DepthTest DEPTH_TEST_DEFAULT = 0

Depth test will discard the pixel if it is behind other pixels.

DepthTest DEPTH_TEST_INVERTED = 1

Depth test will discard the pixel if it is in front of other pixels. Useful for stencil effects.


enum CullMode: 🔗

CullMode CULL_BACK = 0

Default cull mode. The back of the object is culled when not visible. Back face triangles will be culled when facing the camera. This results in only the front side of triangles being drawn. For closed-surface meshes, this means that only the exterior of the mesh will be visible.

CullMode CULL_FRONT = 1

Los triángulos frontales se descartarán al mirar hacia la cámara. Esto significa que solo se dibujará la parte posterior de los triángulos. En mallas de superficie cerrada, se dibujará el interior de la malla en lugar del exterior.

CullMode CULL_DISABLED = 2

No face culling is performed; both the front face and back face will be visible.


enum Flags: 🔗

Flags FLAG_DISABLE_DEPTH_TEST = 0

Disables the depth test, so this object is drawn on top of all others drawn before it. This puts the object in the transparent draw pass where it is sorted based on distance to camera. Objects drawn after it in the draw order may cover it. This also disables writing to depth.

Flags FLAG_ALBEDO_FROM_VERTEX_COLOR = 1

Ponga ALBEDO en el color por vértice especificado en la malla.

Flags FLAG_SRGB_VERTEX_COLOR = 2

Vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. See also vertex_color_is_srgb.

Note: Only effective when using the Forward+ and Mobile rendering methods.

Flags FLAG_USE_POINT_SIZE = 3

Utiliza el tamaño de los puntos para alterar el tamaño de los puntos primitivos. También cambia la búsqueda de la textura del albedo para usar POINT_COORD en lugar de UV.

Flags FLAG_FIXED_SIZE = 4

El objeto se escala según la profundidad para que siempre aparezca del mismo tamaño en la pantalla.

Flags FLAG_BILLBOARD_KEEP_SCALE = 5

Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when billboard_mode is BILLBOARD_ENABLED.

Flags FLAG_UV1_USE_TRIPLANAR = 6

Use la búsqueda de texturas triplanares para todas las búsquedas de texturas que normalmente usarían UV.

Flags FLAG_UV2_USE_TRIPLANAR = 7

Use la búsqueda de texturas triplanares para todas las búsquedas de texturas que normalmente usarían UV2.

Flags FLAG_UV1_USE_WORLD_TRIPLANAR = 8

Use la búsqueda de texturas triplanares para todas las búsquedas de texturas que normalmente usarían UV.

Flags FLAG_UV2_USE_WORLD_TRIPLANAR = 9

Use la búsqueda de texturas triplanares para todas las búsquedas de texturas que normalmente usarían UV2.

Flags FLAG_AO_ON_UV2 = 10

Use las coordenadas UV2 para mirar hacia arriba desde el ao_texture.

Flags FLAG_EMISSION_ON_UV2 = 11

Utiliza las coordenadas UV2 para mirar hacia arriba desde la emission_texture.

Flags FLAG_ALBEDO_TEXTURE_FORCE_SRGB = 12

Forces the shader to convert albedo from sRGB space to linear space. See also albedo_texture_force_srgb.

Flags FLAG_DONT_RECEIVE_SHADOWS = 13

Desactiva la recepción de sombras de otros objetos.

Flags FLAG_DISABLE_AMBIENT_LIGHT = 14

Desactiva la recepción de luz ambiental.

Flags FLAG_USE_SHADOW_TO_OPACITY = 15

Habilita la característica de opacidad de la sombra.

Flags FLAG_USE_TEXTURE_REPEAT = 16

Enables the texture to repeat when UV coordinates are outside the 0-1 range. If using one of the linear filtering modes, this can result in artifacts at the edges of a texture when the sampler filters across the edges of the texture.

Flags FLAG_INVERT_HEIGHTMAP = 17

Invert values read from a depth texture to convert them to height values (heightmap).

Flags FLAG_SUBSURFACE_MODE_SKIN = 18

Enables the skin mode for subsurface scattering which is used to improve the look of subsurface scattering when used for human skin.

Flags FLAG_PARTICLE_TRAILS_MODE = 19

Enables parts of the shader required for GPUParticles3D trails to function. This also requires using a mesh with appropriate skinning, such as RibbonTrailMesh or TubeTrailMesh. Enabling this feature outside of materials used in GPUParticles3D meshes will break material rendering.

Flags FLAG_ALBEDO_TEXTURE_MSDF = 20

Enables multichannel signed distance field rendering shader.

Flags FLAG_DISABLE_FOG = 21

Disables receiving depth-based or volumetric fog.

Flags FLAG_DISABLE_SPECULAR_OCCLUSION = 22

Desactiva la oclusión especular.

Flags FLAG_USE_Z_CLIP_SCALE = 23

Habilita el uso de z_clip_scale.

Flags FLAG_USE_FOV_OVERRIDE = 24

Habilita el uso de fov_override.

Flags FLAG_MAX = 25

Representa el tamaño del enum Flags.


enum DiffuseMode: 🔗

DiffuseMode DIFFUSE_BURLEY = 0

Algoritmo de dispersión difusa por defecto.

DiffuseMode DIFFUSE_LAMBERT = 1

La dispersión difusa ignora las rugosidades.

DiffuseMode DIFFUSE_LAMBERT_WRAP = 2

Extiende a Lambert para cubrir más de 90 grados cuando la rugosidad aumenta.

DiffuseMode DIFFUSE_TOON = 3

Utiliza un corte duro para la iluminación, con el alisado afectado por la aspereza.


enum SpecularMode: 🔗

SpecularMode SPECULAR_SCHLICK_GGX = 0

Default specular blob.

Note: Forward+ uses multiscattering for more accurate reflections, although the impact of multiscattering is more noticeable on rough metallic surfaces than on smooth, non-metallic surfaces.

Note: Mobile and Compatibility don't perform multiscattering for performance reasons. Instead, they perform single scattering, which means rough metallic surfaces may look slightly darker than intended.

SpecularMode SPECULAR_TOON = 1

La mancha de un dibujo que cambia de tamaño en función de la rugosidad.

SpecularMode SPECULAR_DISABLED = 2

No specular blob. This is slightly faster to render than other specular modes.


enum BillboardMode: 🔗

BillboardMode BILLBOARD_DISABLED = 0

Modo Billboard esta desactivado.

BillboardMode BILLBOARD_ENABLED = 1

El eje Z del objeto siempre estará de cara a la cámara.

BillboardMode BILLBOARD_FIXED_Y = 2

El eje X del objeto siempre estará de cara a la cámara.

BillboardMode BILLBOARD_PARTICLES = 3

Used for particle systems when assigned to GPUParticles3D and CPUParticles3D nodes (flipbook animation). Enables particles_anim_* properties.

The ParticleProcessMaterial.anim_speed_min or CPUParticles3D.anim_speed_min should also be set to a value bigger than zero for the animation to play.


enum TextureChannel: 🔗

TextureChannel TEXTURE_CHANNEL_RED = 0

Se usa para leer del canal rojo de una textura.

TextureChannel TEXTURE_CHANNEL_GREEN = 1

Se usa para leer del canal verde de una textura.

TextureChannel TEXTURE_CHANNEL_BLUE = 2

Se usa para leer del canal azul de una textura.

TextureChannel TEXTURE_CHANNEL_ALPHA = 3

Se usa para leer del canal de transparencia de una textura.

TextureChannel TEXTURE_CHANNEL_GRAYSCALE = 4

Used to read from the linear (non-perceptual) average of the red, green and blue channels of a texture.


enum EmissionOperator: 🔗

EmissionOperator EMISSION_OP_ADD = 0

Añade el color de la emisión al color de la textura de la emisión.

EmissionOperator EMISSION_OP_MULTIPLY = 1

Multiplica el color de la emisión por el color de la textura de la emisión.


enum DistanceFadeMode: 🔗

DistanceFadeMode DISTANCE_FADE_DISABLED = 0

No utilizar el desvanecimiento de la distancia.

DistanceFadeMode DISTANCE_FADE_PIXEL_ALPHA = 1

Suavemente se desvanece el objeto en base a la distancia de cada píxel de la cámara usando el canal alfa.

DistanceFadeMode DISTANCE_FADE_PIXEL_DITHER = 2

Smoothly fades the object out based on each pixel's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than DISTANCE_FADE_PIXEL_ALPHA.

DistanceFadeMode DISTANCE_FADE_OBJECT_DITHER = 3

Smoothly fades the object out based on the object's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than DISTANCE_FADE_PIXEL_ALPHA and DISTANCE_FADE_PIXEL_DITHER.


enum StencilMode: 🔗

StencilMode STENCIL_MODE_DISABLED = 0

Disables stencil operations.

StencilMode STENCIL_MODE_OUTLINE = 1

Stencil preset which applies an outline to the object.

Note: Requires a Material.next_pass material which will be automatically applied. Any manual changes made to Material.next_pass will be lost when the stencil properties are modified or the scene is reloaded. To safely apply a Material.next_pass material on a material that uses stencil presets, use GeometryInstance3D.material_overlay instead.

StencilMode STENCIL_MODE_XRAY = 2

Stencil preset which shows a silhouette of the object behind walls.

Note: Requires a Material.next_pass material which will be automatically applied. Any manual changes made to Material.next_pass will be lost when the stencil properties are modified or the scene is reloaded. To safely apply a Material.next_pass material on a material that uses stencil presets, use GeometryInstance3D.material_overlay instead.

StencilMode STENCIL_MODE_CUSTOM = 3

Enables stencil operations without a preset.


enum StencilFlags: 🔗

StencilFlags STENCIL_FLAG_READ = 1

The material will only be rendered where it passes a stencil comparison with existing stencil buffer values. See StencilCompare.

StencilFlags STENCIL_FLAG_WRITE = 2

The material will write the reference value to the stencil buffer where it passes the depth test.

StencilFlags STENCIL_FLAG_WRITE_DEPTH_FAIL = 4

The material will write the reference value to the stencil buffer where it fails the depth test.


enum StencilCompare: 🔗

StencilCompare STENCIL_COMPARE_ALWAYS = 0

Always passes the stencil test.

StencilCompare STENCIL_COMPARE_LESS = 1

Passes the stencil test when the reference value is less than the existing stencil value.

StencilCompare STENCIL_COMPARE_EQUAL = 2

Passes the stencil test when the reference value is equal to the existing stencil value.

StencilCompare STENCIL_COMPARE_LESS_OR_EQUAL = 3

Passes the stencil test when the reference value is less than or equal to the existing stencil value.

StencilCompare STENCIL_COMPARE_GREATER = 4

Passes the stencil test when the reference value is greater than the existing stencil value.

StencilCompare STENCIL_COMPARE_NOT_EQUAL = 5

Passes the stencil test when the reference value is not equal to the existing stencil value.

StencilCompare STENCIL_COMPARE_GREATER_OR_EQUAL = 6

Passes the stencil test when the reference value is greater than or equal to the existing stencil value.


Descripciones de Propiedades

Color albedo_color = Color(1, 1, 1, 1) 🔗

  • void set_albedo(value: Color)

  • Color get_albedo()

Color base del material.

Nota: Si detail_enabled es true y se especifica una textura detail_albedo, albedo_color no modulará la textura de detalle. Esto se puede usar para colorear áreas parciales de un material sin especificar una textura de albedo y usando una textura detail_albedo transparente.


Texture2D albedo_texture 🔗

Texture to multiply by albedo_color. Used for basic texturing of objects.

If the texture appears unexpectedly too dark or too bright, check albedo_texture_force_srgb.


bool albedo_texture_force_srgb = false 🔗

If true, forces a conversion of the albedo_texture from sRGB color space to linear color space. See also vertex_color_is_srgb.

This should only be enabled when needed (typically when using a ViewportTexture as albedo_texture). If albedo_texture_force_srgb is true when it shouldn't be, the texture will appear to be too dark. If albedo_texture_force_srgb is false when it shouldn't be, the texture will appear to be too bright.


bool albedo_texture_msdf = false 🔗

Enables multichannel signed distance field rendering shader. Use msdf_pixel_range and msdf_outline_size to configure MSDF parameters.


float alpha_antialiasing_edge 🔗

  • void set_alpha_antialiasing_edge(value: float)

  • float get_alpha_antialiasing_edge()

Threshold at which antialiasing will be applied on the alpha channel.


AlphaAntiAliasing alpha_antialiasing_mode 🔗

El tipo de antialiasing alfa que se aplicará.


float alpha_hash_scale 🔗

  • void set_alpha_hash_scale(value: float)

  • float get_alpha_hash_scale()

The hashing scale for Alpha Hash. Recommended values between 0 and 2.


float alpha_scissor_threshold 🔗

  • void set_alpha_scissor_threshold(value: float)

  • float get_alpha_scissor_threshold()

Threshold at which the alpha scissor will discard values. Higher values will result in more pixels being discarded. If the material becomes too opaque at a distance, try increasing alpha_scissor_threshold. If the material disappears at a distance, try decreasing alpha_scissor_threshold.


float anisotropy = 0.0 🔗

  • void set_anisotropy(value: float)

  • float get_anisotropy()

The strength of the anisotropy effect. This is multiplied by anisotropy_flowmap's alpha channel if a texture is defined there and the texture contains an alpha channel.


bool anisotropy_enabled = false 🔗

If true, anisotropy is enabled. Anisotropy changes the shape of the specular blob and aligns it to tangent space. This is useful for brushed aluminum and hair reflections.

Note: Mesh tangents are needed for anisotropy to work. If the mesh does not contain tangents, the anisotropy effect will appear broken.

Note: Material anisotropy should not to be confused with anisotropic texture filtering, which can be enabled by setting texture_filter to TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC.


Texture2D anisotropy_flowmap 🔗

Texture that offsets the tangent map for anisotropy calculations and optionally controls the anisotropy effect (if an alpha channel is present). The flowmap texture is expected to be a derivative map, with the red channel representing distortion on the X axis and green channel representing distortion on the Y axis. Values below 0.5 will result in negative distortion, whereas values above 0.5 will result in positive distortion.

If present, the texture's alpha channel will be used to multiply the strength of the anisotropy effect. Fully opaque pixels will keep the anisotropy effect's original strength while fully transparent pixels will disable the anisotropy effect entirely. The flowmap texture's blue channel is ignored.


bool ao_enabled = false 🔗

Si es true, se activa la oclusión ambiental. La oclusión ambiental oscurece las áreas basadas en el ao_texture.


float ao_light_affect = 0.0 🔗

  • void set_ao_light_affect(value: float)

  • float get_ao_light_affect()

La cantidad que la oclusión ambiental afecta a la iluminación de las luces. Si 0, la oclusión ambiental sólo afecta a la luz ambiental. Si 1, la oclusión ambiental afecta a las luces tanto como a la luz ambiental. Esto puede utilizarse para influir en la intensidad del efecto de la oclusión ambiental, pero normalmente tiene un aspecto poco realista.


bool ao_on_uv2 = false 🔗

Si es true, usa las coordenadas UV2 para mirar hacia arriba desde el ao_texture.


Texture2D ao_texture 🔗

Textura que define la cantidad de oclusión ambiental para un punto determinado del objeto.


TextureChannel ao_texture_channel = 0 🔗

Especifica el canal del ao_texture en el que se almacena la información de oclusión ambiental. Esto es útil cuando se almacena la información de múltiples efectos en una sola textura. Por ejemplo, si almacena metálico en el canal rojo, rugosidad en el azul y oclusión ambiental en el verde podría reducir el número de texturas que utiliza.


Color backlight = Color(0, 0, 0, 1) 🔗

  • void set_backlight(value: Color)

  • Color get_backlight()

The color used by the backlight effect. Represents the light passing through an object.


bool backlight_enabled = false 🔗

If true, the backlight effect is enabled. See also subsurf_scatter_transmittance_enabled.


Texture2D backlight_texture 🔗

Texture used to control the backlight effect per-pixel. Added to backlight.


bool bent_normal_enabled = false 🔗

If true, the bent normal map is enabled. This allows for more accurate indirect lighting and specular occlusion.


Texture2D bent_normal_texture 🔗

Texture that specifies the average direction of incoming ambient light at a given pixel. The bent_normal_texture only uses the red and green channels; the blue and alpha channels are ignored. The normal read from bent_normal_texture is oriented around the surface normal provided by the Mesh.

Note: A bent normal map is different from a regular normal map. When baking a bent normal map make sure to use a cosine distribution for the bent normal map to work correctly.

Note: The mesh must have both normals and tangents defined in its vertex data. Otherwise, the shading produced by the bent normal map will not look correct. If creating geometry with SurfaceTool, you can use SurfaceTool.generate_normals() and SurfaceTool.generate_tangents() to automatically generate normals and tangents respectively.

Note: Godot expects the bent normal map to use X+, Y+, and Z+ coordinates. See this page for a comparison of normal map coordinates expected by popular engines.


bool billboard_keep_scale = false 🔗

If true, the shader will keep the scale set for the mesh. Otherwise, the scale is lost when billboarding. Only applies when billboard_mode is not BILLBOARD_DISABLED.


BillboardMode billboard_mode = 0 🔗

Controls how the object faces the camera.

Note: Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See GitHub issue #41567 for details.


BlendMode blend_mode = 0 🔗

The material's blend mode.

Note: Values other than Mix force the object into the transparent pipeline.


float clearcoat = 1.0 🔗

  • void set_clearcoat(value: float)

  • float get_clearcoat()

Establece la fuerza del efecto del barniz. Ajustar a 0 se ve igual que desactivar el efecto de barniz.


bool clearcoat_enabled = false 🔗

If true, clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough.

Note: Clearcoat rendering is not visible if the material's shading_mode is SHADING_MODE_UNSHADED.


float clearcoat_roughness = 0.5 🔗

  • void set_clearcoat_roughness(value: float)

  • float get_clearcoat_roughness()

Sets the roughness of the clearcoat pass. A higher value results in a rougher clearcoat while a lower value results in a smoother clearcoat.


Texture2D clearcoat_texture 🔗

Textura que define la fuerza del efecto del barniz y el brillo del barniz. La fuerza se especifica en el canal rojo mientras que el brillo se especifica en el canal verde.


CullMode cull_mode = 0 🔗

Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera.


DepthDrawMode depth_draw_mode = 0 🔗

Determina cuándo el renderizado de profundidad se lleva a cabo. Véase también transparency.


DepthTest depth_test = 0 🔗

Experimental: May be affected by future rendering pipeline changes.

Determines which comparison operator is used when testing depth. See DepthTest.

Note: Changing depth_test to a non-default value only has a visible effect when used on a transparent material, or a material that has depth_draw_mode set to DEPTH_DRAW_DISABLED.


Texture2D detail_albedo 🔗

Texture that specifies the color of the detail overlay. detail_albedo's alpha channel is used as a mask, even when the material is opaque. To use a dedicated texture as a mask, see detail_mask.

Note: detail_albedo is not modulated by albedo_color.


BlendMode detail_blend_mode = 0 🔗

Especifica cómo el detail_albedo debe mezclarse con el ALBEDO actual.


bool detail_enabled = false 🔗

If true, enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on detail_mask and detail_albedo's alpha channel. This can be used to add variation to objects, or to blend between two different albedo/normal textures.


Texture2D detail_mask 🔗

Texture used to specify how the detail textures get blended with the base textures. detail_mask can be used together with detail_albedo's alpha channel (if any).


Texture2D detail_normal 🔗

Texture that specifies the per-pixel normal of the detail overlay. The detail_normal texture only uses the red and green channels; the blue and alpha channels are ignored. The normal read from detail_normal is oriented around the surface normal provided by the Mesh.

Note: Godot expects the normal map to use X+, Y+, and Z+ coordinates. See this page for a comparison of normal map coordinates expected by popular engines.


DetailUV detail_uv_layer = 0 🔗

Especifica si se utiliza UV o UV2 para la capa de detalle.


DiffuseMode diffuse_mode = 0 🔗

El algoritmo utilizado para la dispersión de luz difusa.


bool disable_ambient_light = false 🔗

Si es true, el objeto no recibe luz ambiental.


bool disable_fog = false 🔗

If true, the object will not be affected by fog (neither volumetric nor depth fog). This is useful for unshaded or transparent materials (e.g. particles), which without this setting will be affected even if fully transparent.


bool disable_receive_shadows = false 🔗

Si es true, el objeto no recibe ninguna sombra que de otra manera sería arrojada sobre él.


bool disable_specular_occlusion = false 🔗

If true, disables specular occlusion even if ProjectSettings.rendering/reflections/specular_occlusion/enabled is false.


float distance_fade_max_distance = 10.0 🔗

  • void set_distance_fade_max_distance(value: float)

  • float get_distance_fade_max_distance()

Distance at which the object appears fully opaque.

Note: If distance_fade_max_distance is less than distance_fade_min_distance, the behavior will be reversed. The object will start to fade away at distance_fade_max_distance and will fully disappear once it reaches distance_fade_min_distance.


float distance_fade_min_distance = 0.0 🔗

  • void set_distance_fade_min_distance(value: float)

  • float get_distance_fade_min_distance()

Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible.

Note: If distance_fade_min_distance is greater than distance_fade_max_distance, the behavior will be reversed. The object will start to fade away at distance_fade_max_distance and will fully disappear once it reaches distance_fade_min_distance.


DistanceFadeMode distance_fade_mode = 0 🔗

Especifica el tipo de desvanecimiento a utilizar. Puede ser cualquiera de los DistanceFadeModes.


Color emission = Color(0, 0, 0, 1) 🔗

  • void set_emission(value: Color)

  • Color get_emission()

El color de la luz emitida. Véase emission_enabled.


bool emission_enabled = false 🔗

If true, the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a VoxelGI, SDFGI, or LightmapGI is used and this object is used in baked lighting.


float emission_energy_multiplier = 1.0 🔗

  • void set_emission_energy_multiplier(value: float)

  • float get_emission_energy_multiplier()

El multiplicador de la luz emitida. Véase emission_enabled.


float emission_intensity 🔗

  • void set_emission_intensity(value: float)

  • float get_emission_intensity()

Luminance of emitted light, measured in nits (candela per square meter). Only available when ProjectSettings.rendering/lights_and_shadows/use_physical_light_units is enabled. The default is roughly equivalent to an indoor lightbulb.


bool emission_on_uv2 = false 🔗

Utiliza UV2 para leer de la emission_texture.


EmissionOperator emission_operator = 0 🔗

Sets how emission interacts with emission_texture. Can either add or multiply.


Texture2D emission_texture 🔗

Textura que especifica cuánta superficie emite luz en un punto determinado.


bool fixed_size = false 🔗

If true, the object is rendered at the same size regardless of distance. The object's size on screen is the same as if the camera was 1.0 units away from the object's origin, regardless of the actual distance from the camera. The Camera3D's field of view (or Camera3D.size when in orthogonal/frustum mode) still affects the size the object is drawn at.


float fov_override = 75.0 🔗

  • void set_fov_override(value: float)

  • float get_fov_override()

Overrides the Camera3D's field of view angle (in degrees).

Note: This behaves as if the field of view is set on a Camera3D with Camera3D.keep_aspect set to Camera3D.KEEP_HEIGHT. Additionally, it may not look correct on a non-perspective camera where the field of view setting is ignored.


bool grow = false 🔗

  • void set_grow_enabled(value: bool)

  • bool is_grow_enabled()

If true, enables the vertex grow setting. This can be used to create mesh-based outlines using a second material pass and its cull_mode set to CULL_FRONT. See also grow_amount.

Note: Vertex growth cannot create new vertices, which means that visible gaps may occur in sharp corners. This can be alleviated by designing the mesh to use smooth normals exclusively using face weighted normals in the 3D authoring software. In this case, grow will be able to join every outline together, just like in the original mesh.


float grow_amount = 0.0 🔗

Grows object vertices in the direction of their normals. Only effective if grow is true.


bool heightmap_deep_parallax = false 🔗

  • void set_heightmap_deep_parallax(value: bool)

  • bool is_heightmap_deep_parallax_enabled()

If true, uses parallax occlusion mapping to represent depth in the material instead of simple offset mapping (see heightmap_enabled). This results in a more convincing depth effect, but is much more expensive on the GPU. Only enable this on materials where it makes a significant visual difference.


bool heightmap_enabled = false 🔗

If true, height mapping is enabled (also called "parallax mapping" or "depth mapping"). See also normal_enabled. Height mapping is a demanding feature on the GPU, so it should only be used on materials where it makes a significant visual difference.

Note: Height mapping is not supported if triplanar mapping is used on the same material. The value of heightmap_enabled will be ignored if uv1_triplanar is enabled.


bool heightmap_flip_binormal = false 🔗

  • void set_heightmap_deep_parallax_flip_binormal(value: bool)

  • bool get_heightmap_deep_parallax_flip_binormal()

Si es true, invierte los vectores binormales de la malla al interpretar el mapa de altura. Si el efecto del mapa de altura se ve raro cuando la cámara se mueve (incluso con una heightmap_scale razonable), intenta establecer esto a true.


bool heightmap_flip_tangent = false 🔗

  • void set_heightmap_deep_parallax_flip_tangent(value: bool)

  • bool get_heightmap_deep_parallax_flip_tangent()

Si es true, invierte los vectores tangentes de la malla al interpretar el mapa de altura. Si el efecto del mapa de altura se ve raro cuando la cámara se mueve (incluso con una heightmap_scale razonable), intenta establecer esto a true.


bool heightmap_flip_texture = false 🔗

Si es true, interpreta la textura del mapa de altura como un mapa de profundidad, donde los valores más brillantes parecen estar "más bajos" en altitud en comparación con los valores más oscuros.

Esto se puede habilitar para la compatibilidad con algunos materiales creados para Godot 3.x. Esto no es necesario si la opción de importación Invertir se usó para invertir el mapa de profundidad en Godot 3.x, en cuyo caso heightmap_flip_texture debería permanecer en false.


int heightmap_max_layers 🔗

  • void set_heightmap_deep_parallax_max_layers(value: int)

  • int get_heightmap_deep_parallax_max_layers()

El número de capas que se utilizarán para el mapeo de oclusión de paralaje cuando la cámara esté cerca del material. Los valores más altos resultan en un efecto de profundidad más convincente, especialmente en los materiales que tienen cambios de altura pronunciados. Los valores más altos tienen un coste significativo en la GPU, por lo que solo debe aumentarse en los materiales donde produce una diferencia visual significativa.

Nota: Solo es efectivo si heightmap_deep_parallax es true.


int heightmap_min_layers 🔗

  • void set_heightmap_deep_parallax_min_layers(value: int)

  • int get_heightmap_deep_parallax_min_layers()

El número de capas que se utilizarán para el mapeo de oclusión de paralaje cuando la cámara esté lejos del material. Los valores más altos resultan en un efecto de profundidad más convincente, especialmente en los materiales que tienen cambios de altura pronunciados. Los valores más altos tienen un coste significativo en la GPU, por lo que solo debe aumentarse en los materiales donde produce una diferencia visual significativa.

Nota: Solo es efectivo si heightmap_deep_parallax es true.


float heightmap_scale = 5.0 🔗

  • void set_heightmap_scale(value: float)

  • float get_heightmap_scale()

The heightmap scale to use for the parallax effect (see heightmap_enabled). The default value is tuned so that the highest point (value = 255) appears to be 5 cm higher than the lowest point (value = 0). Higher values result in a deeper appearance, but may result in artifacts appearing when looking at the material from oblique angles, especially when the camera moves. Negative values can be used to invert the parallax effect, but this is different from inverting the texture using heightmap_flip_texture as the material will also appear to be "closer" to the camera. In most cases, heightmap_scale should be kept to a positive value.

Note: If the height map effect looks strange regardless of this value, try adjusting heightmap_flip_binormal and heightmap_flip_tangent. See also heightmap_texture for recommendations on authoring heightmap textures, as the way the heightmap texture is authored affects how heightmap_scale behaves.


Texture2D heightmap_texture 🔗

The texture to use as a height map. See also heightmap_enabled.

For best results, the texture should be normalized (with heightmap_scale reduced to compensate). In GIMP, this can be done using Colors > Auto > Equalize. If the texture only uses a small part of its available range, the parallax effect may look strange, especially when the camera moves.

Note: To reduce memory usage and improve loading times, you may be able to use a lower-resolution heightmap texture as most heightmaps are only comprised of low-frequency data.


float metallic = 0.0 🔗

  • void set_metallic(value: float)

  • float get_metallic()

Un valor alto hace que el material parezca más como un metal. Los no metálicos usan su albedo como color difuso y añaden difusión a la reflexión especular. Con los no metálicos, la reflexión aparece sobre el color del albedo. Los metales usan su albedo como multiplicador de la reflexión especular y ponen el color difuso en negro, lo que resulta en una reflexión teñida. Los materiales funcionan mejor cuando son totalmente metálicos o totalmente no metálicos, los valores entre 0 y 1 sólo deben utilizarse para la mezcla entre secciones metálicas y no metálicas. Para alterar la cantidad de reflexión utiliza roughness.


float metallic_specular = 0.5 🔗

  • void set_specular(value: float)

  • float get_specular()

Adjusts the strength of specular reflections. Specular reflections are composed of scene reflections and the specular lobe which is the bright spot that is reflected from light sources. When set to 0.0, no specular reflections will be visible. This differs from the SPECULAR_DISABLED SpecularMode as SPECULAR_DISABLED only applies to the specular lobe from the light source.

Note: Unlike metallic, this is not energy-conserving, so it should be left at 0.5 in most cases. See also roughness.


Texture2D metallic_texture 🔗

Textura utilizada para especificar el metal de un objeto. Se multiplica por metallic.


TextureChannel metallic_texture_channel = 0 🔗

Especifica el canal de la metallic_texture en el que se almacena la información metálica. Esto es útil cuando se almacena la información para múltiples efectos en una sola textura. Por ejemplo, si almacenas metálicos en el canal rojo, rugosidad en el azul y oclusión ambiental en el verde, podrías reducir el número de texturas que utilizas.


float msdf_outline_size = 0.0 🔗

  • void set_msdf_outline_size(value: float)

  • float get_msdf_outline_size()

El ancho del contorno de la forma.


float msdf_pixel_range = 4.0 🔗

  • void set_msdf_pixel_range(value: float)

  • float get_msdf_pixel_range()

The width of the range around the shape between the minimum and maximum representable signed distance.


bool no_depth_test = false 🔗

Si es true, la prueba de profundidad está desactivada y el objeto se dibujará en orden de renderizado.


bool normal_enabled = false 🔗

If true, normal mapping is enabled. This has a slight performance cost, especially on mobile GPUs.


float normal_scale = 1.0 🔗

  • void set_normal_scale(value: float)

  • float get_normal_scale()

La fuerza del efecto del mapa normal.


Texture2D normal_texture 🔗

Texture used to specify the normal at a given pixel. The normal_texture only uses the red and green channels; the blue and alpha channels are ignored. The normal read from normal_texture is oriented around the surface normal provided by the Mesh.

Note: The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with SurfaceTool, you can use SurfaceTool.generate_normals() and SurfaceTool.generate_tangents() to automatically generate normals and tangents respectively.

Note: Godot expects the normal map to use X+, Y+, and Z+ coordinates. See this page for a comparison of normal map coordinates expected by popular engines.

Note: If detail_enabled is true, the detail_albedo texture is drawn below the normal_texture. To display a normal map above the detail_albedo texture, use detail_normal instead.


Texture2D orm_texture 🔗

The Occlusion/Roughness/Metallic texture to use. This is a more efficient replacement of ao_texture, roughness_texture and metallic_texture in ORMMaterial3D. Ambient occlusion is stored in the red channel. Roughness map is stored in the green channel. Metallic map is stored in the blue channel. The alpha channel is ignored.


int particles_anim_h_frames 🔗

  • void set_particles_anim_h_frames(value: int)

  • int get_particles_anim_h_frames()

The number of horizontal frames in the particle sprite sheet. Only enabled when using BILLBOARD_PARTICLES. See billboard_mode.


bool particles_anim_loop 🔗

  • void set_particles_anim_loop(value: bool)

  • bool get_particles_anim_loop()

If true, particle animations are looped. Only enabled when using BILLBOARD_PARTICLES. See billboard_mode.


int particles_anim_v_frames 🔗

  • void set_particles_anim_v_frames(value: int)

  • int get_particles_anim_v_frames()

Número de fotogramas verticales en la hoja de sprites de partículas. Solo se habilita al usar BILLBOARD_PARTICLES. Véase billboard_mode.


float point_size = 1.0 🔗

  • void set_point_size(value: float)

  • float get_point_size()

Tamaño en píxeles. Véase use_point_size.


float proximity_fade_distance = 1.0 🔗

  • void set_proximity_fade_distance(value: float)

  • float get_proximity_fade_distance()

Distancia a la que se produce el efecto de desvanecimiento. Cuanto mayor es la distancia, más tiempo tarda un objeto en desvanecerse.


bool proximity_fade_enabled = false 🔗

  • void set_proximity_fade_enabled(value: bool)

  • bool is_proximity_fade_enabled()

Si es true, se activa el efecto de desvanecimiento por proximidad. El efecto de desvanecimiento por proximidad se desvanece cada píxel basado en su distancia a otro objeto.


bool refraction_enabled = false 🔗

If true, the refraction effect is enabled. Distorts transparency based on light from behind the object.

Note: Refraction is implemented using the screen texture. Only opaque materials will appear in the refraction, since transparent materials do not appear in the screen texture.


float refraction_scale = 0.05 🔗

  • void set_refraction(value: float)

  • float get_refraction()

La fuerza del efecto de refracción.


Texture2D refraction_texture 🔗

Textura que controla la fuerza de la refracción por píxel. Multiplicado por refraction_scale.


TextureChannel refraction_texture_channel = 0 🔗

Specifies the channel of the refraction_texture in which the refraction information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored refraction in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.


float rim = 1.0 🔗

Establece la fuerza del efecto de iluminación del borde.


bool rim_enabled = false 🔗

If true, rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object.

Note: Rim lighting is not visible if the material's shading_mode is SHADING_MODE_UNSHADED.


Texture2D rim_texture 🔗

La textura utilizada para establecer la fuerza del efecto de iluminación del borde por píxel. Multiplicado por el rim.


float rim_tint = 0.5 🔗

  • void set_rim_tint(value: float)

  • float get_rim_tint()

La cantidad de luz de mezclia y el color del albedo cuando se renderiza el efecto de borde. Si se utiliza 0 el color de la luz, mientras que 1 significa que se utiliza el color del albedo. Un valor intermedio generalmente funciona mejor.


float roughness = 1.0 🔗

  • void set_roughness(value: float)

  • float get_roughness()

Reflexión de la superficie. Un valor de 0 representa un espejo perfecto mientras que un valor de 1 difumina completamente el reflejo. Véase también metallic.


Texture2D roughness_texture 🔗

La textura utilizada para controlar la rugosidad por píxel. Multiplicado por roughness.


TextureChannel roughness_texture_channel = 0 🔗

Specifies the channel of the roughness_texture in which the roughness information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.


ShadingMode shading_mode = 1 🔗

Sets whether the shading takes place, per-pixel, per-vertex or unshaded. Per-vertex lighting is faster, making it the best choice for mobile applications, however it looks considerably worse than per-pixel. Unshaded rendering is the fastest, but disables all interactions with lights.


bool shadow_to_opacity = false 🔗

Si es true, habilita el modo de representación "sombra a opacidad" en el que la iluminación modifica el alfa de modo que las áreas sombreadas son opacas y las áreas no sombreadas son transparentes. Es útil para superponer sombras en una cámara de alimentación en AR.


SpecularMode specular_mode = 0 🔗

The method for rendering the specular blob.

Note: specular_mode only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, VoxelGI, SDFGI or ReflectionProbes. To disable reflections from these sources as well, set metallic_specular to 0.0 instead.


Color stencil_color = Color(0, 0, 0, 1) 🔗

  • void set_stencil_effect_color(value: Color)

  • Color get_stencil_effect_color()

Experimental: May be affected by future rendering pipeline changes.

The primary color of the stencil effect.


StencilCompare stencil_compare = 0 🔗

Experimental: May be affected by future rendering pipeline changes.

The comparison operator to use for stencil masking operations. See StencilCompare.


int stencil_flags = 0 🔗

  • void set_stencil_flags(value: int)

  • int get_stencil_flags()

Experimental: May be affected by future rendering pipeline changes.

The flags dictating how the stencil operation behaves. See StencilFlags.


StencilMode stencil_mode = 0 🔗

Experimental: May be affected by future rendering pipeline changes.

The stencil effect mode. See StencilMode.


float stencil_outline_thickness = 0.01 🔗

  • void set_stencil_effect_outline_thickness(value: float)

  • float get_stencil_effect_outline_thickness()

Experimental: May be affected by future rendering pipeline changes.

The outline thickness for STENCIL_MODE_OUTLINE.


int stencil_reference = 1 🔗

  • void set_stencil_reference(value: int)

  • int get_stencil_reference()

Experimental: May be affected by future rendering pipeline changes.

The stencil reference value (0-255). Typically a power of 2.


bool subsurf_scatter_enabled = false 🔗

If true, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. Subsurface scattering quality is controlled by ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality.

Note: Subsurface scattering is not supported on viewports that have a transparent background (where Viewport.transparent_bg is true).


bool subsurf_scatter_skin_mode = false 🔗

If true, subsurface scattering will use a special mode optimized for the color and density of human skin, such as boosting the intensity of the red channel in subsurface scattering.


float subsurf_scatter_strength = 0.0 🔗

  • void set_subsurface_scattering_strength(value: float)

  • float get_subsurface_scattering_strength()

The strength of the subsurface scattering effect. The depth of the effect is also controlled by ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale, which is set globally.


Texture2D subsurf_scatter_texture 🔗

La textura utilizada para controlar la fuerza del subsurface scattering. Se almacena en el canal rojo de la textura. Multiplicado por subsurf_scatter_strength.


float subsurf_scatter_transmittance_boost = 0.0 🔗

  • void set_transmittance_boost(value: float)

  • float get_transmittance_boost()

The intensity of the subsurface scattering transmittance effect.


Color subsurf_scatter_transmittance_color = Color(1, 1, 1, 1) 🔗

  • void set_transmittance_color(value: Color)

  • Color get_transmittance_color()

The color to multiply the subsurface scattering transmittance effect with. Ignored if subsurf_scatter_skin_mode is true.


float subsurf_scatter_transmittance_depth = 0.1 🔗

  • void set_transmittance_depth(value: float)

  • float get_transmittance_depth()

The depth of the subsurface scattering transmittance effect.


bool subsurf_scatter_transmittance_enabled = false 🔗

If true, enables subsurface scattering transmittance. Only effective if subsurf_scatter_enabled is true. See also backlight_enabled.


Texture2D subsurf_scatter_transmittance_texture 🔗

The texture to use for multiplying the intensity of the subsurface scattering transmittance intensity. See also subsurf_scatter_texture. Ignored if subsurf_scatter_skin_mode is true.


TextureFilter texture_filter = 3 🔗

Filter flags for the texture.

Note: heightmap_texture is always sampled with linear filtering, even if nearest-neighbor filtering is selected here. This is to ensure the heightmap effect looks as intended. If you need sharper height transitions between pixels, resize the heightmap texture in an image editor with nearest-neighbor filtering.


bool texture_repeat = true 🔗

If true, the texture repeats when exceeding the texture's size. See FLAG_USE_TEXTURE_REPEAT.


Transparency transparency = 0 🔗

The material's transparency mode. Some transparency modes will disable shadow casting. Any transparency mode other than TRANSPARENCY_DISABLED has a greater performance impact compared to opaque rendering. See also blend_mode.


bool use_fov_override = false 🔗

If true use fov_override to override the Camera3D's field of view angle.


bool use_particle_trails = false 🔗

If true, enables parts of the shader required for GPUParticles3D trails to function. This also requires using a mesh with appropriate skinning, such as RibbonTrailMesh or TubeTrailMesh. Enabling this feature outside of materials used in GPUParticles3D meshes will break material rendering.


bool use_point_size = false 🔗

If true, render point size can be changed.

Note: This is only effective for objects whose geometry is point-based rather than triangle-based. See also point_size.


bool use_z_clip_scale = false 🔗

If true use z_clip_scale to scale the object being rendered towards the camera to avoid clipping into things like walls.


Vector3 uv1_offset = Vector3(0, 0, 0) 🔗

How much to offset the UV coordinates. This amount will be added to UV in the vertex function. This can be used to offset a texture. The Z component is used when uv1_triplanar is enabled, but it is not used anywhere else.


Vector3 uv1_scale = Vector3(1, 1, 1) 🔗

How much to scale the UV coordinates. This is multiplied by UV in the vertex function. The Z component is used when uv1_triplanar is enabled, but it is not used anywhere else.


bool uv1_triplanar = false 🔗

Si es true, en lugar de usar UV las texturas usarán una búsqueda de texturas triplanares para determinar cómo aplicarlas. Triplanar usa la orientación de la superficie del objeto para mezclar entre las coordenadas de la textura. Lee de la textura fuente 3 veces, una para cada eje y luego se mezcla entre los resultados en base a cuán cerca se alinea el píxel con cada eje. Esto se utiliza a menudo para las características naturales para obtener una mezcla realista de los materiales. Debido a que la textura triplanar requiere muchas más lecturas de textura por píxel, es mucho más lenta que la textura UV normal. Además, debido a que está mezclando la textura entre los tres ejes, es inadecuado cuando se trata de lograr una textura nítida.


float uv1_triplanar_sharpness = 1.0 🔗

  • void set_uv1_triplanar_blend_sharpness(value: float)

  • float get_uv1_triplanar_blend_sharpness()

A lower number blends the texture more softly while a higher number blends the texture more sharply.

Note: uv1_triplanar_sharpness is clamped between 0.0 and 150.0 (inclusive) as values outside that range can look broken depending on the mesh.


bool uv1_world_triplanar = false 🔗

If true, triplanar mapping for UV is calculated in world space rather than object local space. See also uv1_triplanar.


Vector3 uv2_offset = Vector3(0, 0, 0) 🔗

How much to offset the UV2 coordinates. This amount will be added to UV2 in the vertex function. This can be used to offset a texture. The Z component is used when uv2_triplanar is enabled, but it is not used anywhere else.


Vector3 uv2_scale = Vector3(1, 1, 1) 🔗

How much to scale the UV2 coordinates. This is multiplied by UV2 in the vertex function. The Z component is used when uv2_triplanar is enabled, but it is not used anywhere else.


bool uv2_triplanar = false 🔗

Si es true, en lugar de usar UV2 las texturas usarán una búsqueda de texturas triplanares para determinar cómo aplicarlas. Triplanar usa la orientación de la superficie del objeto para mezclar entre las coordenadas de la textura. Lee de la textura fuente 3 veces, una para cada eje y luego se mezcla entre los resultados en base a cuán cerca se alinea el píxel con cada eje. Esto se utiliza a menudo para las características naturales para obtener una mezcla realista de los materiales. Debido a que la textura triplanar requiere muchas más lecturas de textura por píxel, es mucho más lenta que la textura UV normal. Además, debido a que está mezclando la textura entre los tres ejes, es inadecuado cuando se trata de lograr una textura nítida.


float uv2_triplanar_sharpness = 1.0 🔗

  • void set_uv2_triplanar_blend_sharpness(value: float)

  • float get_uv2_triplanar_blend_sharpness()

A lower number blends the texture more softly while a higher number blends the texture more sharply.

Note: uv2_triplanar_sharpness is clamped between 0.0 and 150.0 (inclusive) as values outside that range can look broken depending on the mesh.


bool uv2_world_triplanar = false 🔗

If true, triplanar mapping for UV2 is calculated in world space rather than object local space. See also uv2_triplanar.


bool vertex_color_is_srgb = false 🔗

If true, vertex colors are considered to be stored in sRGB color space and are converted to linear color space during rendering. If false, vertex colors are considered to be stored in linear color space and are rendered as-is. See also albedo_texture_force_srgb.

Note: Only effective when using the Forward+ and Mobile rendering methods, not Compatibility.


bool vertex_color_use_as_albedo = false 🔗

Si es true, el color del vértice se utiliza como color del albedo.


float z_clip_scale = 1.0 🔗

  • void set_z_clip_scale(value: float)

  • float get_z_clip_scale()

Scales the object being rendered towards the camera to avoid clipping into things like walls. This is intended to be used for objects that are fixed with respect to the camera like player arms, tools, etc. Lighting and shadows will continue to work correctly when this setting is adjusted, but screen-space effects like SSAO and SSR may break with lower scales. Therefore, try to keep this setting as close to 1.0 as possible.


Descripciones de Métodos

bool get_feature(feature: Feature) const 🔗

Devuelve true, si el Feature especificado está activado.


bool get_flag(flag: Flags) const 🔗

Devuelve true si la bandera especificada está habilitada.


Texture2D get_texture(param: TextureParam) const 🔗

Returns the Texture2D associated with the specified TextureParam.


void set_feature(feature: Feature, enable: bool) 🔗

If true, enables the specified Feature. Many features that are available in BaseMaterial3Ds need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to true.


void set_flag(flag: Flags, enable: bool) 🔗

If true, enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to true.


void set_texture(param: TextureParam, texture: Texture2D) 🔗

Establece la textura para la ranura especificada por param.