Up to date
This page is up to date for Godot 4.2
.
If you still find outdated information, please open an issue.
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¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods¶
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. Use for dynamic objects that contribute to global illumination. This GI mode is only effective when using VoxelGI, but it has a higher performance impact than GI_MODE_STATIC. When using other GI methods, this will act the same as GI_MODE_DISABLED.
enum LightmapScale:
LightmapScale LIGHTMAP_SCALE_1X = 0
The standard texel density for lightmapping with LightmapGI.
LightmapScale LIGHTMAP_SCALE_2X =