なんとな~くしあわせ?の日記

「そしてそれゆえ、知識そのものが力である」 (Nam et ipsa scientia potestas est.) 〜 フランシス・ベーコン

MikuMikuPenguinをさっそく試してみた

LinuxMMD互換ツールを作る偉業を半年でやっちまったハッカーがいるらしい。

ソースの中身を閲覧

GitHubリポジトリは以下
sn0w75/MikuMikuPenguin · GitHub

ところどころコメントアウトがあるが、普通に動きます。

環境構築

いつものごとく、私の環境はDebian 7.3 x86_64 GNU/Linuxです。足りないライブラリをダウンロードする。
sidは使ってないのでbulletは自前ビルドになります。

// なければOpenGLのライブラリをインストールする
# apt-get install libgl1-mesa-dev
// 新しいOpenGL系のライブラリをインストール
# apt-get install libglew-dev libglm-dev libglfw-dev
// bulletをダウンロードしてきてコンパイルしてインストール(なんか管理者権限だと怒られた)
$ wget https://bullet.googlecode.com/files/bullet-2.82-r2704.tgz
$ tar xvf bullet-2.82-r2704.tgz
$ cd bullet-2.82-r2704
$ ./autogen.sh
$ ./configure
$ make && make install

// MMPのダウンロードとコンパイル
$ git clone https://github.com/sn0w75/MikuMikuPenguin.git
$ cd MikuMikuPenguin
$ autoreconf
$ ./configure
$ make

// makeを通すまで2箇所ほどコメントアウトしたけど、まあ動いてた

// makeが成功するとプロジェクトのトップにpmxができるのでそれを実行
hiroyuki@cowgirl:~/git/MikuMikuPenguin$ ./pmx
This is PMXViewer, a demonstration using the MikuMikuPenguin library.
Usage: pmx [options] model_file.pmx motion_file.vmd
Options: 
  -s	Play sound file to go with VMD motion
	Only formats compatible with your build of SDL2_mixer are accepted.
	If libmmp was compiled without SDL2_mixer support, no music will play.

  --help	display this help and exit
  --version	output version information and exit

FOR JAPANESE DOCUMENTATION, SEE:
<file:///usr/local/share/mikumikupenguin/doc/README_JP.html>

Report bugs to <ibenrunnin@gmail.com> (English or Japanese is ok).

// あとは適当にpmxファイルとvmdファイルを引数に渡してやると画面が上がってくる

スクリーンショット

とりあえずバイト戦士を使わせていただいた*1
画面上はちゃんと動いているのだが、スクリーンショットに撮るとポリゴンが崩れる…なぜぇ

f:id:panzer-jagdironscrap1:20140113210907p:plain

*1:お借りしたファイル:バイト戦士v1.0 sm14642015