class_geometryinstance3d.rst 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GeometryInstance3D.xml.
  6. .. _class_GeometryInstance3D:
  7. GeometryInstance3D
  8. ==================
  9. **Inherits:** :ref:`VisualInstance3D<class_VisualInstance3D>` **<** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **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>`
  11. Base node for geometry-based visual instances.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Visibility ranges (HLOD) <../tutorials/3d/visibility_ranges>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  26. | :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` | :ref:`cast_shadow<class_GeometryInstance3D_property_cast_shadow>` | ``1`` |
  27. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  28. | :ref:`AABB<class_AABB>` | :ref:`custom_aabb<class_GeometryInstance3D_property_custom_aabb>` | ``AABB(0, 0, 0, 0, 0, 0)`` |
  29. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  30. | :ref:`float<class_float>` | :ref:`extra_cull_margin<class_GeometryInstance3D_property_extra_cull_margin>` | ``0.0`` |
  31. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  32. | :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` | :ref:`gi_lightmap_scale<class_GeometryInstance3D_property_gi_lightmap_scale>` | ``0`` |
  33. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  34. | :ref:`float<class_float>` | :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` | ``1.0`` |
  35. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  36. | :ref:`GIMode<enum_GeometryInstance3D_GIMode>` | :ref:`gi_mode<class_GeometryInstance3D_property_gi_mode>` | ``1`` |
  37. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  38. | :ref:`bool<class_bool>` | :ref:`ignore_occlusion_culling<class_GeometryInstance3D_property_ignore_occlusion_culling>` | ``false`` |
  39. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  40. | :ref:`float<class_float>` | :ref:`lod_bias<class_GeometryInstance3D_property_lod_bias>` | ``1.0`` |
  41. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  42. | :ref:`Material<class_Material>` | :ref:`material_overlay<class_GeometryInstance3D_property_material_overlay>` | |
  43. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  44. | :ref:`Material<class_Material>` | :ref:`material_override<class_GeometryInstance3D_property_material_override>` | |
  45. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  46. | :ref:`float<class_float>` | :ref:`transparency<class_GeometryInstance3D_property_transparency>` | ``0.0`` |
  47. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  48. | :ref:`float<class_float>` | :ref:`visibility_range_begin<class_GeometryInstance3D_property_visibility_range_begin>` | ``0.0`` |
  49. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  50. | :ref:`float<class_float>` | :ref:`visibility_range_begin_margin<class_GeometryInstance3D_property_visibility_range_begin_margin>` | ``0.0`` |
  51. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  52. | :ref:`float<class_float>` | :ref:`visibility_range_end<class_GeometryInstance3D_property_visibility_range_end>` | ``0.0`` |
  53. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  54. | :ref:`float<class_float>` | :ref:`visibility_range_end_margin<class_GeometryInstance3D_property_visibility_range_end_margin>` | ``0.0`` |
  55. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  56. | :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` | :ref:`visibility_range_fade_mode<class_GeometryInstance3D_property_visibility_range_fade_mode>` | ``0`` |
  57. +---------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------+----------------------------+
  58. .. rst-class:: classref-reftable-group
  59. Methods
  60. -------
  61. .. table::
  62. :widths: auto
  63. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`Variant<class_Variant>` | :ref:`get_instance_shader_parameter<class_GeometryInstance3D_method_get_instance_shader_parameter>`\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| |
  65. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | |void| | :ref:`set_instance_shader_parameter<class_GeometryInstance3D_method_set_instance_shader_parameter>`\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) |
  67. +-------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. .. rst-class:: classref-section-separator
  69. ----
  70. .. rst-class:: classref-descriptions-group
  71. Enumerations
  72. ------------
  73. .. _enum_GeometryInstance3D_ShadowCastingSetting:
  74. .. rst-class:: classref-enumeration
  75. enum **ShadowCastingSetting**: :ref:`🔗<enum_GeometryInstance3D_ShadowCastingSetting>`
  76. .. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_OFF:
  77. .. rst-class:: classref-enumeration-constant
  78. :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **SHADOW_CASTING_SETTING_OFF** = ``0``
  79. Will not cast any shadows. Use this to improve performance for small geometry that is unlikely to cast noticeable shadows (such as debris).
  80. .. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_ON:
  81. .. rst-class:: classref-enumeration-constant
  82. :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **SHADOW_CASTING_SETTING_ON** = ``1``
  83. Will cast shadows from all visible faces in the GeometryInstance3D.
  84. Will take culling into account, so faces not being rendered will not be taken into account when shadow casting.
  85. .. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_DOUBLE_SIDED:
  86. .. rst-class:: classref-enumeration-constant
  87. :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **SHADOW_CASTING_SETTING_DOUBLE_SIDED** = ``2``
  88. Will cast shadows from all visible faces in the GeometryInstance3D.
  89. Will not take culling into account, so all faces will be taken into account when shadow casting.
  90. .. _class_GeometryInstance3D_constant_SHADOW_CASTING_SETTING_SHADOWS_ONLY:
  91. .. rst-class:: classref-enumeration-constant
  92. :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **SHADOW_CASTING_SETTING_SHADOWS_ONLY** = ``3``
  93. Will only show the shadows casted from this object.
  94. In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be.
  95. .. rst-class:: classref-item-separator
  96. ----
  97. .. _enum_GeometryInstance3D_GIMode:
  98. .. rst-class:: classref-enumeration
  99. enum **GIMode**: :ref:`🔗<enum_GeometryInstance3D_GIMode>`
  100. .. _class_GeometryInstance3D_constant_GI_MODE_DISABLED:
  101. .. rst-class:: classref-enumeration-constant
  102. :ref:`GIMode<enum_GeometryInstance3D_GIMode>` **GI_MODE_DISABLED** = ``0``
  103. 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.
  104. .. _class_GeometryInstance3D_constant_GI_MODE_STATIC:
  105. .. rst-class:: classref-enumeration-constant
  106. :ref:`GIMode<enum_GeometryInstance3D_GIMode>` **GI_MODE_STATIC** = ``1``
  107. 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>`.
  108. .. _class_GeometryInstance3D_constant_GI_MODE_DYNAMIC:
  109. .. rst-class:: classref-enumeration-constant
  110. :ref:`GIMode<enum_GeometryInstance3D_GIMode>` **GI_MODE_DYNAMIC** = ``2``
  111. 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.
  112. .. rst-class:: classref-item-separator
  113. ----
  114. .. _enum_GeometryInstance3D_LightmapScale:
  115. .. rst-class:: classref-enumeration
  116. enum **LightmapScale**: :ref:`🔗<enum_GeometryInstance3D_LightmapScale>`
  117. .. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_1X:
  118. .. rst-class:: classref-enumeration-constant
  119. :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_1X** = ``0``
  120. **Deprecated:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
  121. The standard texel density for lightmapping with :ref:`LightmapGI<class_LightmapGI>`.
  122. .. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_2X:
  123. .. rst-class:: classref-enumeration-constant
  124. :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_2X** = ``1``
  125. **Deprecated:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
  126. 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.
  127. .. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_4X:
  128. .. rst-class:: classref-enumeration-constant
  129. :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_4X** = ``2``
  130. **Deprecated:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
  131. 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.
  132. .. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_8X:
  133. .. rst-class:: classref-enumeration-constant
  134. :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_8X** = ``3``
  135. **Deprecated:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
  136. 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.
  137. .. _class_GeometryInstance3D_constant_LIGHTMAP_SCALE_MAX:
  138. .. rst-class:: classref-enumeration-constant
  139. :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **LIGHTMAP_SCALE_MAX** = ``4``
  140. **Deprecated:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
  141. Represents the size of the :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` enum.
  142. .. rst-class:: classref-item-separator
  143. ----
  144. .. _enum_GeometryInstance3D_VisibilityRangeFadeMode:
  145. .. rst-class:: classref-enumeration
  146. enum **VisibilityRangeFadeMode**: :ref:`🔗<enum_GeometryInstance3D_VisibilityRangeFadeMode>`
  147. .. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DISABLED:
  148. .. rst-class:: classref-enumeration-constant
  149. :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **VISIBILITY_RANGE_FADE_DISABLED** = ``0``
  150. 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.
  151. .. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_SELF:
  152. .. rst-class:: classref-enumeration-constant
  153. :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **VISIBILITY_RANGE_FADE_SELF** = ``1``
  154. 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>`.
  155. \ **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.
  156. .. _class_GeometryInstance3D_constant_VISIBILITY_RANGE_FADE_DEPENDENCIES:
  157. .. rst-class:: classref-enumeration-constant
  158. :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **VISIBILITY_RANGE_FADE_DEPENDENCIES** = ``2``
  159. 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>`.
  160. \ **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.
  161. .. rst-class:: classref-section-separator
  162. ----
  163. .. rst-class:: classref-descriptions-group
  164. Property Descriptions
  165. ---------------------
  166. .. _class_GeometryInstance3D_property_cast_shadow:
  167. .. rst-class:: classref-property
  168. :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **cast_shadow** = ``1`` :ref:`🔗<class_GeometryInstance3D_property_cast_shadow>`
  169. .. rst-class:: classref-property-setget
  170. - |void| **set_cast_shadows_setting**\ (\ value\: :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>`\ )
  171. - :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` **get_cast_shadows_setting**\ (\ )
  172. The selected shadow casting flag. See :ref:`ShadowCastingSetting<enum_GeometryInstance3D_ShadowCastingSetting>` for possible values.
  173. .. rst-class:: classref-item-separator
  174. ----
  175. .. _class_GeometryInstance3D_property_custom_aabb:
  176. .. rst-class:: classref-property
  177. :ref:`AABB<class_AABB>` **custom_aabb** = ``AABB(0, 0, 0, 0, 0, 0)`` :ref:`🔗<class_GeometryInstance3D_property_custom_aabb>`
  178. .. rst-class:: classref-property-setget
  179. - |void| **set_custom_aabb**\ (\ value\: :ref:`AABB<class_AABB>`\ )
  180. - :ref:`AABB<class_AABB>` **get_custom_aabb**\ (\ )
  181. 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>`.
  182. .. rst-class:: classref-item-separator
  183. ----
  184. .. _class_GeometryInstance3D_property_extra_cull_margin:
  185. .. rst-class:: classref-property
  186. :ref:`float<class_float>` **extra_cull_margin** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_extra_cull_margin>`
  187. .. rst-class:: classref-property-setget
  188. - |void| **set_extra_cull_margin**\ (\ value\: :ref:`float<class_float>`\ )
  189. - :ref:`float<class_float>` **get_extra_cull_margin**\ (\ )
  190. The extra distance added to the GeometryInstance3D's bounding box (:ref:`AABB<class_AABB>`) to increase its cull box.
  191. .. rst-class:: classref-item-separator
  192. ----
  193. .. _class_GeometryInstance3D_property_gi_lightmap_scale:
  194. .. rst-class:: classref-property
  195. :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **gi_lightmap_scale** = ``0`` :ref:`🔗<class_GeometryInstance3D_property_gi_lightmap_scale>`
  196. .. rst-class:: classref-property-setget
  197. - |void| **set_lightmap_scale**\ (\ value\: :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>`\ )
  198. - :ref:`LightmapScale<enum_GeometryInstance3D_LightmapScale>` **get_lightmap_scale**\ (\ )
  199. **Deprecated:** Use :ref:`gi_lightmap_texel_scale<class_GeometryInstance3D_property_gi_lightmap_texel_scale>` instead.
  200. The texel density to use for lightmapping in :ref:`LightmapGI<class_LightmapGI>`.
  201. .. rst-class:: classref-item-separator
  202. ----
  203. .. _class_GeometryInstance3D_property_gi_lightmap_texel_scale:
  204. .. rst-class:: classref-property
  205. :ref:`float<class_float>` **gi_lightmap_texel_scale** = ``1.0`` :ref:`🔗<class_GeometryInstance3D_property_gi_lightmap_texel_scale>`
  206. .. rst-class:: classref-property-setget
  207. - |void| **set_lightmap_texel_scale**\ (\ value\: :ref:`float<class_float>`\ )
  208. - :ref:`float<class_float>` **get_lightmap_texel_scale**\ (\ )
  209. 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.
  210. 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.
  211. .. rst-class:: classref-item-separator
  212. ----
  213. .. _class_GeometryInstance3D_property_gi_mode:
  214. .. rst-class:: classref-property
  215. :ref:`GIMode<enum_GeometryInstance3D_GIMode>` **gi_mode** = ``1`` :ref:`🔗<class_GeometryInstance3D_property_gi_mode>`
  216. .. rst-class:: classref-property-setget
  217. - |void| **set_gi_mode**\ (\ value\: :ref:`GIMode<enum_GeometryInstance3D_GIMode>`\ )
  218. - :ref:`GIMode<enum_GeometryInstance3D_GIMode>` **get_gi_mode**\ (\ )
  219. 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).
  220. \ **Note:** Lights' bake mode will also affect the global illumination rendering. See :ref:`Light3D.light_bake_mode<class_Light3D_property_light_bake_mode>`.
  221. .. rst-class:: classref-item-separator
  222. ----
  223. .. _class_GeometryInstance3D_property_ignore_occlusion_culling:
  224. .. rst-class:: classref-property
  225. :ref:`bool<class_bool>` **ignore_occlusion_culling** = ``false`` :ref:`🔗<class_GeometryInstance3D_property_ignore_occlusion_culling>`
  226. .. rst-class:: classref-property-setget
  227. - |void| **set_ignore_occlusion_culling**\ (\ value\: :ref:`bool<class_bool>`\ )
  228. - :ref:`bool<class_bool>` **is_ignoring_occlusion_culling**\ (\ )
  229. If ``true``, disables occlusion culling for this instance. Useful for gizmos that must be rendered even when occlusion culling is in use.
  230. \ **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)``.
  231. .. rst-class:: classref-item-separator
  232. ----
  233. .. _class_GeometryInstance3D_property_lod_bias:
  234. .. rst-class:: classref-property
  235. :ref:`float<class_float>` **lod_bias** = ``1.0`` :ref:`🔗<class_GeometryInstance3D_property_lod_bias>`
  236. .. rst-class:: classref-property-setget
  237. - |void| **set_lod_bias**\ (\ value\: :ref:`float<class_float>`\ )
  238. - :ref:`float<class_float>` **get_lod_bias**\ (\ )
  239. 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.
  240. Useful for testing level of detail transitions in the editor.
  241. .. rst-class:: classref-item-separator
  242. ----
  243. .. _class_GeometryInstance3D_property_material_overlay:
  244. .. rst-class:: classref-property
  245. :ref:`Material<class_Material>` **material_overlay** :ref:`🔗<class_GeometryInstance3D_property_material_overlay>`
  246. .. rst-class:: classref-property-setget
  247. - |void| **set_material_overlay**\ (\ value\: :ref:`Material<class_Material>`\ )
  248. - :ref:`Material<class_Material>` **get_material_overlay**\ (\ )
  249. The material overlay for the whole geometry.
  250. If a material is assigned to this property, it will be rendered on top of any other active material for all the surfaces.
  251. .. rst-class:: classref-item-separator
  252. ----
  253. .. _class_GeometryInstance3D_property_material_override:
  254. .. rst-class:: classref-property
  255. :ref:`Material<class_Material>` **material_override** :ref:`🔗<class_GeometryInstance3D_property_material_override>`
  256. .. rst-class:: classref-property-setget
  257. - |void| **set_material_override**\ (\ value\: :ref:`Material<class_Material>`\ )
  258. - :ref:`Material<class_Material>` **get_material_override**\ (\ )
  259. The material override for the whole geometry.
  260. If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh.
  261. .. rst-class:: classref-item-separator
  262. ----
  263. .. _class_GeometryInstance3D_property_transparency:
  264. .. rst-class:: classref-property
  265. :ref:`float<class_float>` **transparency** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_transparency>`
  266. .. rst-class:: classref-property-setget
  267. - |void| **set_transparency**\ (\ value\: :ref:`float<class_float>`\ )
  268. - :ref:`float<class_float>` **get_transparency**\ (\ )
  269. 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.
  270. In spatial shaders, ``1.0 - transparency`` is set as the default value of the ``ALPHA`` built-in.
  271. \ **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.
  272. \ **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``.
  273. .. rst-class:: classref-item-separator
  274. ----
  275. .. _class_GeometryInstance3D_property_visibility_range_begin:
  276. .. rst-class:: classref-property
  277. :ref:`float<class_float>` **visibility_range_begin** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_begin>`
  278. .. rst-class:: classref-property-setget
  279. - |void| **set_visibility_range_begin**\ (\ value\: :ref:`float<class_float>`\ )
  280. - :ref:`float<class_float>` **get_visibility_range_begin**\ (\ )
  281. 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.
  282. .. rst-class:: classref-item-separator
  283. ----
  284. .. _class_GeometryInstance3D_property_visibility_range_begin_margin:
  285. .. rst-class:: classref-property
  286. :ref:`float<class_float>` **visibility_range_begin_margin** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_begin_margin>`
  287. .. rst-class:: classref-property-setget
  288. - |void| **set_visibility_range_begin_margin**\ (\ value\: :ref:`float<class_float>`\ )
  289. - :ref:`float<class_float>` **get_visibility_range_begin_margin**\ (\ )
  290. 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.
  291. 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.
  292. .. rst-class:: classref-item-separator
  293. ----
  294. .. _class_GeometryInstance3D_property_visibility_range_end:
  295. .. rst-class:: classref-property
  296. :ref:`float<class_float>` **visibility_range_end** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_end>`
  297. .. rst-class:: classref-property-setget
  298. - |void| **set_visibility_range_end**\ (\ value\: :ref:`float<class_float>`\ )
  299. - :ref:`float<class_float>` **get_visibility_range_end**\ (\ )
  300. 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.
  301. .. rst-class:: classref-item-separator
  302. ----
  303. .. _class_GeometryInstance3D_property_visibility_range_end_margin:
  304. .. rst-class:: classref-property
  305. :ref:`float<class_float>` **visibility_range_end_margin** = ``0.0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_end_margin>`
  306. .. rst-class:: classref-property-setget
  307. - |void| **set_visibility_range_end_margin**\ (\ value\: :ref:`float<class_float>`\ )
  308. - :ref:`float<class_float>` **get_visibility_range_end_margin**\ (\ )
  309. 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.
  310. 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.
  311. .. rst-class:: classref-item-separator
  312. ----
  313. .. _class_GeometryInstance3D_property_visibility_range_fade_mode:
  314. .. rst-class:: classref-property
  315. :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **visibility_range_fade_mode** = ``0`` :ref:`🔗<class_GeometryInstance3D_property_visibility_range_fade_mode>`
  316. .. rst-class:: classref-property-setget
  317. - |void| **set_visibility_range_fade_mode**\ (\ value\: :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>`\ )
  318. - :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` **get_visibility_range_fade_mode**\ (\ )
  319. Controls which instances will be faded when approaching the limits of the visibility range. See :ref:`VisibilityRangeFadeMode<enum_GeometryInstance3D_VisibilityRangeFadeMode>` for possible values.
  320. .. rst-class:: classref-section-separator
  321. ----
  322. .. rst-class:: classref-descriptions-group
  323. Method Descriptions
  324. -------------------
  325. .. _class_GeometryInstance3D_method_get_instance_shader_parameter:
  326. .. rst-class:: classref-method
  327. :ref:`Variant<class_Variant>` **get_instance_shader_parameter**\ (\ name\: :ref:`StringName<class_StringName>`\ ) |const| :ref:`🔗<class_GeometryInstance3D_method_get_instance_shader_parameter>`
  328. Get the value of a shader parameter as set on this instance.
  329. .. rst-class:: classref-item-separator
  330. ----
  331. .. _class_GeometryInstance3D_method_set_instance_shader_parameter:
  332. .. rst-class:: classref-method
  333. |void| **set_instance_shader_parameter**\ (\ name\: :ref:`StringName<class_StringName>`, value\: :ref:`Variant<class_Variant>`\ ) :ref:`🔗<class_GeometryInstance3D_method_set_instance_shader_parameter>`
  334. 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>`.
  335. \ **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.
  336. \ **Note:** ``name`` is case-sensitive and must match the name of the uniform in the code exactly (not the capitalized name in the inspector).
  337. \ **Note:** Per-instance shader uniforms are currently only available in 3D, so there is no 2D equivalent of this method.
  338. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  339. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  340. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  341. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  342. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  343. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  344. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  345. .. |void| replace:: :abbr:`void (No return value.)`