GeometryInstance

Inherits: VisualInstance < Spatial < Node < Object

Inherited By: MultiMeshInstance, Particles, MeshInstance, SpriteBase3D, ImmediateGeometry, CPUParticles

Category: Core

Brief Description

Base node for geometry based visual instances.

Enumerations

enum Flags:

  • FLAG_USE_BAKED_LIGHT = 0 — Will allow the GeometryInstance to be used when baking lights using a GIProbe and/or any other form of baked lighting.

Added documentation for GeometryInstance and VisualInstance - FLAG_MAX = 2

enum ShadowCastingSetting:

  • SHADOW_CASTING_SETTING_OFF = 0 — Will not cast any shadows.
  • SHADOW_CASTING_SETTING_ON = 1 — Will cast shadows from all visible faces in the GeometryInstance.

Will take culling into account, so faces not being rendered will not be taken into account when shadow casting. - SHADOW_CASTING_SETTING_DOUBLE_SIDED = 2 — Will cast shadows from all visible faces in the GeometryInstance.

Will not take culling into account, so all faces will be taken into account when shadow casting. - 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.

Description

Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials.

Property Descriptions

Setter set_cast_shadows_setting(value)
Getter get_cast_shadows_setting()

The selected shadow casting flag. See SHADOW_CASTING_SETTING_* constants for values.

  • float extra_cull_margin
Setter set_extra_cull_margin(value)
Getter get_extra_cull_margin()

The extra distance added to the GeometryInstance’s bounding box (AABB) to increase its cull box.

Setter set_lod_max_distance(value)
Getter get_lod_max_distance()

The GeometryInstance’s max LOD distance.

  • float lod_max_hysteresis
Setter set_lod_max_hysteresis(value)
Getter get_lod_max_hysteresis()

The GeometryInstance’s max LOD margin.

Setter set_lod_min_distance(value)
Getter get_lod_min_distance()

The GeometryInstance’s min LOD distance.

  • float lod_min_hysteresis
Setter set_lod_min_hysteresis(value)
Getter get_lod_min_hysteresis()

The GeometryInstance’s min LOD margin.

Setter set_material_override(value)
Getter get_material_override()

The material override for the whole geometry.

If there is a material in material_override, it will be used instead of any material set in any material slot of the mesh.

  • bool use_in_baked_light
Setter set_flag(value)
Getter get_flag()

If true this GeometryInstance will be used when baking lights using a GIProbe and/or any other form of baked lighting.