Difference between revisions of "Direct Export from Blender"
m (→Horde3D 1.0.0 Beta3) |
m (Removed note about 2.49 working, it works now and it was a python problem.) |
||
Line 4: | Line 4: | ||
A [http://mm-werkstatt.informatik.uni-augsburg.de/public/Horde3D/trunk/Tools/Exporters/Blender/ new exporter] has been developed in the [[Community Branch | Community SVN Branch]], and can be found at the links below. Currently the exporter does export animations, but only in special configurations. | A [http://mm-werkstatt.informatik.uni-augsburg.de/public/Horde3D/trunk/Tools/Exporters/Blender/ new exporter] has been developed in the [[Community Branch | Community SVN Branch]], and can be found at the links below. Currently the exporter does export animations, but only in special configurations. | ||
− | |||
− | |||
The new exporter is based on a python script for blender. To use it just save the Horde3DExport.py file to your Blender's '''.blender\scripts''' directory. After that you may have to restart your Blender application. | The new exporter is based on a python script for blender. To use it just save the Horde3DExport.py file to your Blender's '''.blender\scripts''' directory. After that you may have to restart your Blender application. |
Revision as of 06:58, 20 September 2009
Exporter
Unfortunately, Blender's built-in Collada exporter is not fully compatible with Horde's ColladaConverter tool.
A new exporter has been developed in the Community SVN Branch, and can be found at the links below. Currently the exporter does export animations, but only in special configurations.
The new exporter is based on a python script for blender. To use it just save the Horde3DExport.py file to your Blender's .blender\scripts directory. After that you may have to restart your Blender application.
After restarting Blender there is a new Option Horde3D in the Export menu.
If you select this new option, a dialogue window will be opened for choosing the destination of the converted content.
Settings
- The Export Filename defines the directory and filename used for the model and the geometry file.
- The Shader defines the shader used within the material files used by the exported model.
- The Relative material path will be used for the Horde3D material files. Note that an additional subdirectory for the exported model will be created. It will be named using the base name of the export filename.
- The Relative animation path will be used for any exported animation files
- A Texture subdirectory can be specified when you want to move all textures used by this model to its own directory within the relative texture path. Otherwise the textures will be copied directly to the texture path (may be useful if you use the same textures in several models
- All textures used by your model will be copied to the Relative texture path.
Note that if you create the scene graph- and geometry file in a subdirectory of your Horde3D Geometry and/or Scene Graph path, the exporter won't recognize that and links the geometry file within the scene graph as if there is no sub directory. That's why the example above will create a cube.scene.xml in the Cube subdirectory that contains a link to a cube.geo without the additional subdirectory cube.
Animations
The exporter supports three types of animations:
- Mesh animations: They are exported by playing the timeline from currently setted frame start to frame end and - in every frame - writing the transformations of all objects in the *.anim file. You can use keyframes for that.
- Bone animations: Work similar to mesh animations. The bones are exported as joints to Horde. Because of some problems with the matrices, you should apply scale/rotation to obdata (CTRL+A,1) and set the bone's roll to zero.
- Shape keys: are exported as morph targets. You can find their names in the *.scene.xml as comment.
Textures and Materials
The exporter tries to create the materials in the same way as they exist in blender. As there a few differences to horde, you should currently only use one texture per material (except of bump maps). And there should only be one material per object. Note: not all shaders support joints and not all shaders support transparency! So you have to choose them carefully.
If you don't want to use textures but static material colors ( Note, no procedural textures! ), you have to use a special shader for them. By default the exporter writes the material color for geometry that don't have textures as a uniform to the material files. If you want to use these uniforms the shader must exactly use this uniform name, currently Materialcol. If you want to use the material color you might try using the materialCol.shader.xml in place of standard.shader.xml or skinningMatcol.shader.xml in place of skinning.shader.xml. You can find them in the Community SVN Branch To add your exported model to a scene and fine tune your shaders and materials you could use the Horde3D Editor.
If you have experience with Blender and Python and want to help improving the exporter, feel free to post your comments in the forum's thread.
Horde3D 1.0.0 Beta3
Due to our practical course "Spieleprogrammierung" (Game programming) at the Augsburg University we fixed some issues with the Exporter and the new Horde3D Beta 3. Our exporter uses the new shader/texture settings in the *.material.xml and can be found here
It's only tested with the following settings, others may not work properly:
Shader is automatically set to shaders/model.shader and F01_Skinning. For parallax shading, etc. you need to change the *.material.xml.