メモ:Blender起動オプション

blender –helpを記載。

Blender 2.45 (sub 0) Build
Usage: blender [options ...] [file]

Render options:
  -b 	Render  in background
    -S 	Set scene 
    -f 	Render frame  and save it
    -s 	Set start to frame  (use with -a)
    -e 	Set end to frame (use with -a)
    -o
	Set the render path and file name.
      Use // at the start of the path to
        render relative to the blend file.
      The frame number will be added at the end of the filename.
      eg: blender -b foobar.blend -o //render_ -F PNG -x 1
    -F
	Set the render format, Valid options are..
    	TGA IRIS HAMX FTYPE JPEG MOVIE IRIZ RAWTGA
    	AVIRAW AVIJPEG PNG BMP FRAMESERVER
    (formats that can be compiled into blender, not available on all systems)
    	HDR TIFF EXR MPEG AVICODEC QUICKTIME CINEON DPX
    -x 	Set option to add the file extension to the end of the file.
    -t
Use amount of 
for rendering

Animation options:
  -a 	Playback 
    -p  	Open with lower left corner at , 
    -m		Read from disk (Don't buffer)

Window options:
  -w		Force opening with borders (default)
  -W		Force opening without borders
  -p    	Open with lower left corner at , 
                      	and width and height , 

Game Engine specific options:
  -g fixedtime		Run on 50 hertz without dropping frames
  -g vertexarrays	Use Vertex Arrays for rendering (usually faster)
  -g noaudio		No audio in Game Engine
  -g nomipmap		No Texture Mipmapping
  -g linearmipmap	Linear Texture Mipmapping instead of Nearest (default)

Misc options:
  -d		Turn debugging on
  -noaudio	Disable audio on systems that support audio
  -h		Print this help text
  -y		Disable script links, use -Y to find out why its -y
  -P 	Run the given Python script (filename or Blender Text)
  -R		Register .blend extension
  -v		Print Blender version and exit

ていうか、ウィンドウサイズを指定して起動ってないのかorz
GameBlenderを配布するとしたら、環境ごとに画面サイズ違うのをどうやって統一するんだ・・・。

GameBlenderでTkinter

単にテキストボックスを表示するだけのコードです。

Tkinterを使う目的は主にゲームの日本語チャットウィンドウを想定。
気になる問題はTkinterにスレッド使っていいのか、最前面化が常に可能か、GameBlender終了時に後処理としてデストラクタできるか等。

※検証コードです、きちんと終了処理してません。

import Tkinter as tk
import ScrolledText as st
import Rasterizer as r

r.showMouse(True)

if not hasattr(GameLogic, 'tk'):
	GameLogic.tk = tk.Tk()
	GameLogic.st = st.ScrolledText(GameLogic.tk)
	GameLogic.st.pack()

if hasattr(GameLogic, 'tk'):
	GameLogic.tk.update()

メモ:BlenderのMQOインポータ、VC++2008でboostビルド

kykさんのMQOインポータがpython2.5で動かないので、ビルドしてみる。

用意したもの:
VC++2008 Express
Python2.5
Boost1.34.1
ICU3.8
GANGuソース。

手順
1、ICUの最新バイナリを適当なディレクトリに配置。
2、VC++2008のコマンドプロンプト起動。
3、boostのアーカイブを展開して配置。
4、bjamをビルドしてboostのルートディレクトリにコピー。
5、boostのソースに以下のパッチを当てる。

http://article.gmane.org/gmane.comp.lib.boost.user/27205/match=vc9

6、以下のコマンドを実行
set PYTHON_ROOT=c:\dev\python25
set PYTHON_VERSION=2.5
bjam -sICU_PATH=c:\dev\icu –toolset=msvc –prefix=c:\dev\boost install

7、GANGuをビルド。ビルドファイルの出力先やリンクライブラリの名前を修正する必要あり。

8、 できたGANGu.dllをGANGu.pydにリネームして%PYTHON_ROOT%\dlls内へ配置。

9、 GANGu同梱のmqo.pyを%BLENDER_ROOT%\.blender\scriptsへ配置。

10、Blenderのimportメニューから「MQO」を実行してインポート。

11、なぜかUVテクスチャの参照がされてないのでUVエディタの画像リストからファイル指定して完了。

終わり。OBJ形式でインポートだと法線が逆になってたりと色々と厄介なので、MQOインポータの利用を推奨します。

ていうか、GANGuのプロジェクトでboostのソース参照してるけど、ひょっとしてこれってboostビルドしなくてもcppソースを参照させておけばGANGuビルドできたのかな・・・。

メタセコのモデル Blenderにインポートしたモデル

左:メタセコ、右:Blender

※このモデルデータはCypherS TufTさんのデータを利用させていただいています。

メモ:GameBlender資料(wiki、API、ReleaseNote)

http://wiki.blender.org/index.php/Game_Engine
http://www.blender.org/documentation/pydoc_gameengine/PyDoc-Gameengine-2.34/GameLogic-module.html
http://theboomshelter.com/hss.html
http://www.blender.org/development/release-logs/blender-233/game-engine-with-225-physics/
http://www.blender.org/development/release-logs/blender-234/game-blender/
http://www.blender.org/development/release-logs/blender-235a/game-engine/
http://www.blender.org/development/release-logs/blender-236/#c2113
http://www.blender.org/development/release-logs/blender-237a/gameblender/
http://wiki.blender.org/index.php/Release_Notes/GameEngine
http://wiki.blender.org/index.php/Release_Notes/Notes241
http://wiki.blender.org/index.php/Release_Notes/Notes242/Game_Engine
http://wiki.blender.org/index.php/Release_Notes/Notes243
http://www.blender.org/development/release-logs/blender-245/complete-list-of-bugfixes/