SpatialMaterial

Inherits: Material < Resource < Reference < Object

Material de renderizado 3D por defecto.

Descripción

Esto proporciona un material por defecto con una amplia variedad de características y propiedades de renderizado sin necesidad de escribir codigo shader. Consulte el siguiente tutorial para obtener más detalles.

Tutoriales

Propiedades

Color

albedo_color

Color( 1, 1, 1, 1 )

Texture

albedo_texture

float

anisotropy

bool

anisotropy_enabled

false

Texture

anisotropy_flowmap

bool

ao_enabled

false

float

ao_light_affect

bool

ao_on_uv2

Texture

ao_texture

TextureChannel

ao_texture_channel

AsyncMode

async_mode

0

float

clearcoat

bool

clearcoat_enabled

false

float

clearcoat_gloss

Texture

clearcoat_texture

bool

depth_deep_parallax

bool

depth_enabled

false

bool

depth_flip_binormal

bool

depth_flip_tangent

int

depth_max_layers

int

depth_min_layers

float

depth_scale

Texture

depth_texture

Texture

detail_albedo

BlendMode

detail_blend_mode

bool

detail_enabled

false

Texture

detail_mask

Texture

detail_normal

DetailUV

detail_uv_layer

float

distance_fade_max_distance

float

distance_fade_min_distance

DistanceFadeMode

distance_fade_mode

0

Color

emission

bool

emission_enabled

false

float

emission_energy

bool

emission_on_uv2

EmissionOperator

emission_operator

Texture

emission_texture

bool

flags_albedo_tex_force_srgb

false

bool

flags_disable_ambient_light

false

bool

flags_do_not_receive_shadows

false

bool

flags_ensure_correct_normals

false

bool

flags_fixed_size

false

bool

flags_no_depth_test

false

bool

flags_transparent

false

bool

flags_unshaded

false

bool

flags_use_point_size

false

bool

flags_use_shadow_to_opacity

false

bool

flags_vertex_lighting

false

bool

flags_world_triplanar

false

float

metallic

0.0

float

metallic_specular

0.5

Texture

metallic_texture

TextureChannel

metallic_texture_channel

0

bool

normal_enabled

false

float

normal_scale

Texture

normal_texture

float

params_alpha_scissor_threshold

bool

params_billboard_keep_scale

false

BillboardMode

params_billboard_mode

0

BlendMode

params_blend_mode

0

CullMode

params_cull_mode

0

DepthDrawMode

params_depth_draw_mode

0

DiffuseMode

params_diffuse_mode

0

bool

params_grow

false

float

params_grow_amount

float

params_line_width

1.0

float

params_point_size

1.0

SpecularMode

params_specular_mode

0

bool

params_use_alpha_scissor

false

int

particles_anim_h_frames

bool

particles_anim_loop

int

particles_anim_v_frames

float

proximity_fade_distance

bool

proximity_fade_enable

false

bool

refraction_enabled

false

float

refraction_scale

Texture

refraction_texture

TextureChannel

refraction_texture_channel

float

rim

bool

rim_enabled

false

Texture

rim_texture

float

rim_tint

float

roughness

1.0

Texture

roughness_texture

TextureChannel

roughness_texture_channel

0

bool

subsurf_scatter_enabled

false

float

subsurf_scatter_strength

Texture

subsurf_scatter_texture

Color

transmission

bool

transmission_enabled

false

Texture

transmission_texture

Vector3

uv1_offset

Vector3( 0, 0, 0 )

Vector3

uv1_scale

Vector3( 1, 1, 1 )

bool

uv1_triplanar

false

float

uv1_triplanar_sharpness

1.0

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

vertex_color_is_srgb

false

bool

vertex_color_use_as_albedo

false

Métodos

bool

get_feature ( Feature feature ) const

bool

get_flag ( Flags flag ) const

Texture

get_texture ( TextureParam param ) const

void

set_feature ( Feature feature, bool enable )

void

set_flag ( Flags flag, bool enable )

void

set_texture ( TextureParam param, Texture texture )

Enumeraciones

enum TextureParam:

  • TEXTURE_ALBEDO = 0 --- Textura que especifica el color por píxel.

  • TEXTURE_METALLIC = 1 --- Textura que especifica el valor metálico por píxel.

  • TEXTURE_ROUGHNESS = 2 --- Textura que especifica el valor de rugosidad por píxel.

  • TEXTURE_EMISSION = 3 --- Textura que especifica el color de emisión por píxel.

  • TEXTURE_NORMAL = 4 --- Textura que especifica el vector normal por píxel.

  • TEXTURE_RIM = 5 --- Textura que especifica el valor del borde por píxel.

  • TEXTURE_CLEARCOAT = 6 --- Textura que especifica el valor del barniz por píxel.

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

  • TEXTURE_AMBIENT_OCCLUSION = 8 --- Textura que especifica el valor de oclusión ambiental por píxel.

  • TEXTURE_DEPTH = 9 --- Texture specifying per-pixel depth.

  • TEXTURE_SUBSURFACE_SCATTERING = 10 --- Textura que especifica la subsurface scattering por pixel.

  • TEXTURE_TRANSMISSION = 11 --- Texture specifying per-pixel transmission color.

  • TEXTURE_REFRACTION = 12 --- Textura que especifica la fuerza de refracción por píxel.

  • TEXTURE_DETAIL_MASK = 13 --- Textura que especifica el valor de mezcla de la máscara de detalles por píxel.

  • TEXTURE_DETAIL_ALBEDO = 14 --- Textura que especifica el color de detalle por píxel.

  • TEXTURE_DETAIL_NORMAL = 15 --- La textura que especifica el detalle de la normal por píxel.

  • TEXTURE_MAX = 16 --- Representa el tamaño del enum TextureParam.


enum DetailUV:

  • DETAIL_UV_1 = 0 --- Usa UV con la textura de detalle.

  • DETAIL_UV_2 = 1 --- Usa UV2 con la textura de detalle.


enum Feature:


enum 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.

  • BLEND_MODE_ADD = 1 --- El color del objeto se añade al fondo.

  • BLEND_MODE_SUB = 2 --- El color del objeto se resta del fondo.

  • BLEND_MODE_MUL = 3 --- El color del objeto se multiplica por el fondo.


enum DepthDrawMode:

  • DEPTH_DRAW_OPAQUE_ONLY = 0 --- Modo de dibujo de profundidad predeterminado. La profundidad se dibuja sólo para los objetos opacos.

  • DEPTH_DRAW_ALWAYS = 1 --- El dibujo de profundidad se calcula tanto para objetos opacos como transparentes.

  • DEPTH_DRAW_DISABLED = 2 --- No hay dibujo de profundidad.

  • DEPTH_DRAW_ALPHA_OPAQUE_PREPASS = 3 --- For transparent objects, an opaque pass is made first with the opaque parts, then transparency is drawn.


enum CullMode:

  • CULL_BACK = 0 --- Modo descarte por defecto. La parte trasera del objeto es descartada(no se dibuja) cuando no está visible.

  • CULL_FRONT = 1 --- La parte delantera del objeto es descartada cuando no está visible.

  • CULL_DISABLED = 2 --- No se realiza ningún descarte.


enum Flags:

  • FLAG_UNSHADED = 0 --- No lighting is used on the object. Color comes directly from ALBEDO.

  • FLAG_USE_VERTEX_LIGHTING = 1 --- Lighting is calculated per-vertex rather than per-pixel. This can be used to increase the speed of the shader at the cost of quality.

  • FLAG_DISABLE_DEPTH_TEST = 2 --- Desactiva la prueba de profundidad, así que este objeto se dibuja encima de todos los demás. Sin embargo, los objetos dibujados después de él en el orden de dibujo pueden cubrirlo.

  • FLAG_ALBEDO_FROM_VERTEX_COLOR = 3 --- Ponga ALBEDO en el color por vértice especificado en la malla.

  • FLAG_SRGB_VERTEX_COLOR = 4 --- Vertex color is in sRGB space and needs to be converted to linear. Only applies in the GLES3 renderer.

  • FLAG_USE_POINT_SIZE = 5 --- 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.

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

  • FLAG_BILLBOARD_KEEP_SCALE = 7 --- Shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when params_billboard_mode is BILLBOARD_ENABLED.

  • FLAG_UV1_USE_TRIPLANAR = 8 --- Use la búsqueda de texturas triplanares para todas las búsquedas de texturas que normalmente usarían UV.

  • FLAG_UV2_USE_TRIPLANAR = 9 --- Use la búsqueda de texturas triplanares para todas las búsquedas de texturas que normalmente usarían UV2.

  • FLAG_AO_ON_UV2 = 11 --- Use las coordenadas UV2 para mirar hacia arriba desde el ao_texture.

  • FLAG_EMISSION_ON_UV2 = 12 --- Utilice las coordenadas UV2 para mirar hacia arriba desde la emission_texture.

  • FLAG_USE_ALPHA_SCISSOR = 13 --- Use alpha scissor. Set by params_use_alpha_scissor.

  • FLAG_TRIPLANAR_USE_WORLD = 10 --- Use world coordinates in the triplanar texture lookup instead of local coordinates.

  • FLAG_ALBEDO_TEXTURE_FORCE_SRGB = 14 --- Obliga al shader a convertir el albedo del espacio sRGB al espacio lineal.

  • FLAG_DONT_RECEIVE_SHADOWS = 15 --- Desactiva la recepción de sombras de otros objetos.

  • FLAG_DISABLE_AMBIENT_LIGHT = 17 --- Desactiva la recepción de luz ambiental.

  • FLAG_ENSURE_CORRECT_NORMALS = 16 --- Ensures that normals appear correct, even with non-uniform scaling.

  • FLAG_USE_SHADOW_TO_OPACITY = 18 --- Habilita la característica de opacidad de la sombra.

  • FLAG_MAX = 19 --- Representa el tamaño del enum Flags.


enum DiffuseMode:

  • DIFFUSE_BURLEY = 0 --- Algoritmo de dispersión difusa por defecto.

  • DIFFUSE_LAMBERT = 1 --- La dispersión difusa ignora las rugosidades.

  • DIFFUSE_LAMBERT_WRAP = 2 --- Extiende a Lambert para cubrir más de 90 grados cuando la rugosidad aumenta.

  • DIFFUSE_OREN_NAYAR = 3 --- Intenta usar la rugosidad para emular la micro superficie.

  • DIFFUSE_TOON = 4 --- Utiliza un corte duro para la iluminación, con el alisado afectado por la aspereza.


enum SpecularMode:

  • SPECULAR_SCHLICK_GGX = 0 --- Bola especular por defecto.

  • SPECULAR_BLINN = 1 --- Algoritmo especular más antiguo, incluido por compatibilidad.

  • SPECULAR_PHONG = 2 --- Algoritmo especular más antiguo, incluido por compatibilidad.

  • SPECULAR_TOON = 3 --- La mancha de un dibujo que cambia de tamaño en función de la rugosidad.

  • SPECULAR_DISABLED = 4 --- No hay manchas especulares.


enum BillboardMode:

  • BILLBOARD_DISABLED = 0 --- Modo Billboard esta desactivado.

  • BILLBOARD_ENABLED = 1 --- El eje Z del objeto siempre estará de cara a la cámara.

  • BILLBOARD_FIXED_Y = 2 --- El eje X del objeto siempre estará de cara a la cámara.

  • BILLBOARD_PARTICLES = 3 --- Used for particle systems when assigned to Particles and CPUParticles nodes. Enables particles_anim_* properties.

The ParticlesMaterial.anim_speed or CPUParticles.anim_speed should also be set to a positive value for the animation to play.


enum TextureChannel:

  • TEXTURE_CHANNEL_RED = 0 --- Se usa para leer del canal rojo de una textura.

  • TEXTURE_CHANNEL_GREEN = 1 --- Se usa para leer del canal verde de una textura.

  • TEXTURE_CHANNEL_BLUE = 2 --- Se usa para leer del canal azul de una textura.

  • TEXTURE_CHANNEL_ALPHA = 3 --- Se usa para leer del canal azul de una textura.

  • TEXTURE_CHANNEL_GRAYSCALE = 4 --- Actualmente sin uso.


enum EmissionOperator:

  • EMISSION_OP_ADD = 0 --- Añade el color de la emisión al color de la textura de la emisión.

  • EMISSION_OP_MULTIPLY = 1 --- Multiplica el color de la emisión por el color de la textura de la emisión.


enum DistanceFadeMode:

  • DISTANCE_FADE_DISABLED = 0 --- No utilice el desvanecimiento de la distancia.

  • 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.

  • DISTANCE_FADE_PIXEL_DITHER = 2 --- Suavemente desvanece el objeto en base a la distancia de cada píxel de la cámara usando un enfoque de titubeo. Los píxeles descartados siguen un patrón establecido para desvanecerse suavemente sin permitir la transparencia. En cierto hardware esto puede ser más rápido que DISTANCE_FADE_PIXEL_ALPHA.

  • DISTANCE_FADE_OBJECT_DITHER = 3 --- Suavemente desvanece el objeto en base a la distancia de cada píxel de la cámara usando un enfoque de titubeo. Los píxeles descartados siguen un patrón establecido para desvanecerse suavemente sin permitir la transparencia. En cierto hardware esto puede ser más rápido que DISTANCE_FADE_PIXEL_ALPHA.


enum AsyncMode:

  • ASYNC_MODE_VISIBLE = 0 --- The real conditioned shader needed on each situation will be sent for background compilation. In the meantime, a very complex shader that adapts to every situation will be used ("ubershader"). This ubershader is much slower to render, but will keep the game running without stalling to compile. Once shader compilation is done, the ubershader is replaced by the traditional optimized shader.

  • ASYNC_MODE_HIDDEN = 1 --- Anything with this material applied won't be rendered while this material's shader is being compiled.

This is useful for optimization, in cases where the visuals won't suffer from having certain non-essential elements missing during the short time their shaders are being compiled.

Descripciones de Propiedades

Default

Color( 1, 1, 1, 1 )

Setter

set_albedo(value)

Getter

get_albedo()

El color base del material.


Setter

set_texture(value)

Getter

get_texture()

La textura se multiplica por albedo_color. Se utiliza para la textura básica de los objetos.


Setter

set_anisotropy(value)

Getter

get_anisotropy()

La fuerza del efecto de anisotropía.


  • bool anisotropy_enabled

Default

false

Setter

set_feature(value)

Getter

get_feature()

Si true, la anisotropía está activada. Cambia la forma de la mancha especular y la alinea con el espacio tangente. Las tangentes de malla son necesarias para que esto funcione. Si la malla no contiene tangentes el efecto de anisotropía aparecerá roto.


Setter

set_texture(value)

Getter

get_texture()

Textura que desplaza el mapa de la tangente para los cálculos de anisotropía.


Default

false

Setter

set_feature(value)

Getter

get_feature()

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


Setter

set_ao_light_affect(value)

Getter

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.


Setter

set_flag(value)

Getter

get_flag()

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


Setter

set_texture(value)

Getter

get_texture()

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


Setter

set_ao_texture_channel(value)

Getter

get_ao_texture_channel()

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.


Default

0

Setter

set_async_mode(value)

Getter

get_async_mode()

If ProjectSettings.rendering/gles3/shaders/shader_compilation_mode is Synchronous (with or without cache), this determines how this material must behave in regards to asynchronous shader compilation.

ASYNC_MODE_VISIBLE is the default and the best for most cases.


Setter

set_clearcoat(value)

Getter

get_clearcoat()

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


  • bool clearcoat_enabled

Default

false

Setter

set_feature(value)

Getter

get_feature()

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 has flags_unshaded set to true.


Setter

set_clearcoat_gloss(value)

Getter

get_clearcoat_gloss()

Establece la rugosidad del paso del barniz. Un valor más alto resulta en un barniz más suave mientras que un valor más bajo resulta en un barniz más áspero.


Setter

set_texture(value)

Getter

get_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.


  • bool depth_deep_parallax

Setter

set_depth_deep_parallax(value)

Getter

is_depth_deep_parallax_enabled()

If true, the shader will read depth texture at multiple points along the view ray to determine occlusion and parrallax. This can be very performance demanding, but results in more realistic looking depth mapping.


  • bool depth_enabled

Default

false

Setter

set_feature(value)

Getter

get_feature()

If true, depth mapping is enabled (also called "parallax mapping" or "height mapping"). See also normal_enabled.

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


  • bool depth_flip_binormal

Setter

set_depth_deep_parallax_flip_binormal(value)

Getter

get_depth_deep_parallax_flip_binormal()

If true, direction of the binormal is flipped before using in the depth effect. This may be necessary if you have encoded your binormals in a way that is conflicting with the depth effect.


  • bool depth_flip_tangent

Setter

set_depth_deep_parallax_flip_tangent(value)

Getter

get_depth_deep_parallax_flip_tangent()

If true, direction of the tangent is flipped before using in the depth effect. This may be necessary if you have encoded your tangents in a way that is conflicting with the depth effect.


  • int depth_max_layers

Setter

set_depth_deep_parallax_max_layers(value)

Getter

get_depth_deep_parallax_max_layers()

Number of layers to use when using depth_deep_parallax and the view direction is perpendicular to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp.


  • int depth_min_layers

Setter

set_depth_deep_parallax_min_layers(value)

Getter

get_depth_deep_parallax_min_layers()

Number of layers to use when using depth_deep_parallax and the view direction is parallel to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp.


Setter

set_depth_scale(value)

Getter

get_depth_scale()

Scales the depth offset effect. A higher number will create a larger depth.


Setter

set_texture(value)

Getter

get_texture()

Texture used to determine depth at a given pixel. Depth is always stored in the red channel.


Setter

set_texture(value)

Getter

get_texture()

Textura que especifica el color de la superposición de los detalles.


Setter

set_detail_blend_mode(value)

Getter

get_detail_blend_mode()

Especifica cómo el detail_albedo debe mezclarse con el actual ALBEDO. Ver BlendMode para las opciones.


  • bool detail_enabled

Default

false

Setter

set_feature(value)

Getter

get_feature()

Si true, permite la superposición de detalles. El detalle es una segunda textura que se mezcla sobre la superficie del objeto basada en detail_mask. Esto puede ser usado para añadir variación a los objetos, o para mezclar entre dos diferentes texturas de albedo/normal.


Setter

set_texture(value)

Getter

get_texture()

La textura usada para especificar cómo las texturas de detalle se mezclan con las texturas de base.


Setter

set_texture(value)

Getter

get_texture()

Textura que especifica la normalidad por píxel de la superposición de detalles.

Nota: Godot espera que el mapa de normales utilice las coordenadas X+, Y-, y Z+. Ver esta página para una comparación de las coordenadas del mapa normal esperadas por los motores populares.


Setter

set_detail_uv(value)

Getter

get_detail_uv()

Especifica si se utiliza UV o UV2 para la capa de detalle. Ver DetailUV para las opciones.


  • float distance_fade_max_distance

Setter

set_distance_fade_max_distance(value)

Getter

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

Setter

set_distance_fade_min_distance(value)

Getter

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.


Default

0

Setter

set_distance_fade(value)

Getter

get_distance_fade()

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


Setter

set_emission(value)

Getter

get_emission()

El color de la luz emitida. Ver emission_enabled.


  • bool emission_enabled

Default

false

Setter

set_feature(value)

Getter

get_feature()

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


Setter

set_emission_energy(value)

Getter

get_emission_energy()

La fuerza de la luz emitida. Ver emission_enabled.


  • bool emission_on_uv2

Setter

set_flag(value)

Getter

get_flag()

Utilice UV2 para leer de la emission_texture.


Setter

set_emission_operator(value)

Getter

get_emission_operator()

Establece cómo interactúa emission con emission_texture. Puede sumar o multiplicar. Ver EmissionOperator para las opciones.


Setter

set_texture(value)

Getter

get_texture()

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


  • bool flags_albedo_tex_force_srgb

Default

false

Setter

set_flag(value)

Getter

get_flag()

Fuerza una conversión del albedo_texture del espacio sRGB al espacio lineal.


  • bool flags_disable_ambient_light

Default

false

Setter

set_flag(value)

Getter

get_flag()

Si true, el objeto no recibe luz ambiental.


  • bool flags_do_not_receive_shadows

Default

false

Setter

set_flag(value)

Getter

get_flag()

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


  • bool flags_ensure_correct_normals

Default

false

Setter

set_flag(value)

Getter

get_flag()

If true, the shader will compute extra operations to make sure the normal stays correct when using a non-uniform scale. Only enable if using non-uniform scaling.


  • bool flags_fixed_size

Default

false

Setter

set_flag(value)

Getter

get_flag()

Si true, el objeto se renderiza con el mismo tamaño independientemente de la distancia.


  • bool flags_no_depth_test

Default

false

Setter

set_flag(value)

Getter

get_flag()

Si true, la prueba de profundidad está desactivada y el objeto se dibujará en orden de renderización.


  • bool flags_transparent

Default

false

Setter

set_feature(value)

Getter

get_feature()

If true, transparency is enabled on the body. See also params_blend_mode.


  • bool flags_unshaded

Default

false

Setter

set_flag(value)

Getter

get_flag()

If true, the object is unaffected by lighting.


  • bool flags_use_point_size

Default

false

Setter

set_flag(value)

Getter

get_flag()

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 params_point_size.


  • bool flags_use_shadow_to_opacity

Default

false

Setter

set_flag(value)

Getter

get_flag()

Si 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.


  • bool flags_vertex_lighting

Default

false

Setter

set_flag(value)

Getter

get_flag()

If true, lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices.


  • bool flags_world_triplanar

Default

false

Setter

set_flag(value)

Getter

get_flag()

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


Default

0.0

Setter

set_metallic(value)

Getter

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 utilice roughness.


  • float metallic_specular

Default

0.5

Setter

set_specular(value)

Getter

get_specular()

Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources.

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


Setter

set_texture(value)

Getter

get_texture()

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


Default

0

Setter

set_metallic_texture_channel(value)

Getter

get_metallic_texture_channel()

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.


  • bool normal_enabled

Default

false

Setter

set_feature(value)

Getter

get_feature()

Si true, se habilita el mapeado normal.


Setter

set_normal_scale(value)

Getter

get_normal_scale()

La fuerza del efecto del mapa normal.


Setter

set_texture(value)

Getter

get_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.


  • float params_alpha_scissor_threshold

Setter

set_alpha_scissor_threshold(value)

Getter

get_alpha_scissor_threshold()

Umbral en el que el alpha scissor descartará los valores.


  • bool params_billboard_keep_scale

Default

false

Setter

set_flag(value)

Getter

get_flag()

If true, the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when params_billboard_mode is BILLBOARD_ENABLED.


Default

0

Setter

set_billboard_mode(value)

Getter

get_billboard_mode()

Controls how the object faces the camera. See BillboardMode.

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.


Default

0

Setter

set_blend_mode(value)

Getter

get_blend_mode()

El modo de mezcla del material.

Nota: Los valores distintos a Mix obligan al objeto a entrar en el pipeline transparente. Ver BlendMode.


Default

0

Setter

set_cull_mode(value)

Getter

get_cull_mode()

Cual lado del objeto no se dibuja cuando se renderizan las caras traseras. Ver CullMode.


Default

0

Setter

set_depth_draw_mode(value)

Getter

get_depth_draw_mode()

Determines when depth rendering takes place. See DepthDrawMode. See also flags_transparent.


Default

0

Setter

set_diffuse_mode(value)

Getter

get_diffuse_mode()

El algoritmo utilizado para la dispersión de la luz difusa. Véase DiffuseMode.


Default

false

Setter

set_grow_enabled(value)

Getter

is_grow_enabled()

If true, enables the vertex grow setting. See params_grow_amount.


  • float params_grow_amount

Setter

set_grow(value)

Getter

get_grow()

Crecen los vértices de los objetos en la dirección de sus normales.


  • float params_line_width

Default

1.0

Setter

set_line_width(value)

Getter

get_line_width()

Currently unimplemented in Godot.


  • float params_point_size

Default

1.0

Setter

set_point_size(value)

Getter

get_point_size()

The point size in pixels. See flags_use_point_size.


Default

0

Setter

set_specular_mode(value)

Getter

get_specular_mode()

El método para renderizar la mancha especular. Ver SpecularMode.


  • bool params_use_alpha_scissor

Default

false

Setter

set_flag(value)

Getter

get_flag()

If true, the shader will discard all pixels that have an alpha value less than params_alpha_scissor_threshold.


  • int particles_anim_h_frames

Setter

set_particles_anim_h_frames(value)

Getter

get_particles_anim_h_frames()

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


  • bool particles_anim_loop

Setter

set_particles_anim_loop(value)

Getter

get_particles_anim_loop()

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


  • int particles_anim_v_frames

Setter

set_particles_anim_v_frames(value)

Getter

get_particles_anim_v_frames()

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


  • float proximity_fade_distance

Setter

set_proximity_fade_distance(value)

Getter

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_enable

Default

false

Setter

set_proximity_fade(value)

Getter

is_proximity_fade_enabled()

Si 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

Default

false

Setter

set_feature(value)

Getter

get_feature()

If true, the refraction effect is enabled. Refraction distorts transparency based on light from behind the object. When using the GLES3 backend, the material's roughness value will affect the blurriness of the refraction. Higher roughness values will make the refraction look blurrier.


Setter

set_refraction(value)

Getter

get_refraction()

The strength of the refraction effect. Higher values result in a more distorted appearance for the refraction.


Setter

set_texture(value)

Getter

get_texture()

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


Setter

set_refraction_texture_channel(value)

Getter

get_refraction_texture_channel()

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 metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.


Setter

set_rim(value)

Getter

get_rim()

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


Default

false

Setter

set_feature(value)

Getter

get_feature()

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 has flags_unshaded set to true.


Setter

set_texture(value)

Getter

get_texture()

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


Setter

set_rim_tint(value)

Getter

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.


Default

1.0

Setter

set_roughness(value)

Getter

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.


Setter

set_texture(value)

Getter

get_texture()

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


Default

0

Setter

set_roughness_texture_channel(value)

Getter

get_roughness_texture_channel()

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.


  • bool subsurf_scatter_enabled

Default

false

Setter

set_feature(value)

Getter

get_feature()

Si true, se activa la dispersión subterránea. Emula la luz que penetra en la superficie de un objeto, se dispersa y luego emerge.


  • float subsurf_scatter_strength

Setter

set_subsurface_scattering_strength(value)

Getter

get_subsurface_scattering_strength()

La fuerza del efecto de dispersión del subsuelo.


Setter

set_texture(value)

Getter

get_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.


Setter

set_transmission(value)

Getter

get_transmission()

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


  • bool transmission_enabled

Default

false

Setter

set_feature(value)

Getter

get_feature()

If true, the transmission effect is enabled.


Setter

set_texture(value)

Getter

get_texture()

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


Default

Vector3( 0, 0, 0 )

Setter

set_uv1_offset(value)

Getter

get_uv1_offset()

Cuánto desplazar las coordenadas UV. Esta cantidad se añadirá a UV en la función de vértice. Esto puede ser usado para desplazar una textura.


Default

Vector3( 1, 1, 1 )

Setter

set_uv1_scale(value)

Getter

get_uv1_scale()

Cuánto escalar las coordenadas UV. Esto se multiplica por UV en la función de vértice.


  • bool uv1_triplanar

Default

false

Setter

set_flag(value)

Getter

get_flag()

Si 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

Default

1.0

Setter

set_uv1_triplanar_blend_sharpness(value)

Getter

get_uv1_triplanar_blend_sharpness()

Un número más bajo mezcla la textura más suavemente mientras que un número más alto mezcla la textura más bruscamente.


Default

Vector3( 0, 0, 0 )

Setter

set_uv2_offset(value)

Getter

get_uv2_offset()

Cuánto desplazar las coordenadas UV2. Esta cantidad se añadirá a UV2 en la función de vértice. Esto puede ser usado para compensar una textura.


Default

Vector3( 1, 1, 1 )

Setter

set_uv2_scale(value)

Getter

get_uv2_scale()

Cuánto escalar las coordenadas de UV2. Esto se multiplica por UV2 en la función de vértice.


  • bool uv2_triplanar

Default

false

Setter

set_flag(value)

Getter

get_flag()

Si 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

Default

1.0

Setter

set_uv2_triplanar_blend_sharpness(value)

Getter

get_uv2_triplanar_blend_sharpness()

Un número más bajo mezcla la textura más suavemente mientras que un número más alto mezcla la textura más bruscamente.


  • bool vertex_color_is_srgb

Default

false

Setter

set_flag(value)

Getter

get_flag()

Si true, los colores de los vértices del modelo se procesan como modo sRGB.


  • bool vertex_color_use_as_albedo

Default

false

Setter

set_flag(value)

Getter

get_flag()

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

Descripciones de Métodos

Devuelve true, si el Feature especificado está activado.


Devuelve true, si el flag especificado está activado. Ver el enumerador Flags para las opciones.


Devuelve la Texture asociada a la TextureParam especificada.


If true, enables the specified Feature. Many features that are available in SpatialMaterials 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.


If true, enables the specified flag. Flags are optional behaviour 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. See Flags enumerator for options.


Sets the Texture to be used by the specified TextureParam. This function is called when setting members ending in *_texture.