FC2ブログ

スポンサーサイト

上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。

Tag:スポンサー広告  page to top

Prepare Export Plugin

Where the plugin should be.


We need to modify export_xna.py which can be found at ...

[Blender 2.57]
C:\Users\[User Name]\AppData\
Roaming\Blender Foundation\Blender\2.57\
scripts\addons\io_export_anim_mesh_xna\export_xna.py



[Blender2.58]
C:\Program Files\Blender Foundation\
2.58\scripts\addons\io_export_anim_mesh_xna\export_xna.py



[Blender2.59]
Unfortunately Blender doesn't contain this plugin anymore.
Download Blender 2.58 then copy io_export_anim_mesh_xna Directory to

C:\Program Files\Blender Foundation\2.59\scripts\addons

or you can download modifiedfile from here.




Modify export_xna.py


Now open export_xna.py with Text Editor.These are needed to be modified.

1. Plugin export material as Lambert when Diffuse is Lambert.
-XNA will ignore Specular when you choose Lambert.

Line : 971
 if mat.diffuse_shader == 'LAMBERT':
To
 if mat.specular_intensity == 0:




2. Plugin export half value of Specular Intensity.
-Thus max intensity is 0.5.

Line : 964
 mat_spec = mat.specular_intensity/2.0
To
 mat_spec = mat.specular_intensity




3. Specular Hardness is fixed as 80.
-This, is critical, cause almost disabled Specular in XNA.

Line : 1008
 file.write('\n\t\t\tProperty: "ShininessExponent", "double", "",80.0')
To
 file.write('\n\t\t\tProperty: "ShininessExponent", "double", "",%.1f' % mat_hard)






Setup Plugin in Blender


Run Blender then open UserPreference. You can find in File Menu.

blender_xna01.png


1. Select Add-ons tab.
2. Select Import-Export.
3. Check Import-Export: Export XNA format (.fbx).

Now save UserSetting and exit.
関連記事

Tag:XNA4.0  Trackback:0 comment:0 page to top

Comment

comment form
(編集・削除用):
プロフィール

Nikukyu

Author:Nikukyu
なんちゃってゲーム開発者をしています。

上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。