123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GeometryInstance3D.xml.
- .. _class_GeometryInstance3D:
- GeometryInstance3D
- ==================
- **Inherits:** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
- **Inherited By:** :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>`
- Base node for geometry-based visual instances.
- .. rst-class:: classref-introduction-group
- Description
- -----------
- Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials.
- .. rst-class:: classref-introduction-group
- Tutorials
- ---------
- - :doc:`Visibility ranges (HLOD) <../tutorials/3d/visibility_ranges>`
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. 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
- Methods
- -------
- .. 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
- Enumerations
- ------------
- .. _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``
- Will not cast any shadows. Use this to improve performance for small geometry that is unlikely to cast noticeable shadows (such as debris).
- .. _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``
- Will only show the shadows casted from this object.
- In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be.
- .. 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``
- Disabled global illumination mode. Use for dynamic objects that do not contribute to global illumination (such as characters). When using :ref:`VoxelGI<class_VoxelGI>` and SDFGI, the geometry will *receive* indirect lighting and reflections but the geometry will not be considered in GI baking.
- .. _class_GeometryInstance3D_constant_GI_MODE_STATIC:
- .. rst-class:: classref-enumeration-constant
- :ref:`GIMode<enum_GeometryInstance3D_GIMode>` **GI_MODE_STATIC** = ``1``
- Baked global illumination mode. Use for static objects that contribute to global illumination (such as level geometry). This GI mode is effective when using :ref:`VoxelGI<class_VoxelGI>`, SDFGI and :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``
- **Deprecated:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
- The standard texel density for lightmapping with :ref:`LightmapGI<class_LightmapGI>`.
- .. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_2X:
- .. rst-class:: classref-enumeration-constant
- :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_2X** = ``1``
- **Deprecated:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
- Multiplies texel density by 2× for lightmapping with :ref:`LightmapGI<class_LightmapGI>`. To ensure consistency in texel density, use this when scaling a mesh by a factor between 1.5 and 3.0.
- .. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_4X:
- .. rst-class:: classref-enumeration-constant
- :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_4X** = ``2``
- **Deprecated:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
- Multiplies texel density by 4× for lightmapping with :ref:`LightmapGI<class_LightmapGI>`. To ensure consistency in texel density, use this when scaling a mesh by a factor between 3.0 and 6.0.
- .. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_8X:
- .. rst-class:: classref-enumeration-constant
- :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_8X** = ``3``
- **Deprecated:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
- Multiplies texel density by 8× for lightmapping with :ref:`LightmapGI<class_LightmapGI>`. To ensure consistency in texel density, use this when scaling a mesh by a factor greater than 6.0.
- .. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_MAX:
- .. rst-class:: classref-enumeration-constant
- :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_MAX** = ``4``
- **Deprecated:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
- Represents the size of the :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` enum.
- .. 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``
- Will not fade itself nor its visibility dependencies, hysteresis will be used instead. This is the fastest approach to manual LOD, but it can result in noticeable LOD transitions depending on how the LOD meshes are authored. See :ref:`visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>` and :ref:`Node3D.visibility_parent<class_Node3D_property_visibility_parent>` for more information.
- .. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_SELF:
- .. rst-class:: classref-enumeration-constant
- :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **VISIBILITY_RANGE_FADE_SELF** = ``1``
- Will fade-out itself when reaching the limits of its own visibility range. This is slower than :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>`, but it can provide smoother transitions. The fading range is determined by :ref:`visibility_range_begin_margin<class_GeometryInstance3D_property_visibility_range_begin_margin>` and :ref:`visibility_range_end_margin<class_GeometryInstance3D_property_visibility_range_end_margin>`.
- \ **Note:** Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>` but with hysteresis disabled.
- .. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DEPENDENCIES:
- .. rst-class:: classref-enumeration-constant
- :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **VISIBILITY_RANGE_FADE_DEPENDENCIES** = ``2``
- Will fade-in its visibility dependencies (see :ref:`Node3D.visibility_parent<class_Node3D_property_visibility_parent>`) when reaching the limits of its own visibility range. This is slower than :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>`, but it can provide smoother transitions. The fading range is determined by :ref:`visibility_range_begin_margin<class_GeometryInstance3D_property_visibility_range_begin_margin>` and :ref:`visibility_range_end_margin<class_GeometryInstance3D_property_visibility_range_end_margin>`.
- \ **Note:** Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like :ref:`VISIBILITY_RANGE_FADE_DISABLED<class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED>` but with hysteresis disabled.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _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 selected shadow casting flag. See :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` for possible values.
- .. 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**\ (\ )
- **Deprecated:** 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**\ (\ )
- The material override for the whole geometry.
- If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh.
- .. 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. See :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` for possible values.
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Method Descriptions
- -------------------
- .. _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 currently only available in 3D, so there is no 2D equivalent of this method.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
- .. |void| replace:: :abbr:`void (No return value.)`
|