class_geometryinstance.rst 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the GeometryInstance.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_GeometryInstance:
  6. GeometryInstance
  7. ================
  8. **Inherits:** :ref:`VisualInstance<class_VisualInstance>` **<** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. **Inherited By:** :ref:`CPUParticles<class_CPUParticles>`, :ref:`ImmediateGeometry<class_ImmediateGeometry>`, :ref:`MeshInstance<class_MeshInstance>`, :ref:`MultiMeshInstance<class_MultiMeshInstance>`, :ref:`Particles<class_Particles>`, :ref:`SpriteBase3D<class_SpriteBase3D>`
  10. **Category:** Core
  11. Brief Description
  12. -----------------
  13. Base node for geometry based visual instances.
  14. Properties
  15. ----------
  16. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  17. | :ref:`ShadowCastingSetting<enum_GeometryInstance_ShadowCastingSetting>` | :ref:`cast_shadow<class_GeometryInstance_property_cast_shadow>` |
  18. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  19. | :ref:`float<class_float>` | :ref:`extra_cull_margin<class_GeometryInstance_property_extra_cull_margin>` |
  20. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  21. | :ref:`float<class_float>` | :ref:`lod_max_distance<class_GeometryInstance_property_lod_max_distance>` |
  22. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  23. | :ref:`float<class_float>` | :ref:`lod_max_hysteresis<class_GeometryInstance_property_lod_max_hysteresis>` |
  24. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  25. | :ref:`float<class_float>` | :ref:`lod_min_distance<class_GeometryInstance_property_lod_min_distance>` |
  26. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  27. | :ref:`float<class_float>` | :ref:`lod_min_hysteresis<class_GeometryInstance_property_lod_min_hysteresis>` |
  28. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  29. | :ref:`Material<class_Material>` | :ref:`material_override<class_GeometryInstance_property_material_override>` |
  30. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  31. | :ref:`bool<class_bool>` | :ref:`use_in_baked_light<class_GeometryInstance_property_use_in_baked_light>` |
  32. +-------------------------------------------------------------------------+-------------------------------------------------------------------------------+
  33. Enumerations
  34. ------------
  35. .. _enum_GeometryInstance_ShadowCastingSetting:
  36. .. _class_GeometryInstance_constant_SHADOW_CASTING_SETTING_OFF:
  37. .. _class_GeometryInstance_constant_SHADOW_CASTING_SETTING_ON:
  38. .. _class_GeometryInstance_constant_SHADOW_CASTING_SETTING_DOUBLE_SIDED:
  39. .. _class_GeometryInstance_constant_SHADOW_CASTING_SETTING_SHADOWS_ONLY:
  40. enum **ShadowCastingSetting**:
  41. - **SHADOW_CASTING_SETTING_OFF** = **0** --- Will not cast any shadows.
  42. - **SHADOW_CASTING_SETTING_ON** = **1** --- Will cast shadows from all visible faces in the GeometryInstance.
  43. Will take culling into account, so faces not being rendered will not be taken into account when shadow casting.
  44. - **SHADOW_CASTING_SETTING_DOUBLE_SIDED** = **2** --- Will cast shadows from all visible faces in the GeometryInstance.
  45. Will not take culling into account, so all faces will be taken into account when shadow casting.
  46. - **SHADOW_CASTING_SETTING_SHADOWS_ONLY** = **3** --- Will only show the shadows casted from this object.
  47. In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be.
  48. ----
  49. .. _enum_GeometryInstance_Flags:
  50. .. _class_GeometryInstance_constant_FLAG_USE_BAKED_LIGHT:
  51. .. _class_GeometryInstance_constant_FLAG_MAX:
  52. enum **Flags**:
  53. - **FLAG_USE_BAKED_LIGHT** = **0** --- Will allow the GeometryInstance to be used when baking lights using a :ref:`GIProbe<class_GIProbe>` or :ref:`BakedLightmap<class_BakedLightmap>`.
  54. - **FLAG_MAX** = **2** --- Represents the size of the :ref:`Flags<enum_GeometryInstance_Flags>` enum.
  55. Description
  56. -----------
  57. Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials.
  58. Property Descriptions
  59. ---------------------
  60. .. _class_GeometryInstance_property_cast_shadow:
  61. - :ref:`ShadowCastingSetting<enum_GeometryInstance_ShadowCastingSetting>` **cast_shadow**
  62. +----------+---------------------------------+
  63. | *Setter* | set_cast_shadows_setting(value) |
  64. +----------+---------------------------------+
  65. | *Getter* | get_cast_shadows_setting() |
  66. +----------+---------------------------------+
  67. The selected shadow casting flag. See :ref:`ShadowCastingSetting<enum_GeometryInstance_ShadowCastingSetting>` for possible values.
  68. ----
  69. .. _class_GeometryInstance_property_extra_cull_margin:
  70. - :ref:`float<class_float>` **extra_cull_margin**
  71. +----------+------------------------------+
  72. | *Setter* | set_extra_cull_margin(value) |
  73. +----------+------------------------------+
  74. | *Getter* | get_extra_cull_margin() |
  75. +----------+------------------------------+
  76. The extra distance added to the GeometryInstance's bounding box (:ref:`AABB<class_AABB>`) to increase its cull box.
  77. ----
  78. .. _class_GeometryInstance_property_lod_max_distance:
  79. - :ref:`float<class_float>` **lod_max_distance**
  80. +----------+-----------------------------+
  81. | *Setter* | set_lod_max_distance(value) |
  82. +----------+-----------------------------+
  83. | *Getter* | get_lod_max_distance() |
  84. +----------+-----------------------------+
  85. The GeometryInstance's max LOD distance.
  86. **Note:** This property currently has no effect.
  87. ----
  88. .. _class_GeometryInstance_property_lod_max_hysteresis:
  89. - :ref:`float<class_float>` **lod_max_hysteresis**
  90. +----------+-------------------------------+
  91. | *Setter* | set_lod_max_hysteresis(value) |
  92. +----------+-------------------------------+
  93. | *Getter* | get_lod_max_hysteresis() |
  94. +----------+-------------------------------+
  95. The GeometryInstance's max LOD margin.
  96. **Note:** This property currently has no effect.
  97. ----
  98. .. _class_GeometryInstance_property_lod_min_distance:
  99. - :ref:`float<class_float>` **lod_min_distance**
  100. +----------+-----------------------------+
  101. | *Setter* | set_lod_min_distance(value) |
  102. +----------+-----------------------------+
  103. | *Getter* | get_lod_min_distance() |
  104. +----------+-----------------------------+
  105. The GeometryInstance's min LOD distance.
  106. **Note:** This property currently has no effect.
  107. ----
  108. .. _class_GeometryInstance_property_lod_min_hysteresis:
  109. - :ref:`float<class_float>` **lod_min_hysteresis**
  110. +----------+-------------------------------+
  111. | *Setter* | set_lod_min_hysteresis(value) |
  112. +----------+-------------------------------+
  113. | *Getter* | get_lod_min_hysteresis() |
  114. +----------+-------------------------------+
  115. The GeometryInstance's min LOD margin.
  116. **Note:** This property currently has no effect.
  117. ----
  118. .. _class_GeometryInstance_property_material_override:
  119. - :ref:`Material<class_Material>` **material_override**
  120. +----------+------------------------------+
  121. | *Setter* | set_material_override(value) |
  122. +----------+------------------------------+
  123. | *Getter* | get_material_override() |
  124. +----------+------------------------------+
  125. The material override for the whole geometry.
  126. If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh.
  127. ----
  128. .. _class_GeometryInstance_property_use_in_baked_light:
  129. - :ref:`bool<class_bool>` **use_in_baked_light**
  130. +----------+-----------------+
  131. | *Setter* | set_flag(value) |
  132. +----------+-----------------+
  133. | *Getter* | get_flag() |
  134. +----------+-----------------+
  135. If ``true``, this GeometryInstance will be used when baking lights using a :ref:`GIProbe<class_GIProbe>` or :ref:`BakedLightmap<class_BakedLightmap>`.