投稿

ラベル(g3db)が付いた投稿を表示しています

How to change Blender 2.76 fbx-export addon to libgdx g3dj, g3db export addon.

イメージ
2,3日前にリリースされた最新版 Blender 3D 2.76 のfbx-exporterを libgdx-g3d のコンバーターへ変更する方法をpatch.txtで記述した。この バージョン2.76からOption指定Windowが大きく変わった ので注意してほしい。 改造はAddonの中で fbx-conv をシンプルに実行しているだけなので、当たり前だが非常にstableでメンテナンスも簡単である。 注意点はfbxファイルはコンバート成功後、自動に消されるので、消したくない場合はos.remove(keywords["filepath"])を削除する。 詳細: 以下のpatch.txtをblender-2.76-linux-glibc211-x86_64/2.76/scripts/addons/io_scene_fbx/の__init__.pyに当てるとlibgdxのg3dファイルのコンバートをしてくれるようになる。BinaryかJsonかのオプションも追加される。 https://github.com/libgdx/fbx-conv からfbx-convをDownload & installする。ソースだけではなくBinaryのダウンロードも可能だ。 Linux(Ubuntu15.04でテスト)ではfbx-conv-lin64を実行できるようにPATH環境変数に設定しなければならない。 BlenderでFbx-exportを実行すればよい。メニュー名などは自分の作業効率アップのため変えてみるのもよいだろう。 尚、fbx-conv-lin64をWindows用、MacOS用のコマンド名に変更し、PATHを設定すれば各OSで動作するハズ(未確認)。 Tips:さらに自作のaddonを自動に呼びたければos.remove(keywords["filepath"])の下に他のフォルダーのaddonの関数を書けばよい(importを忘れずに)。私はそうしている。 下図ではlibgdxのoutput optionが追加になっている。defaultでg3djを出力 P.S.1 I'm sorry for English guys! May be, English vers...

Libgdx/new3dapi and blender bone animation.

イメージ
Update 22 May 22 new 3d api were merged to master. Please see  http://www.badlogicgames.com/wordpress/?p=3034 New New3dapi was pushed:-)  I was successful to run it. Thank to libgdx developer. There is a fbx file outputted from blender(It has a material with no texture, a amature animation and no shape keys). Blender 3d ver2.67: Export fbx option (experiment): Update: Forward -Z, Up Y It was converted to g3dj by fbx-conv. I tried to play  g3dj file  by using the NewModelTest(Update:Changed to ModelTest.java) of new3dapi branch (f346efadccfde30327f352a2dee06e1519849906 ). libgdx/new3dapi branch  NewModelTest : *Note* It was not able to execute smoothly by un-intuitive fbx-conv operation and some bugs(?). fbx-conv(WIN32 Ver0.1 There were some compile errors with include-path and namespace though.): > fbx-conv -o G3DJ -f filename.fbx You do not specify the -o option, then fbx file will be overwritten.  Update:Fixed...