Skinned Mesh Renderer

The Skinned Mesh Renderer is automatically added to imported meshes when the imported mesh is skinned.


An animated character rendered using the Skinned Mesh Renderer

Properties

Cast Shadows (Pro only)If enabled, this Mesh will create shadows when a shadow-creating Light shines on it
Receive Shadows (Pro only)If enabled, this Mesh will display any shadows being cast upon it
MaterialsA list of Materials to render model with.
QualityThe maximum amount of bones affecting every vertex.
Update When OffscreenIf enabled, the Skinned Mesh will be updated when offscreen. If disabled, this also disables updating animations.
BoundsThese bounds are use for determining when skinned mesh is offscreen. Bounding box is also displayed in the SceneView. Bounds are precalculated on import based on Mesh and animations in the model file.
MeshMeshed used by this renderer.

Details

Skinned Meshes are used for rendering characters. Characters are animated using bones, and every bone affects a part of the mesh. Multiple bones can affect the same vertex and are weighted. Boned animation is the main technique used to deform the shape of a mesh so that limbs can bend at the joints and other similar effects can be achieved. Additionally, Rigidbody and Character Joint components can be attached to bones so that they move realistically under physics. This is how the well-known "ragdoll" effect is implemented.


A Skinned Mesh enabled as a Ragdoll

Quality

Unity can skin every vertex with either 1, 2, or 4 bones. 4 bone weights look nicest and are most expensive. 2 Bone weights is a good compromise and can be commonly used in games.

If Quality is set to Automatic, the Quality Settings Blend Weights value will be used. This allows end-users to choose a quality setting that gives them optimum performance.

Update When Offscreen and Bounds

By default, skinned meshes that are not visible are not updated. The skinning is not updated until the mesh comes back on screen. This is an important performance optimization - it allows you to have a lot of characters running around not taking up any processing power when they are not visible.

However, visibility is determined from the Mesh's Bounds, which is precalculated on import. Unity takes into account all attached animations for precalcualating bounding volume, but there are cases when Unity can't precalculate Bounds to fit all user's needs, for example (each of these become a problem when they push bones or vertices out of precalculated bounding volume):

In those cases there are two solutions:

  1. modify Bounds to match potential bounding volume of your mesh;
  2. enable Update When Offscreen to skin and render skinned mesh all the time.

You should use fist option most of the time since it has better performance and use second option only if performance is not important in your case or you can't predict the size of your bounding volume (for example when using ragdolls).

In order to make SkinnedMeshes work better with Ragdolls Unity will automatically remap the SkinnedMeshRenderer to the rootbone on import. However Unity only does this if there is a single SkinnedMeshRenderer in the model file. So if you can't attach all SkinnedMeshRenderers to the root bone or a child and you use ragdolls, you should turn off this optimization.

Hints

Page last updated: 2013-04-08