Version: Unity 6.1 Alpha (6000.1)
Language : English
Get started with meshes
Mesh data

Introduction to meshes

A mesh is a collection of data that describes a shape. In Unity, you use meshes in the following ways:

  • In graphics, you use meshes together with materialsAn asset that defines how a surface should be rendered. More info
    See in Glossary
    ; meshes describe the shape of an object that the GPU renders, and materials describe the appearance of its surface.
  • In physics, you can use a mesh to determine the shape of a colliderAn invisible shape that is used to handle physical collisions for an object. A collider doesn’t need to be exactly the same shape as the object’s mesh - a rough approximation is often more efficient and indistinguishable in gameplay. More info
    See in Glossary
    .

Deformable meshes

In addition to regular meshes, Unity also supports deformable meshes.

Deformable meshes fall into the following categories:

  • Skinned meshes: These meshes work with additional data called bones. Bones form a structure called a skeleton (also called a rig, or joint hierarchy), and the skinned mesh contains data that allows it to deform in a realistic way when the skeleton moves. You usually use skinned meshes for skeletal animation with Unity’s Animation features, but you can also use them with Rigidbody components to create “ragdoll” effects.
  • Meshes with blend shapes: These meshes contain data called blend shapes. Blend shapes describe versions of the mesh that are deformed into different shapes, which Unity interpolates between. You use blend shapes for morph target animation, which is a common technique for facial animation.
  • Meshes that work with a Cloth component component for realistic fabric simulation.

Working with meshes

Unity stores meshes in your project as mesh assets, and represents them in C# code with the MeshThe main graphics primitive of Unity. Meshes make up a large part of your 3D worlds. Unity supports triangulated or Quadrangulated polygon meshes. Nurbs, Nurms, Subdiv surfaces must be converted to polygons. More info
See in Glossary
class.

Depending on how you use meshes, they work with different components:

  • In graphics, Unity renders regular meshes with Mesh RendererA mesh component that takes the geometry from the Mesh Filter and renders it at the position defined by the object’s Transform component. More info
    See in Glossary
    components, and deformable meshes with Skinned Mesh Renderer components.
  • In physics, Unity uses the Mesh ColliderA free-form collider component which accepts a mesh reference to define its collision surface shape. More info
    See in Glossary
    component to determine the shape of a collider.

For detailed information about the data that a mesh contains and how Unity represents that data, see Mesh data.

Get started with meshes
Mesh data