The DirectX Exporter exports Blender(241 version) scenes into DirectX text file format (.x)
How to use this exporter?
-Basically this exporter can export from Blender ,Mesh objects,Armature ,their animations,Materials,UV texture coords and the reference of the image,normals.
Select the exporter in the Blender Menu-File-Export-DirectX(.x),or load the DirectXExporter241.py in the Blender text editor and run by pressing Alt+P.That's what you will see.
Important!! When exporting a 3d window must be visible.
The toggle buttons if selected: Anim
- will export animation Flip norm
- will invert normals direction Swap zy
- will swap the Z-axis with Y-axis Flip z
- will turn the right handed system used by Blender(OpenGL) in the left handed system used by DirectX . Speed
- will set a speed factor for the animation(default 25) Export All
- exports all the scene Export Sel
- exports the selected object (only meshes) Bl.normals
- export Blender normals recalc.no
- recalculate vertex normals(the average of the face normals ) no smoth
- solid faces,the vertex has the the normal of the face
In the download page there are some examples which shows basically what the
exporter can do.In the first example(women.blend) an animated mesh parented to an armature is exported.It is reecomended to export only one mesh when armatures are used.The exporter doesnt take count of the size ,so before parenting the size must be
applied by pressing Ctrl+A and confirm.(it will apply rotation too).
(Flip z , Swap zy, Anim were selected in the exported example)
-The second example shows how to export UV textured images and materials together.The exported .x file has only the reference of the image file.so you must provide in the same folder the image file.
The third example includes a constraint animation.It supports at the moment only armature,mesh and costraints.(no tracking).This part,anyway needs more work
to be perfect.
The fourth example is a simple scene with six meshes parented to each other.It shows how to export object hierarchies.
Directly it's not possible to export Inverse Kinematics.Anyway it's simple to keyframe all the bones in Blender.If you have an Action (skeleton animation) which uses Inverse Kinematics it can be baked by clicking over "Baked" button in the Action Window menu and the animation will have keyframes for all the bones.Use the new action(will be named Action.Baked)to export the animation.
Before exporting parent the separated chains or bones with their parents.No separated chains can be exported.
When rigging create vertex groups manually including all vertices in any group(even it doesnt move)
Most of the problems opening the exported files are created by the double vertices.To avoid this, open the exported file in Mview(DirectX8 SDK).Click on MeshOps-Vertex Selection and click over the object to select a vertex.Now click on MeshOps-Weld vertices.In the popup window select "Remove Back To Back Triangles" , "Regenerate Adjacency" and "Apply".Resave the file.This way will get a perfect DirectX File Format.
The examples has been tested with Deep Exploration, Mview,3D Object Converter,
and Irrlicht viewer.If you have troubles with exporting in .x file format for your engine or want to report any bug contact me at firstname.lastname@example.org
I would like to thank the guys who has contributed to this exporter(especially Oin from blender.org community)
(C) Arben OMARI Feb. 2006
DirectX Exporter for Blender 241 Guide