Open dixx opened 10 years ago
.x: Materials are saved by Blender by name and unsorted, with special chars replaced by '_'.
So this seems to be a bigger issue, as the Blender export of .x and .3ds differ substantially. For instance, .3ds exports the XYZ orientations 'as is', and .x exports Y and Z flipped. .3ds exports right-handed, .x exports left-handed. This is a biiiig mess.
Blender 's .x export only supports the following lightings: specular, diffuse, emmissive. Also the shinieness factor is supported. The transparency must be set to the applied texture, instead of the material. Blender's .3ds export seems to support all and everything so far, has to be confirmed with Irrlicht import.
Blender 2.7 supports alot more .x export functions, however the mesh is still drawn 'mirrored' just remember to export left-handed. It does not provide more material properties than before.
Conclusion: with the current export script, .x seems to be no option for animated objects because of the lack of properties saved. We must check other animation mesh formats, like ms3b and b3d, where the latter seems to be preferred by Irrlicht.
b3d Export is not supported in Blender; However, here is a script for it: http://www.rtsoft.com/forums/showthread.php?7509-Blender-B3D-2-6x-Export-script
It seems that in any case, either the Blender export is broken or the Irrlicht import doesn't work well. .x is shit, .b3d is big shit, .ms3d seems to break the mesh and leads to a crash in the game for unknown reasons. In no case were the material names, textures or reflection supported.
ms3d corrupts the mesh if does NOT consist of only one big triangle fan. Blender does not support this properly. So there is only one way: to check if Blender support is ok, and if so, write an own Irrlicht mesh loader for either .x or .b3d.
.md2 (Blender export script can be found here: https://groups.google.com/forum/#!topic/junaio-developer/9NUaSP5V28w) supports basically the same as b3d.
ok, let's try to tweak the .x Irrlicht importer to get the values correctly. Especially the material names, as we can then tweak every material in Irrlicht.
Irrlicht materials don't support names! I'm soooo close to giving up.
.md2 seems to only support one material.
Using Blender, certain materials and properties may be stored for a mesh. What can be retrieved by IrrLicht mesh loaders?
How to export .x correctly: How to export .3ds correctly: