使い方 - Akiya-Research-Institute/MocapForAll-Receiver-Plugin-for-UE4 GitHub Wiki

(チュートリアル動画)
MocapForAll - Animate your character in Unreal Engine

目次

ダウンロードとセットアップ

ダウンロード

Releases からzipファイルをダウンロードします。

image

Setup

zipファイルを解凍し、.uprojectファイルをダブルクリックします。

image

VRMを使わない場合は「はい」を選択します。VRMを使う場合は、VRM4Uのインストールを参照してください。

image

例1: Transformの受信

受信プラグイン側の設定

プラグインコンテンツを表示しサンプルマップを開く

"Content Browser > View Options > Show Plugin Content"をオンにし、"Content Browser > MocapForAllReceiver Content > Map > Sample1_TransformCubes"を開きます。

image

設定

"World Outliner > BP_Sample1_TransformCubes"を選択、"Details > OscReceiverComponent (Inherited)"を選択します。下記の変数を編集します:

  • OSC Server IP Address: MocapForAllと同じPCで実行している場合は127.0.0.1、他のPCで実行している場合は受信プラグインを実行しているPCのIPアドレスうを入力します。
  • OSC Server Port: 他のアプリで使用されていないポートを入力します。 image

MocapForAll側の設定

MocapForAllで、

  • "Settings > Data export > VMT protocol > Send tracking points"をオンにします。
  • "Settings > Data export > VMT protocol > Send tracking points> As relative position to HMD"をオフにします。
  • "Settings > Data export > VMT protocol > Send tracking points> Tracking points to be sent"をオンにします。
  • "Settings > General > Capture hand" if you want to capture finger movements.をオンにします。
  • "Settings > Data export > destination IP address for VMT and VMC"に、受信プラグインで設定したものと同じIPアドレスを設定します。
  • "Settings > Data export > VMT protocol > Send tracking points"に、受信プラグインで設定したものと同じポートを設定します。

image

実行

受信プラグインのプロジェクト側でPlayをクリックし、MocapForAllでStart Captureをクリックします。

例2: MetaHumanを動かす

MocapForAll側の設定 _

"Settings > General > Character"で、"VRM runtime load"以外を選択します。 その他の設定は、Example1と同じです。

MetaHumanのインポート

MetaHumanQuixel Bridgeからエクスポートします。

image

MetaHumanのBPの作成

新規BPを作成します。

image

BP_TrackerToControlRigを親クラスとして指定します。

image

作成した新規BPを開き、skeletal meshコンポーネントを追加します。

image

インポートしたMetaHumanと同じ性、サイズ、ウェイトのMetaHuman previewのメッシュを選択します。

image

"Components > VmtReceiverForControlRigComponent (Inherited)"を選択し、"Details > Mocap for all"の"OSC Server IP Address"と"OSC Server Port"を設定します。値の決め方は例1と同じです。

image

BPをコンパイルし保存します。

Take RecorderでのMetaHumanのアニメーション記録

新規作成したBPをレベルに配置します。 Floorと新規BPを選択し、位置を(0,0,0)にリセットします。

image

"Window > Cinematics > Take Recorder"を開きます。

image

"Take Recorder > Source > From Actor > NewBlueprint"を選択します。

image

PlayとTake Recorderウィンドウの赤い丸をクリックします。 Animationファイルが"Content > Cinematics > Takes > YYYY-MM-DD > Scene_n_nn_Subscenes > Animation"に生成されます。

image

SequencerでのMetaHumanのアニメーション再生

BP_YourMetaHumanをレベルに配置します。

image

Level Sequenceを追加します。

image

BP_YourMetaHumanのトラックを追加します。

image

MetaHumanの"Body"にAnimationトラックを追加します。

image

MetaHuman_ControlRigをトラックから削除します。

image

スペースキーを押すとアニメーションが再生されます。

例3: VRMを動かす

MocapForAllの設定 __

"Settings > General > Character"で、VRM runtime loadを選択します。 その他の設定は、Example1と同じです。

VRM4Uのインストール

VRM4Uの導入手順に従ってインストールを行います。

VRMのBPの作成

新規BPを作成します。

image

BP_TrackerToControlRig_VRM を親クラスとして指定します。

image

作成した新規BPを開き、"Class default"をクリックし、"Details > VRM > VRM Asset List"に使用するVRMのAsset Listを設定します。

image

"Components > VmtReceiverComponent (Inherited)"を選択し、"Details > Mocap for all"の"OSC Server IP Address"と"OSC Server Port"を設定します。値の決め方は例1と同じです。

image

BPをコンパイルし保存します。

FootIKの調整

Take RecorderでのVRMのアニメーション記録

Example2と同じです。

SequencerでのVRMのアニメーション再生

使用するVRMのskeletal meshをレベルに配置します。

image

Level Sequenceを追加します。

image

SK_YourVrmModel のトラックを追加します。

image

Animationを設定します.

image

スペースキーを押すとアニメーションが再生されます。