3D outline reference
There are different outline types based on the Adding Outlinespage:
enum OUTLINE_TYPE {
## Add an outline to the non-occluded parts of the mesh
VISIBLE = 0,
## Add an outline only to the occluded parts of the mesh
HIDDEN = 1,
## Add a complete outline to the mesh
FULL = 2,
## Add a silhouette to the occluded parts of the mesh
SILHOUETTE = 3,
## Add a silhouette and an outline to the mesh
OUTLINE_SILHOUETTE = 4
}The following methods are owned by the static class OutlineUtils3D. In order to call one of these functions you need to prepend the class name first:
OutlineUtils3D.add_outline(...)Outline Utility Functions
MeshInstance3D get_outline_or_null(_node: Node3D) staticReturn the outline if exists else return null
Variant get_outline_type_or_null(_outline: MeshInstance3D) staticReturn the outline type metadata from the given outline node, or null if not found.
bool is_node_an_outline(_node: Node3D) staticCheck if the given node is an outline by verifying its group membership.
Outline Management
void add_outline(_node: Node3D, _outline_type: OUTLINE_TYPE = OUTLINE_TYPE.VISIBLE) staticAdd an outline to the given MeshInstance3D with a specified outline type.
void clear_outline(_node: Node3D) staticTry remove an outline from the given MeshInstance3D.
void set_outline_type(_node: Node3D, _outline_type: OUTLINE_TYPE) staticAdd the selected outline material to the MeshInstance3D.
Basic Style Settings
void set_outline_color(_node: Node3D, _color: Color) staticTry get the outline from the node, if exists then set the color.
void set_outline_thickness(_node: Node3D, _thickness: float) staticTry get the outline from the node, if exists then set the thickness.
Emission Settings
void set_emission_enabled(_node: Node3D, _enabled: bool) staticTry get the outline from the node, if exists then set emission enabled state.
void set_emission_strength(_node: Node3D, _strength: float) staticTry get the outline from the node, if exists then set emission strength value.
Distance Fade Settings
void set_distance_fade_enabled(_node: Node3D, _enabled: bool) staticTry get the outline from the node, if exists then set the distance fade enabled.
void set_distance_fade_min_dist(_node: Node3D, _dist: float) staticTry get the outline from the node, if exists then set the minimum distance fade distance.
void set_distance_fade_max_dist(_node: Node3D, _dist: float) staticTry get the outline from the node, if exists then set the maximum distance fade distance.
void set_distance_scale_enabled(_node: Node3D, _enabled: bool) staticTry get the outline from the node, if exists then set distance scale enabled state.
Texture Settings
void set_texture_enabled(_node: Node3D, _enabled: bool) staticTry get the outline from the node, if exists then set texture enabled state.
void set_texture(_node: Node3D, _texture: Texture2D) staticTry get the outline from the node, if exists then set the outline texture.
void set_texture_multiply_with_color(_node: Node3D, _enabled: bool) staticTry get the outline from the node, if exists then set texture multiply with color state.
void set_texture_tiling(_node: Node3D, _tiling: Vector2) staticTry get the outline from the node, if exists then set texture tiling value.
void set_texture_offset(_node: Node3D, _offset: Vector2) staticTry get the outline from the node, if exists then set texture offset value.
Visibility Control
void show_outline(_node: Node3D) staticTry get the outline from the node, if exists then set visible to true.
void hide_outline(_node: Node3D) staticTry get the outline from the node, if exists then set visible to false.
Last updated