Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

GeometryInstance3D

Inherits: VisualInstance3D < Node3D < Node < Object

Inherited By: CPUParticles3D, CSGShape3D, GPUParticles3D, Label3D, MeshInstance3D, MultiMeshInstance3D, SpriteBase3D

Base node for geometry-based visual instances.

Description

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

Tutorials

Properties

ShadowCastingSetting

cast_shadow

1

AABB

custom_aabb

AABB(0, 0, 0, 0, 0, 0)

float

extra_cull_margin

0.0

LightmapScale

gi_lightmap_scale

0

GIMode

gi_mode

1

bool

ignore_occlusion_culling

false

float

lod_bias

1.0

Material

material_overlay

Material

material_override

float

transparency

0.0

float

visibility_range_begin

0.0

float

visibility_range_begin_margin

0.0

float

visibility_range_end

0.0

float

visibility_range_end_margin

0.0

VisibilityRangeFadeMode

visibility_range_fade_mode

0

Methods

Variant

get_instance_shader_parameter ( StringName name ) const

void

set_instance_shader_parameter ( StringName name, Variant value )


Enumerations

enum ShadowCastingSetting:

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).

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.

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.

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.


enum GIMode:

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 VoxelGI and SDFGI, the geometry will receive indirect lighting and reflections but the geometry will not be considered in GI baking. When using LightmapGI, the object will receive indirect lighting using lightmap probes instead of using the baked lightmap texture.

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 VoxelGI, SDFGI and LightmapGI.

GIMode GI_MODE_DYNAMIC = 2

Dynamic global illumination mode