GeometryInstance3D.xml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="GeometryInstance3D" inherits="VisualInstance3D" version="4.0">
  3. <brief_description>
  4. Base node for geometry-based visual instances.
  5. </brief_description>
  6. <description>
  7. Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="get_shader_instance_uniform" qualifiers="const">
  13. <return type="Variant" />
  14. <argument index="0" name="uniform" type="StringName" />
  15. <description>
  16. </description>
  17. </method>
  18. <method name="set_custom_aabb">
  19. <return type="void" />
  20. <argument index="0" name="aabb" type="AABB" />
  21. <description>
  22. Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero.
  23. </description>
  24. </method>
  25. <method name="set_shader_instance_uniform">
  26. <return type="void" />
  27. <argument index="0" name="uniform" type="StringName" />
  28. <argument index="1" name="value" type="Variant" />
  29. <description>
  30. </description>
  31. </method>
  32. </methods>
  33. <members>
  34. <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance3D.ShadowCastingSetting" default="1">
  35. The selected shadow casting flag. See [enum ShadowCastingSetting] for possible values.
  36. </member>
  37. <member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin" default="0.0">
  38. The extra distance added to the GeometryInstance3D's bounding box ([AABB]) to increase its cull box.
  39. </member>
  40. <member name="gi_lightmap_scale" type="int" setter="set_lightmap_scale" getter="get_lightmap_scale" enum="GeometryInstance3D.LightmapScale" default="0">
  41. </member>
  42. <member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode" default="0">
  43. </member>
  44. <member name="ignore_occlusion_culling" type="bool" setter="set_ignore_occlusion_culling" getter="is_ignoring_occlusion_culling" default="false">
  45. </member>
  46. <member name="lod_bias" type="float" setter="set_lod_bias" getter="get_lod_bias" default="1.0">
  47. </member>
  48. <member name="material_override" type="Material" setter="set_material_override" getter="get_material_override">
  49. The material override for the whole geometry.
  50. If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh.
  51. </member>
  52. <member name="transparency" type="float" setter="set_transparency" getter="get_transparency" default="0.0">
  53. Transparency applied to the whole geometry. In spatial shaders, transparency is set as the default value of the [code]ALPHA[/code] built-in.
  54. </member>
  55. <member name="visibility_range_begin" type="float" setter="set_visibility_range_begin" getter="get_visibility_range_begin" default="0.0">
  56. Starting distance from which the GeometryInstance3D will be visible, taking [member visibility_range_begin_margin] into account as well. The default value of 0 is used to disable the range check.
  57. </member>
  58. <member name="visibility_range_begin_margin" type="float" setter="set_visibility_range_begin_margin" getter="get_visibility_range_begin_margin" default="0.0">
  59. Margin for the [member visibility_range_begin] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_begin] threshold by this amount.
  60. </member>
  61. <member name="visibility_range_end" type="float" setter="set_visibility_range_end" getter="get_visibility_range_end" default="0.0">
  62. Distance from which the GeometryInstance3D will be hidden, taking [member visibility_range_end_margin] into account as well. The default value of 0 is used to disable the range check.
  63. </member>
  64. <member name="visibility_range_end_margin" type="float" setter="set_visibility_range_end_margin" getter="get_visibility_range_end_margin" default="0.0">
  65. Margin for the [member visibility_range_end] threshold. The GeometryInstance3D will only change its visibility state when it goes over or under the [member visibility_range_end] threshold by this amount.
  66. </member>
  67. <member name="visibility_range_fade_mode" type="int" setter="set_visibility_range_fade_mode" getter="get_visibility_range_fade_mode" enum="GeometryInstance3D.VisibilityRangeFadeMode" default="0">
  68. Controls which instances will be faded when approaching the limits of the visibility range. See [enum VisibilityRangeFadeMode] for possible values.
  69. </member>
  70. </members>
  71. <constants>
  72. <constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting">
  73. Will not cast any shadows.
  74. </constant>
  75. <constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="ShadowCastingSetting">
  76. Will cast shadows from all visible faces in the GeometryInstance3D.
  77. Will take culling into account, so faces not being rendered will not be taken into account when shadow casting.
  78. </constant>
  79. <constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2" enum="ShadowCastingSetting">
  80. Will cast shadows from all visible faces in the GeometryInstance3D.
  81. Will not take culling into account, so all faces will be taken into account when shadow casting.
  82. </constant>
  83. <constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3" enum="ShadowCastingSetting">
  84. Will only show the shadows casted from this object.
  85. In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be.
  86. </constant>
  87. <constant name="GI_MODE_DISABLED" value="0" enum="GIMode">
  88. </constant>
  89. <constant name="GI_MODE_BAKED" value="1" enum="GIMode">
  90. </constant>
  91. <constant name="GI_MODE_DYNAMIC" value="2" enum="GIMode">
  92. </constant>
  93. <constant name="LIGHTMAP_SCALE_1X" value="0" enum="LightmapScale">
  94. </constant>
  95. <constant name="LIGHTMAP_SCALE_2X" value="1" enum="LightmapScale">
  96. </constant>
  97. <constant name="LIGHTMAP_SCALE_4X" value="2" enum="LightmapScale">
  98. </constant>
  99. <constant name="LIGHTMAP_SCALE_8X" value="3" enum="LightmapScale">
  100. </constant>
  101. <constant name="LIGHTMAP_SCALE_MAX" value="4" enum="LightmapScale">
  102. </constant>
  103. <constant name="VISIBILITY_RANGE_FADE_DISABLED" value="0" enum="VisibilityRangeFadeMode">
  104. Will not fade itself nor its visibility dependencies, hysteresis will be used instead. See [member visibility_range_begin] and [member Node3D.visibility_parent] for more information.
  105. </constant>
  106. <constant name="VISIBILITY_RANGE_FADE_SELF" value="1" enum="VisibilityRangeFadeMode">
  107. Will fade-out itself when reaching the limits of its own visibility range. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
  108. </constant>
  109. <constant name="VISIBILITY_RANGE_FADE_DEPENDENCIES" value="2" enum="VisibilityRangeFadeMode">
  110. Will fade-in its visibility dependencies (see [member Node3D.visibility_parent]) when reaching the limits of its own visibility range. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin].
  111. </constant>
  112. </constants>
  113. </class>