A [Resource] that contains vertex array-based geometry.
Mesh is a type of [Resource] that contains vertex array-based geometry, divided in [i]surfaces[/i]. 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.
https://godotengine.org/asset-library/asset/123
https://godotengine.org/asset-library/asset/126
https://godotengine.org/asset-library/asset/125
https://godotengine.org/asset-library/asset/678
Calculate a [ConvexPolygonShape3D] from the mesh.
If [code]clean[/code] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed.
If [code]simplify[/code] is [code]true[/code], the geometry can be further simplified to reduce the amount of vertices. Disabled by default.
Calculate an outline mesh at a defined offset (margin) from the original mesh.
[b]Note:[/b] This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise).
Calculate a [ConcavePolygonShape3D] from the mesh.
Generate a [TriangleMesh] from the mesh. Considers only surfaces using one of these primitive types: [constant PRIMITIVE_TRIANGLES], [constant PRIMITIVE_TRIANGLE_STRIP].
Returns the smallest [AABB] enclosing this mesh in local space. Not affected by [code]custom_aabb[/code]. See also [method VisualInstance3D.get_transformed_aabb].
[b]Note:[/b] This is only implemented for [ArrayMesh] and [PrimitiveMesh].
Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle.
Returns the amount of surfaces that the [Mesh] holds.
Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface (see [method ArrayMesh.add_surface_from_arrays]).
Returns the blend shape arrays for the requested surface.
Returns a [Material] in a given surface. Surface is rendered using this material.
Sets a [Material] for a given surface. Surface will be rendered using this material.
Sets a hint to be used for lightmap resolution.
Render array as points (one vertex equals one point).
Render array as lines (every two vertices a line is created).
Render array as line strip.
Render array as triangles (every three vertices a triangle is created).
Render array as triangle strips.
[PackedVector3Array], [PackedVector2Array], or [Array] of vertex positions.
[PackedVector3Array] of vertex normals.
[PackedFloat32Array] of vertex tangents. Each element in groups of 4 floats, first 3 floats determine the tangent, and the last the binormal direction as -1 or 1.
[PackedColorArray] of vertex colors.
[PackedVector2Array] for UV coordinates.
[PackedVector2Array] for second UV coordinates.
[PackedFloat32Array] or [PackedInt32Array] of bone indices. Each element is a group of 4 numbers.
[PackedFloat32Array] of bone weights. Each element in groups of 4 floats.
[PackedInt32Array] of integers used as indices referencing vertices, colors, normals, tangents, and textures. All of those arrays must have the same number of elements as the vertex array. No index can be beyond the vertex array size. When this index array is present, it puts the function into "index mode," where the index selects the *i*'th vertex, normal, tangent, color, UV, etc. This means if you want to have different normals or colors along an edge, you have to duplicate the vertices.
For triangles, the index array is interpreted as triples, referring to the vertices of each triangle. For lines, the index array is in pairs indicating the start and end of each line.
Represents the size of the [enum ArrayType] enum.
Represents the size of the [enum ArrayCustomFormat] enum.
Mesh array contains vertices. All meshes require a vertex array so this should always be present.
Mesh array contains normals.
Mesh array contains tangents.
Mesh array contains colors.
Mesh array contains UVs.
Mesh array contains second UV.
Mesh array contains bones.
Mesh array contains bone weights.
Mesh array uses indices.
Flag used to mark that the array contains 2D vertices.
Blend shapes are normalized.
Blend shapes are relative to base weight.