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.

Mesh

Inherits: Resource < RefCounted < Object

Inherited By: ArrayMesh, ImmediateMesh, PlaceholderMesh, PrimitiveMesh

A Resource that contains vertex array-based geometry.

Description

Mesh is a type of Resource that contains vertex array-based geometry, divided in surfaces. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials.

Tutorials

Properties

Vector2i

lightmap_size_hint

Vector2i(0, 0)

Methods

AABB

_get_aabb() virtual const

int

_get_blend_shape_count() virtual const

StringName

_get_blend_shape_name(index: int) virtual const

int

_get_surface_count() virtual const

void

_set_blend_shape_name(index: int, name: StringName) virtual

int

_surface_get_array_index_len(index: int) virtual const

int

_surface_get_array_len(index: int) virtual const

Array

_surface_get_arrays(index: int) virtual const

Array[Array]

_surface_get_blend_shape_arrays(index: int) virtual const

int

_surface_get_format(index: int) virtual const

Dictionary

_surface_get_lods(index: int) virtual const

Material

_surface_get_material(index: int) virtual const

int

_surface_get_primitive_type(index: int) virtual const

void

_surface_set_material(index: int, material: Material) virtual

ConvexPolygonShape3D

create_convex_shape(clean: bool = true, simplify: bool = false) const

Mesh

create_outline(margin: float) const

Resource

create_placeholder() const

ConcavePolygonShape3D

create_trimesh_shape() const

TriangleMesh

generate_triangle_mesh() const

AABB

get_aabb() const

PackedVector3Array

get_faces() const

int

get_surface_count() const

Array

surface_get_arrays(surf_idx: int) const

Array[Array]

surface_get_blend_shape_arrays(surf_idx: int) const

Material

surface_get_material(surf_idx: int)