Skip to content

Instantly share code, notes, and snippets.

@lily46
Last active December 3, 2017 15:46
Show Gist options
  • Save lily46/56cb146a478127e80f28c7051f344088 to your computer and use it in GitHub Desktop.
Save lily46/56cb146a478127e80f28c7051f344088 to your computer and use it in GitHub Desktop.
UnityでMMDのキャラを動かしたい

12/3 Unity 2017

やりたかったこと

  • MMDデータ(pmd)と動きデータ(vmd)を読み込んで動かしたい

MMD for Unityを使ってみる

PMD,VMDの取り込みは難なくできた。 が、読み込んだVMDを使う方法が分からず。 そこで、Locomotionで遷移させてみることに。

https://mmd-for-unity-proj.github.io/mmd-for-unity/howto.html

Locomotionを使ってみる

Editor拡張みたいな感じで、Animatorの設定などが独自のものとなる。 Unity-chanを動かすことはできたが、 MMD for unityで読み込んだデータとの相性があまり良くなかった(と思われる。) 跡で気づいたが情報が4向けだった。古い。

http://0310unity.hateblo.jp/entry/unity_mecanim_starterkit

MMD4Mecanimを使ってみる

9月に更新されているので、今ではこちらを使うのが主流と思われる。 とりあえず、こっちでも動かすことに成功する。

GameObjectとの乖離問題

VMDにアニメと連動して、位置の移動(ルートモーション)が含まれている場合、 あるきモーションを再生中は、GameObjectを固定していても、 モデルだけが独り歩きしてしまうという問題があった。 モデルデータのInspectorで「Apply Root Motion」のチェックを外せばいいみたいが、 それでも解決せず、VMDデータを編集することで事なきを得た。

http://stereoarts.jp/

VMD Editor

https://bowlroll.net/file/22053

成果物

https://twitter.com/46_29/status/937254283912740864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment