FC2ブログ

スポンサーサイト

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

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

How to export Blender FBX for "MH-Library for XNA 4.0"

Prerequisite


Following this entry to setup your exporter plugin.

Common Setting


All exports below are needed to be set Scale Value as 1.



You can find Scale in Object Tab in Property.

Blender have a function to apply scale to vertices without breaking your mesh.








Export Model without Bones


These are required in Blender before export.
-Create a Object ( or Objects ).
-Apply Material to all Object.
-Apply Texture to all Material.
-Apply UV to All Object.
--Please make sure that Coordinates=UV and Layer=(your UV Texture name. default is UVTex) in Mapping in Texture Property Tab.

Then export.



You can use this FBX file in Model (Blender) : MHL Content Pipeline.
Keep mind your Texture files are also needed.(Relative Path between FBX and Texture should be kept.)


Export Model with Bones


These are required in Blender before export.
-Create a Object ( or Objects ).
-Apply Material to all Object.
-Apply Texture to all Material.
-Apply UV to All Object.
--Please make sure that Coordinates=UV and Layer=(your UV Texture name. default is UVTex) in Mapping in Texture Property Tab.
-Create Armature
-Apply the Armature to your Object as Parent, then Apply Bone Weights.

Then export.



You can use this FBX file in Model (Blender) : MHL Content Pipeline.
Keep mind your Texture files are also needed.(Relative Path between FBX and Texture should be kept.)


Export Motion


These are required in Blender before export.
-Create Motion with Model with Bones you exported.

Then export.



You can use this FBX file in Motion (Blender) : MHL Content Pipeline.

Note that your Blender file should have single motion.

I recommend to copy your Blender-File(Model with Bones) as blank motion file each time you start to create new motion.




Export Static Collision


These are required in Blender before export.
-Create a Object ( or Objects ).
--Separate Object properly will improve performance.

You can separate Static Collision on Content Pipeline with ver1.3.2 and above.



Then export.



You can use this FBX file in ColStatic (Blender) : MHL Content Pipeline.

Model FBX file is also able to be processed by ColStatic Pipeline ( will ignore Materials and Textures ). Though this cause less performance.


Export Dynamic Collision


These are required in Blender before export.
-Create a Dynamic Collision Object ( or Objects ).
--See below entry about "Create Dynamic Collision" objects.

Then export.



You can use this FBX file in ColDynamic (Blender) : MHL Content Pipeline.


Create Dynamic Collision - Sphere


First, add Sphere in Blender.



then modify position, size as you wish. keep it as sphere.



Name your object as containing ".MhlCS" like"***.MhlCS***".




Create Dynamic Collision - Capsule


First, add Cube in Blender.



then Set edges belong an axis as longer than others which are same length like below. now modify position and size, also rotate it.



Capsule will be setup as inside this Cube like this.



Name your object as containing ".MhlCC" like"***.MhlCC***".




Create Dynamic Collision - Grab


First, add Corn in Blender.



Keep corn separation value as larger than 5.



then modify position, size, top vertex, and bottom vertex.
if your game has a function to gravity every frame, i recommend leaving bottom vertex as default position.



Grab has a segment and a base position.
segment is defined by top and bottom vertex. and base position is center of others.
if your game has no gravity function, move bottom position to beneath as below to keep your model on ground.



Name your object as containing ".MhlCG" like"***.MhlCG***".




Attach Dynamic Collision to Bone


Attached Dynamic Collision will move along Motion.

First, create your armature.
then select your Collision Object and open Object tab in Property, set Parent bone in Relations.



Furthermore open Object Constraints in Property and add Copy Transforms Constraint, set Parent bone.



now, Edit and Export your Collision Objects.


Sample Blender File


You can download sample Blender File from Download Page.

関連記事

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

Comment

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

Nikukyu

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

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