mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
614 lines
36 KiB
ReStructuredText
614 lines
36 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_GeometryInstance3D:
|
||
|
||
GeometryInstance3D
|
||
==================
|
||
|
||
**Hereda:** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||
|
||
**Heredado por:** :ref:`CPUParticles3D<class_CPUParticles3D>`, :ref:`CSGShape3D<class_CSGShape3D>`, :ref:`GPUParticles3D<class_GPUParticles3D>`, :ref:`Label3D<class_Label3D>`, :ref:`MeshInstance3D<class_MeshInstance3D>`, :ref:`MultiMeshInstance3D<class_MultiMeshInstance3D>`, :ref:`SpriteBase3D<class_SpriteBase3D>`
|
||
|
||
Nodo base para instancias visuales basadas en la geometría.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Descripción
|
||
----------------------
|
||
|
||
Nodo base para instancias visuales basadas en la geometría. Comparte algunas funciones comunes como la visibilidad y los materiales personalizados.
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
Tutoriales
|
||
--------------------
|
||
|
||
- :doc:`Visibility ranges (HLOD) <../tutorials/3d/visibility_ranges>`
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Propiedades
|
||
----------------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` | :ref:`cast_shadow<class_GeometryInstance3D_property_cast_shadow>` | ``1`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`AABB<class_AABB>` | :ref:`custom_aabb<class_GeometryInstance3D_property_custom_aabb>` | ``AABB(0, 0, 0, 0, 0, 0)`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`float<class_float>` | :ref:`extra_cull_margin<class_GeometryInstance3D_property_extra_cull_margin>` | ``0.0`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` | :ref:`gi_lightmap_scale<class_GeometryInstance3D_property_gi_lightmap_scale>` | ``0`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`float<class_float>` | :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` | ``1.0`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`GIMode<enum_GeometryInstance3D_GIMode>` | :ref:`gi_mode<class_GeometryInstance3D_property_gi_mode>` | ``1`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`ignore_occlusion_culling<class_GeometryInstance3D_property_ignore_occlusion_culling>` | ``false`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`float<class_float>` | :ref:`lod_bias<class_GeometryInstance3D_property_lod_bias>` | ``1.0`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`Material<class_Material>` | :ref:`material_overlay<class_GeometryInstance3D_property_material_overlay>` | |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`Material<class_Material>` | :ref:`material_override<class_GeometryInstance3D_property_material_override>` | |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`float<class_float>` | :ref:`transparency<class_GeometryInstance3D_property_transparency>` | ``0.0`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`float<class_float>` | :ref:`visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>` | ``0.0`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`float<class_float>` | :ref:`visibility_range_begin_margin<class_GeometryInstance3D_property_visibility_range_begin_margin>` | ``0.0`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`float<class_float>` | :ref:`visibility_range_end<class_GeometryInstance3D_property_visibility_range_end>` | ``0.0`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`float<class_float>` | :ref:`visibility_range_end_margin<class_GeometryInstance3D_property_visibility_range_end_margin>` | ``0.0`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
| :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` | :ref:`visibility_range_fade_mode<class_GeometryInstance3D_property_visibility_range_fade_mode>` | ``0`` |
|
||
+---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
Métodos
|
||
--------------
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Variant<class_Variant>` | :ref:`get_instance_shader_parameter<class_GeometryInstance3D_method_get_instance_shader_parameter>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
|
||
+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`set_instance_shader_parameter<class_GeometryInstance3D_method_set_instance_shader_parameter>`\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |
|
||
+-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Enumeraciones
|
||
--------------------------
|
||
|
||
.. _enum_GeometryInstance3D_ShadowCastingSetting:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **ShadowCastingSetting**: :ref:`🔗<enum_GeometryInstance3D_ShadowCastingSetting>`
|
||
|
||
.. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_OFF:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **SHADOW_CASTING_SETTING_OFF** = ``0``
|
||
|
||
No proyectará ninguna sombra. Utiliza esto para mejorar el rendimiento de geometrías pequeñas que es poco probable que proyecten sombras notables (como escombros).
|
||
|
||
.. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_ON:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **SHADOW_CASTING_SETTING_ON** = ``1``
|
||
|
||
Will cast shadows from all visible faces in the GeometryInstance3D.
|
||
|
||
Will take culling into account, so faces not being rendered will not be taken into account when shadow casting.
|
||
|
||
.. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_DOUBLE_SIDED:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **SHADOW_CASTING_SETTING_DOUBLE_SIDED** = ``2``
|
||
|
||
Will cast shadows from all visible faces in the GeometryInstance3D.
|
||
|
||
Will not take culling into account, so all faces will be taken into account when shadow casting.
|
||
|
||
.. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_SHADOWS_ONLY:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **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.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_GeometryInstance3D_GIMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **GIMode**: :ref:`🔗<enum_GeometryInstance3D_GIMode>`
|
||
|
||
.. _class_GeometryInstance3D_constant_GI_MODE_DISABLED:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GIMode<enum_GeometryInstance3D_GIMode>` **GI_MODE_DISABLED** = ``0``
|
||
|
||
Modo de iluminación global deshabilitado. Usar para objetos dinámicos que no contribuyen a la iluminación global (como personajes). Cuando se usa :ref:`VoxelGI<class_VoxelGI>` y SDFGI, la geometría *recibirá* iluminación indirecta y reflejos, pero la geometría no se considerará en el procesado de la IG.
|
||
|
||
.. _class_GeometryInstance3D_constant_GI_MODE_STATIC:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GIMode<enum_GeometryInstance3D_GIMode>` **GI_MODE_STATIC** = ``1``
|
||
|
||
Modo de iluminación global procesada. Usar para objetos estáticos que contribuyen a la iluminación global (como la geometría del nivel). Este modo de IG es efectivo cuando se usa :ref:`VoxelGI<class_VoxelGI>`, SDFGI y :ref:`LightmapGI<class_LightmapGI>`.
|
||
|
||
.. _class_GeometryInstance3D_constant_GI_MODE_DYNAMIC:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`GIMode<enum_GeometryInstance3D_GIMode>` **GI_MODE_DYNAMIC** = ``2``
|
||
|
||
Dynamic global illumination mode. Use for dynamic objects that contribute to global illumination. This GI mode is only effective when using :ref:`VoxelGI<class_VoxelGI>`, but it has a higher performance impact than :ref:`GI_MODE_STATIC<class_GeometryInstance3D_constant_GI_MODE_STATIC>`. When using other GI methods, this will act the same as :ref:`GI_MODE_DISABLED<class_GeometryInstance3D_constant_GI_MODE_DISABLED>`. When using :ref:`LightmapGI<class_LightmapGI>`, the object will receive indirect lighting using lightmap probes instead of using the baked lightmap texture.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_GeometryInstance3D_LightmapScale:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **LightmapScale**: :ref:`🔗<enum_GeometryInstance3D_LightmapScale>`
|
||
|
||
.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_1X:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_1X** = ``0``
|
||
|
||
**Obsoleto:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
|
||
|
||
La densidad de texel estándar para el lightmapping con :ref:`LightmapGI<class_LightmapGI>`.
|
||
|
||
.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_2X:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_2X** = ``1``
|
||
|
||
**Obsoleto:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
|
||
|
||
Multiplica la densidad de texel por 2× para el lightmapping con :ref:`LightmapGI<class_LightmapGI>`. Para garantizar la consistencia en la densidad de texel, utiliza esto al escalar una malla por un factor entre 1.5 y 3.0.
|
||
|
||
.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_4X:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_4X** = ``2``
|
||
|
||
**Obsoleto:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
|
||
|
||
Multiplica la densidad de texel por 4× para el lightmapping con :ref:`LightmapGI<class_LightmapGI>`. Para garantizar la consistencia en la densidad de texel, utiliza esto al escalar una malla por un factor entre 3.0 y 6.0.
|
||
|
||
.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_8X:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_8X** = ``3``
|
||
|
||
**Obsoleto:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
|
||
|
||
Multiplica la densidad de texel por 8× para el lightmapping con :ref:`LightmapGI<class_LightmapGI>`. Para garantizar la consistencia en la densidad de texel, utiliza esto al escalar una malla por un factor mayor que 6.0.
|
||
|
||
.. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_MAX:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_MAX** = ``4``
|
||
|
||
**Obsoleto:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
|
||
|
||
Representa el tamaño del enum :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _enum_GeometryInstance3D_VisibilityRangeFadeMode:
|
||
|
||
.. rst-class:: classref-enumeration
|
||
|
||
enum **VisibilityRangeFadeMode**: :ref:`🔗<enum_GeometryInstance3D_VisibilityRangeFadeMode>`
|
||
|
||
.. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **VISIBILITY_RANGE_FADE_DISABLED** = ``0``
|
||
|
||
No se atenuará a sí mismo ni a sus dependencias de visibilidad, en su lugar se utilizará la histéresis. Este es el enfoque más rápido para el LOD manual, pero puede resultar en transiciones de LOD notables dependiendo de cómo se creen las mallas LOD. Véase :ref:`visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>` y :ref:`Node3D.visibility_parent<class_Node3D_property_visibility_parent>` para más información.
|
||
|
||
.. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_SELF:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **VISIBILITY_RANGE_FADE_SELF** = ``1``
|
||
|
||
Se desvanecerá cuando alcance los límites de su propio rango de visibilidad. Esto es más lento que :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>`, pero puede proporcionar transiciones más suaves. El rango de desvanecimiento está determinado por :ref:`visibility_range_begin_margin<class_GeometryInstance3D_property_visibility_range_begin_margin>` y :ref:`visibility_range_end_margin<class_GeometryInstance3D_property_visibility_range_end_margin>`.
|
||
|
||
\ **Nota:** Solo se admite cuando se utiliza el método de renderizado Forward+. Cuando se utiliza el método de renderizado Móvil o de Compatibilidad, este modo actúa como :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>` pero con la histéresis desactivada.
|
||
|
||
.. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DEPENDENCIES:
|
||
|
||
.. rst-class:: classref-enumeration-constant
|
||
|
||
:ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **VISIBILITY_RANGE_FADE_DEPENDENCIES** = ``2``
|
||
|
||
Aparecerán gradualmente sus dependencias de visibilidad (véase :ref:`Node3D.visibility_parent<class_Node3D_property_visibility_parent>`) cuando alcance los límites de su propio rango de visibilidad. Esto es más lento que :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>`, pero puede proporcionar transiciones más suaves. El rango de desvanecimiento está determinado por :ref:`visibility_range_begin_margin<class_GeometryInstance3D_property_visibility_range_begin_margin>` y :ref:`visibility_range_end_margin<class_GeometryInstance3D_property_visibility_range_end_margin>`.
|
||
|
||
\ **Nota:** Sólo se admite cuando se utiliza el método de renderizado Forward+. Cuando se utiliza el método de renderizado Móvil o de Compatibilidad, este modo actúa como :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>` pero con la histéresis desactivada.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Descripciones de Propiedades
|
||
--------------------------------------------------------
|
||
|
||
.. _class_GeometryInstance3D_property_cast_shadow:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **cast_shadow** = ``1`` :ref:`🔗<class_GeometryInstance3D_property_cast_shadow>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_cast_shadows_setting**\ (\ value\: :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>`\ )
|
||
- :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **get_cast_shadows_setting**\ (\ )
|
||
|
||
The mode used to cast shadows from this instance.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_custom_aabb:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`AABB<class_AABB>` **custom_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` :ref:`🔗<class_GeometryInstance3D_property_custom_aabb>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_custom_aabb**\ (\ value\: :ref:`AABB<class_AABB>`\ )
|
||
- :ref:`AABB<class_AABB>` **get_custom_aabb**\ (\ )
|
||
|
||
Overrides the bounding box of this node with a custom one. This can be used to avoid the expensive :ref:`AABB<class_AABB>` recalculation that happens when a skeleton is used with a :ref:`MeshInstance3D<class_MeshInstance3D>` or to have precise control over the :ref:`MeshInstance3D<class_MeshInstance3D>`'s bounding box. To use the default AABB, set value to an :ref:`AABB<class_AABB>` with all fields set to ``0.0``. To avoid frustum culling, set :ref:`custom_aabb<class_GeometryInstance3D_property_custom_aabb>` to a very large AABB that covers your entire game world such as ``AABB(-10000, -10000, -10000, 20000, 20000, 20000)``. To disable all forms of culling (including occlusion culling), call :ref:`RenderingServer.instance_set_ignore_culling()<class_RenderingServer_method_instance_set_ignore_culling>` on the **GeometryInstance3D**'s :ref:`RID<class_RID>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_extra_cull_margin:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **extra_cull_margin** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_extra_cull_margin>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_extra_cull_margin**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_extra_cull_margin**\ (\ )
|
||
|
||
The extra distance added to the GeometryInstance3D's bounding box (:ref:`AABB<class_AABB>`) to increase its cull box.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_gi_lightmap_scale:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **gi_lightmap_scale** = ``0`` :ref:`🔗<class_GeometryInstance3D_property_gi_lightmap_scale>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_lightmap_scale**\ (\ value\: :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>`\ )
|
||
- :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **get_lightmap_scale**\ (\ )
|
||
|
||
**Obsoleto:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
|
||
|
||
The texel density to use for lightmapping in :ref:`LightmapGI<class_LightmapGI>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_gi_lightmap_texel_scale:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **gi_lightmap_texel_scale** = ``1.0`` :ref:`🔗<class_GeometryInstance3D_property_gi_lightmap_texel_scale>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_lightmap_texel_scale**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_lightmap_texel_scale**\ (\ )
|
||
|
||
The texel density to use for lightmapping in :ref:`LightmapGI<class_LightmapGI>`. Greater scale values provide higher resolution in the lightmap, which can result in sharper shadows for lights that have both direct and indirect light baked. However, greater scale values will also increase the space taken by the mesh in the lightmap texture, which increases the memory, storage, and bake time requirements. When using a single mesh at different scales, consider adjusting this value to keep the lightmap texel density consistent across meshes.
|
||
|
||
For example, doubling :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` doubles the lightmap texture resolution for this object *on each axis*, so it will *quadruple* the texel count.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_gi_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`GIMode<enum_GeometryInstance3D_GIMode>` **gi_mode** = ``1`` :ref:`🔗<class_GeometryInstance3D_property_gi_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_gi_mode**\ (\ value\: :ref:`GIMode<enum_GeometryInstance3D_GIMode>`\ )
|
||
- :ref:`GIMode<enum_GeometryInstance3D_GIMode>` **get_gi_mode**\ (\ )
|
||
|
||
The global illumination mode to use for the whole geometry. To avoid inconsistent results, use a mode that matches the purpose of the mesh during gameplay (static/dynamic).
|
||
|
||
\ **Note:** Lights' bake mode will also affect the global illumination rendering. See :ref:`Light3D.light_bake_mode<class_Light3D_property_light_bake_mode>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_ignore_occlusion_culling:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`bool<class_bool>` **ignore_occlusion_culling** = ``false`` :ref:`🔗<class_GeometryInstance3D_property_ignore_occlusion_culling>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_ignore_occlusion_culling**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||
- :ref:`bool<class_bool>` **is_ignoring_occlusion_culling**\ (\ )
|
||
|
||
If ``true``, disables occlusion culling for this instance. Useful for gizmos that must be rendered even when occlusion culling is in use.
|
||
|
||
\ **Note:** :ref:`ignore_occlusion_culling<class_GeometryInstance3D_property_ignore_occlusion_culling>` does not affect frustum culling (which is what happens when an object is not visible given the camera's angle). To avoid frustum culling, set :ref:`custom_aabb<class_GeometryInstance3D_property_custom_aabb>` to a very large AABB that covers your entire game world such as ``AABB(-10000, -10000, -10000, 20000, 20000, 20000)``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_lod_bias:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **lod_bias** = ``1.0`` :ref:`🔗<class_GeometryInstance3D_property_lod_bias>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_lod_bias**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_lod_bias**\ (\ )
|
||
|
||
Changes how quickly the mesh transitions to a lower level of detail. A value of 0 will force the mesh to its lowest level of detail, a value of 1 will use the default settings, and larger values will keep the mesh in a higher level of detail at farther distances.
|
||
|
||
Useful for testing level of detail transitions in the editor.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_material_overlay:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Material<class_Material>` **material_overlay** :ref:`🔗<class_GeometryInstance3D_property_material_overlay>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_material_overlay**\ (\ value\: :ref:`Material<class_Material>`\ )
|
||
- :ref:`Material<class_Material>` **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.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_material_override:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`Material<class_Material>` **material_override** :ref:`🔗<class_GeometryInstance3D_property_material_override>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_material_override**\ (\ value\: :ref:`Material<class_Material>`\ )
|
||
- :ref:`Material<class_Material>` **get_material_override**\ (\ )
|
||
|
||
La sobrescritura 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.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_transparency:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **transparency** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_transparency>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_transparency**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_transparency**\ (\ )
|
||
|
||
The transparency applied to the whole geometry (as a multiplier of the materials' existing transparency). ``0.0`` is fully opaque, while ``1.0`` is fully transparent. Values greater than ``0.0`` (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting :ref:`transparency<class_GeometryInstance3D_property_transparency>` to a value greater than ``0.0`` (exclusive) will *not* disable shadow rendering.
|
||
|
||
In spatial shaders, ``1.0 - transparency`` is set as the default value of the ``ALPHA`` built-in.
|
||
|
||
\ **Note:** :ref:`transparency<class_GeometryInstance3D_property_transparency>` is clamped between ``0.0`` and ``1.0``, so this property cannot be used to make transparent materials more opaque than they originally are.
|
||
|
||
\ **Note:** Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, :ref:`transparency<class_GeometryInstance3D_property_transparency>` is ignored and is considered as always being ``0.0``.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_visibility_range_begin:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **visibility_range_begin** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_begin>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_visibility_range_begin**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_visibility_range_begin**\ (\ )
|
||
|
||
Starting distance from which the GeometryInstance3D will be visible, taking :ref:`visibility_range_begin_margin<class_GeometryInstance3D_property_visibility_range_begin_margin>` into account as well. The default value of 0 is used to disable the range check.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_visibility_range_begin_margin:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **visibility_range_begin_margin** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_begin_margin>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_visibility_range_begin_margin**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_visibility_range_begin_margin**\ (\ )
|
||
|
||
Margin for the :ref:`visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>` threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the :ref:`visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>` threshold by this amount.
|
||
|
||
If :ref:`visibility_range_fade_mode<class_GeometryInstance3D_property_visibility_range_fade_mode>` is :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>`, this acts as a hysteresis distance. If :ref:`visibility_range_fade_mode<class_GeometryInstance3D_property_visibility_range_fade_mode>` is :ref:`VISIBILITY_RANGE_FADE_SELF<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_SELF>` or :ref:`VISIBILITY_RANGE_FADE_DEPENDENCIES<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DEPENDENCIES>`, this acts as a fade transition distance and must be set to a value greater than ``0.0`` for the effect to be noticeable.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_visibility_range_end:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **visibility_range_end** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_end>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_visibility_range_end**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_visibility_range_end**\ (\ )
|
||
|
||
Distance from which the GeometryInstance3D will be hidden, taking :ref:`visibility_range_end_margin<class_GeometryInstance3D_property_visibility_range_end_margin>` into account as well. The default value of 0 is used to disable the range check.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_visibility_range_end_margin:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`float<class_float>` **visibility_range_end_margin** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_end_margin>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_visibility_range_end_margin**\ (\ value\: :ref:`float<class_float>`\ )
|
||
- :ref:`float<class_float>` **get_visibility_range_end_margin**\ (\ )
|
||
|
||
Margin for the :ref:`visibility_range_end<class_GeometryInstance3D_property_visibility_range_end>` threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the :ref:`visibility_range_end<class_GeometryInstance3D_property_visibility_range_end>` threshold by this amount.
|
||
|
||
If :ref:`visibility_range_fade_mode<class_GeometryInstance3D_property_visibility_range_fade_mode>` is :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>`, this acts as a hysteresis distance. If :ref:`visibility_range_fade_mode<class_GeometryInstance3D_property_visibility_range_fade_mode>` is :ref:`VISIBILITY_RANGE_FADE_SELF<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_SELF>` or :ref:`VISIBILITY_RANGE_FADE_DEPENDENCIES<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DEPENDENCIES>`, this acts as a fade transition distance and must be set to a value greater than ``0.0`` for the effect to be noticeable.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_property_visibility_range_fade_mode:
|
||
|
||
.. rst-class:: classref-property
|
||
|
||
:ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **visibility_range_fade_mode** = ``0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_fade_mode>`
|
||
|
||
.. rst-class:: classref-property-setget
|
||
|
||
- |void| **set_visibility_range_fade_mode**\ (\ value\: :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>`\ )
|
||
- :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **get_visibility_range_fade_mode**\ (\ )
|
||
|
||
Controls which instances will be faded when approaching the limits of the visibility range.
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
Descripciones de Métodos
|
||
------------------------------------------------
|
||
|
||
.. _class_GeometryInstance3D_method_get_instance_shader_parameter:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Variant<class_Variant>` **get_instance_shader_parameter**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_GeometryInstance3D_method_get_instance_shader_parameter>`
|
||
|
||
Get the value of a shader parameter as set on this instance.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_GeometryInstance3D_method_set_instance_shader_parameter:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **set_instance_shader_parameter**\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_GeometryInstance3D_method_set_instance_shader_parameter>`
|
||
|
||
Set the value of a shader uniform for this instance only (`per-instance uniform <../tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms>`__). See also :ref:`ShaderMaterial.set_shader_parameter()<class_ShaderMaterial_method_set_shader_parameter>` to assign a uniform on all instances using the same :ref:`ShaderMaterial<class_ShaderMaterial>`.
|
||
|
||
\ **Note:** For a shader uniform to be assignable on a per-instance basis, it *must* be defined with ``instance uniform ...`` rather than ``uniform ...`` in the shader code.
|
||
|
||
\ **Note:** ``name`` is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector).
|
||
|
||
\ **Note:** Per-instance shader uniforms are only available in Spatial and CanvasItem shaders, but not for Fog, Sky, or Particles shaders.
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (Normalmente, este método debería ser sobreescrito por el usuario para que tenga algún efecto.)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (Este método no tiene efectos secundarios. No modifica ninguna de las variables miembro de la instancia.)`
|
||
.. |vararg| replace:: :abbr:`vararg (Este método permite agregar cualquier número de argumentos después de los descritos aquí.)`
|
||
.. |constructor| replace:: :abbr:`constructor (Este método se utiliza para construir un tipo.)`
|
||
.. |static| replace:: :abbr:`static (Este método no necesita una instancia para ser llamado, por lo que puede llamarse directamente utilizando el nombre de la clase.)`
|
||
.. |operator| replace:: :abbr:`operator (Este método describe un operador válido para usar con este tipo como operando izquierdo.)`
|
||
.. |bitfield| replace:: :abbr:`BitField (Este valor es un entero compuesto como una máscara de bits de las siguientes banderas.)`
|
||
.. |void| replace:: :abbr:`void (Sin valor de retorno.)`
|