メッシュ レンダラ
テキスト メッシュ / Text Mesh

スキンメッシュ レンダラ

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Unity uses the Skinned Mesh Renderer component to render Bone animations, where the shape of the mesh is deformed by predefined animation sequences. This technique is useful for characters and other objects whose joints bend (as opposed to a machine where joints are more like hinges).

Skinned Mesh Renderer (スキンメッシュ レンダラ)はメッシュがスキニングされている場合,インポート時に自動追加されます。

プロパティ

プロパティ: 特徴:
Cast Shadows (Unity Pro のみ) オンにした場合,メッシュは影を生成するLightが照らしてたときに影を生成します。
Receive Shadows (Unity Pro のみ) If enabled, the Mesh will show shadows that are cast upon it by other objects.
Materials The list of Materials the model will be rendered with.
Use Light Probes Does the mesh take Light Probes into account?
Quality The maximum number of bones that can affect any given vertex.
Update When Offscreen If enabled, the Skinned Mesh will be updated even when it can’t be seen by any camera. If disabled, the animations themselves will also stop running when the object is offscreen.
Mesh レンダラによって使用されるメッシュ。
Root Bone The bone that is the “root” of the animation (ie, the bone relative to which all the others move).
Bounds The bounding volume that is used to determine when the mesh is offscreen. The bounds are precalculated on import from the Mesh and animations in the model file and are displayed as a wireframe around the model in the Scene View.

詳細

Bones are invisible objects inside a skinned mesh that affect the way the mesh is deformed during animation. The basic idea is that the bones are joined together to form a hierarchical “skeleton” and the animation is defined by rotating the joints of the skeleton to make it move. Each bone is attached to some of the vertices of the surrounding mesh. When the animation is played, the vertices move with the bone(s) they are connected to, so the “skin” follows the movement of the skeleton. At a simple joint (an elbow, say), the mesh vertices are affected by both of the bones that meet there, and the mesh will stretch and rotate realistically as the joint bends. In more complex situations, more than two bones will affect a particular area of mesh, resulting in more subtle movements.

Although a skinned mesh is most commonly used with predefined animations, it is also possible to attach Rigidbodies to each bone in a skeleton to put it under the control of the physics engine. This is typically used to create the “ragdoll” effect, where a character’s limbs flail after being thrown or struck by an explosion.

品質 / Quality

Unity can skin every vertex with one, two or four bones. Using four bones gives the best results but this comes with a higher processing overhead. Games commonly use two bone weights, which is a good compromise between visual quality and performance.

QualityAutomaticにセットされた場合 Quality SettingsBlend Weights が使用されます。これによりエンドユーザが最適なパフォーマンスの品質設定を選択することができます。

画面外の更新

By default, skinned meshes that are not visible to any camera are not updated, since this avoids wasting CPU time. The skinning is not updated until the mesh comes back on screen.

The object’s visibility is determined from the Mesh’s Bounds (ie, the entire bounding volume must be outside the view frustum of any active camera). However, the true bounding volume of an animated mesh can change as the animation plays (eg, the volume will get tall if the character raises his hand in the air). Unity takes into account all attached animations when calculating the maximum bounding volume but there are cases when the bounds can’t be calculated to anticipate every possible use case. Each of following situations, for example, become a problem when they push bones or vertices out of the precalculated bounding volume:

  • ランタイム時にアニメーションを追加した場合
  • Additive(追加)アニメーションを使用した場合
  • ボーンの位置をプロシージャで影響を及ぼした場合
  • 頂点シェーダを使用して,事前計算された境界の外に頂点を押し出した場合
  • Ragdollを使用した場合。

これらの例では,2つの解決方法があります:

  1. Bounds(境界)を修正してメッシュの潜在的な境界の大きさにマッチできるように修正します。
  2. Update When Offscreenをスキンおよびレンダリングされたスキンメッシュに対して常にオンにします。

ほとんどの場合,最初の方法がパフォーマンスに与える影響も少ないため,選択することになりますが,二つめの方法はパフォーマンスを重視する必要がなく,境界の大きさを予測することが難しい場合のみ使用して下さい。(例えば Ragdoll の場合)

In order to make Skinned Meshes work better with ragdolls, Unity will automatically remap the Skinned Mesh Renderer to the root bone on import. However Unity only does this if there is a single Skinned Mesh Renderer in the model file. This means that if there is some reason why you can’t attach all Skinned Mesh Renderers to the root bone or a child and you use ragdolls, you should turn off this optimization.

スキンメッシュのインポート

スキンメッシュが現在インポートできるのは:

  • Maya
  • Cinema4D
  • 3D Studio Max
  • Blender
  • Cheetah 3D
  • XSI
  • 他のFBXフォーマットをサポートしたツール

モバイルでは hand-codedされたNEON/VFP命令でCPUがスキニングをします。注意: 法線とタンジェントは規格化__されません__ので,自分で書いたシェーダーであれば,自分で規格化はしてください。もし,サーフェイス シェーダ をお使いであれば,規格化は自動的に生成されます。

メッシュ レンダラ
テキスト メッシュ / Text Mesh