Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
GeometryInstance¶
Inherits: VisualInstance < CullInstance < Spatial < Node < Object
Inherited By: CPUParticles, CSGShape, ImmediateGeometry, MeshInstance, MultiMeshInstance, Particles, SpriteBase3D
Nodo base para instancias visuales basadas en la geometría.
Descripción¶
Nodo base para instancias visuales basadas en la geometría. Comparte algunas funciones comunes como la visibilidad y los materiales personalizados.
Propiedades¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Métodos¶
void |
set_custom_aabb ( AABB aabb ) |
void |
Enumeraciones¶
enum LightmapScale:
LIGHTMAP_SCALE_1X = 0 --- The generated lightmap texture will have the original size.
LIGHTMAP_SCALE_2X = 1 --- The generated lightmap texture will be twice as large, on each axis.
LIGHTMAP_SCALE_4X = 2 --- The generated lightmap texture will be 4 times as large, on each axis.
LIGHTMAP_SCALE_8X = 3 --- The generated lightmap texture will be 8 times as large, on each axis.
LIGHTMAP_SCALE_MAX = 4
enum ShadowCastingSetting:
SHADOW_CASTING_SETTING_OFF = 0 --- No arrojará ninguna sombra.
SHADOW_CASTING_SETTING_ON = 1 --- Will cast shadows from all visible faces in the GeometryInstance.
Will take culling into account, so faces not being rendered will not be taken into account when shadow casting.
SHADOW_CASTING_SETTING_DOUBLE_SIDED = 2 --- Will cast shadows from all visible faces in the GeometryInstance.
Will not take culling into account, so all faces will be taken into account when shadow casting.
SHADOW_CASTING_SETTING_SHADOWS_ONLY = 3 --- Sólo mostrará las sombras proyectadas por este objeto.
En otras palabras, la malla real no será visible, sólo las sombras proyectadas desde la malla lo serán.
enum Flags:
FLAG_USE_BAKED_LIGHT = 0 --- Will allow the GeometryInstance to be used when baking lights using a GIProbe or BakedLightmap.
FLAG_DRAW_NEXT_FRAME_IF_VISIBLE = 1 --- Unused in this class, exposed for consistency with InstanceFlags.
FLAG_MAX = 2 --- Representa el tamaño del enum Flags.
Descripciones de Propiedades¶
ShadowCastingSetting cast_shadow
Default |
|
Setter |
set_cast_shadows_setting(value) |
Getter |
get_cast_shadows_setting() |
El flag de sombra seleccionada. Ver ShadowCastingSetting para los posibles valores.
float extra_cull_margin
Default |
|
Setter |
set_extra_cull_margin(value) |
Getter |
get_extra_cull_margin() |
The extra distance added to the GeometryInstance's bounding box (AABB) to increase its cull box.
bool generate_lightmap
Default |
|
Setter |
set_generate_lightmap(value) |
Getter |
get_generate_lightmap() |
When disabled, the mesh will be taken into account when computing indirect lighting, but the resulting lightmap will not be saved. Useful for emissive only materials or shadow casters.
LightmapScale lightmap_scale
Default |
|
Setter |
set_lightmap_scale(value) |
Getter |
get_lightmap_scale() |
Scale factor for the generated baked lightmap. Useful for adding detail to certain mesh instances.
float lod_max_distance
Default |
|
Setter |
set_lod_max_distance(value) |
Getter |
get_lod_max_distance() |
The GeometryInstance's max LOD distance.
Note: This property currently has no effect.
float lod_max_hysteresis
Default |
|
Setter |
set_lod_max_hysteresis(value) |
Getter |
get_lod_max_hysteresis() |
The GeometryInstance's max LOD margin.
Note: This property currently has no effect.
float lod_min_distance
Default |
|
Setter |
set_lod_min_distance(value) |
Getter |
get_lod_min_distance() |
The GeometryInstance's min LOD distance.
Note: This property currently has no effect.
float lod_min_hysteresis
Default |
|
Setter |
set_lod_min_hysteresis(value) |
Getter |
get_lod_min_hysteresis() |
The GeometryInstance's min LOD margin.
Note: This property currently has no effect.
Material material_overlay
Setter |
set_material_overlay(value) |
Getter |
get_material_overlay() |
The material overlay for the whole geometry.
If a material is assigned to this property, it will be rendered on top of any other active material for all the surfaces.
Material material_override
Setter |
set_material_override(value) |
Getter |
get_material_override() |
La sobreescritura del material para toda la geometría.
Si se asigna un material a esta propiedad, se utilizará en lugar de cualquier material establecido en cualquier ranura de material de la malla.
bool use_in_baked_light
Default |
|
Setter |
set_flag(value) |
Getter |
get_flag() |
If true
, this GeometryInstance will be used when baking lights using a GIProbe or BakedLightmap.
Descripciones de Métodos¶
Returns the Flags that have been set for this object.
void set_custom_aabb ( AABB aabb )
Anula el cuadro delimitador de este nodo con uno personalizado. Para eliminarlo, establece un AABB con todos los campos puestos a cero.