Blend Shapeを[Paint Blend Shape Weights Tool]でペイントすることでウェイト(効果)を部分的に取り出したり、削除したりする方法を紹介します。下記もじおの様な方向け。
やった!顔のフェイシャルターゲット完成!
あ、そのターゲットパーツ分けしておいてね
えっ…ターゲットの パーツ分 け?え…??
・笑顔の Target を作成した後、右目のみ・口の左のみなどセットアップに組み込む際に Target を分割する
目を左右で分ける際は、 [Paint Blend Shape Weights Tool] を使用しなくても対応できるのですが、口を左右で分けたい時など、グラデーションで分けたい場合は [Paint Blend Shape Weights Tool] を使用する必要があります。
Targetなどの分割は、Melや社内ツールを使用する方法もあります。
他にも、Targetをモデルとして分けずにセットアップ時にマスクを適用して分けたり、モデルとしては左右の片側のみTargetを作成してそれをセットアップ時に反転適用する方法などがあります。
今回はMayaのデフォルト機能の[Paint Blend Shape Weights Tool]を使用してTargetを分ける方法をご紹介します。
手順
Blend Shapeを設定
①ベースとなるモデル(以降Base Mesh)と表情モデルのBlend Shape Target(以降Target)を用意
②Blend Shapeを適用
Target、Base Meshの順に選択 > Deform > Blend Shape
③Shape EditorやChannelBox/Layer Editorで適用したBlend Shapeを有効にする
Windows > Animation Editors > Shape Editor > 適用したBlend Shapeの値を1に
Paint Blend Shape Weights Toolでペイント
①Paint Blend Shape Weights Toolを有効にする
Blend Dhapeを適用したBase Meshを選択 > Deform > Paint Weightsカテゴリ > Blend Shapeの□
②ペイントする
- 白色: Blend Shape Weight値1という意味
- Blend Shapeの形状変化が最大
- 黒色: Blend Shape Weight値0という意味
- Blend Shapeの形状変化なし
- グレー: 白黒の割合でBlend Shape Weightの値を設定
③複製してオブジェクト化
②の結果の状態で複製して、オブジェクト化することでパーツ分けしたターゲットの完成です。
ペイントしたものを書き出し
Paint Blend Shape Weights Tool > Attribute Maps > Export > Map name: Export
Base MeshのUV展開が終了していれば、Paint Blend Shape Weights Tool で塗ったものを画像として書き出すことができます。
画像を読み込んで白黒を設定
Paint Blend Shape Weights Tool > Attribute Maps > Import
ペイントせずにPhotoshopなどで書いた画像を読み込むことでPaint Weightsを設定することもできます。