2018-01-17 19:27:10 +05:00
# io_scene_b3d
Blender Import-Export script for Blitz 3D .b3d files
## Installation
2018-01-19 22:26:50 +05:00
* Userspace method: click "File" - "User Preferences" - "Add-ons" - "Install Add-on from File".
2018-01-19 23:10:07 +05:00
The add-on zip file should contain io_scene_b3d directory, including the directory itself.
2018-01-19 22:16:19 +05:00
* Alternative method: copy or symlink the io_scene_b3d directory to blender user directory, e.g. to
2018-01-19 22:26:50 +05:00
%APPDATA%\Blender Foundation\Blender\2.79\scripts\addons\io_scene_b3d
2018-01-20 02:47:24 +05:00
* Search and enable add-on in "User Preferences" - "Add-ons". Click "Save User Settings" afterwards.
2018-01-17 19:27:10 +05:00
## Debugging
2018-01-19 22:16:19 +05:00
* Userspace method: every time you make a change the script has to be reloaded using Reload Scripts command (F8).
2018-01-20 01:27:49 +05:00
* Alternative method: my shortcut, Shift+Ctrl+D in Object Mode. It resets scene, reloads the script and imports test file.
* Somewhat more alternative method (Windows only), my autohotkey script (see the [autohotkey ](https://github.com/joric/io_scene_b3d/tree/autohotkey ) branch).
2018-01-17 19:27:10 +05:00
## TODO
### Import
2018-01-18 23:29:19 +05:00
* Mind that animation is not yet implemented. Working on it!
2018-01-20 00:39:07 +05:00
* Nodes use original quaternion rotation that affects user interface.
Maybe convert them into euler angles.
2018-01-20 01:27:49 +05:00
* Sometimes b3d files contain objects that were joined together in a single mesh
(that's not my fault, see raw json data).
I'm splitting objects with multiple meshes into separate objects
(better than assigning different materials to individual faces)
but I can't effectively split large meshes that use the same material.
2018-01-20 02:40:21 +05:00
Maybe try proixmity-based clasterisation. Converting those meshes into
a set of instances is even more complex, considering that differently
scaled and rotated objects also can overlap.
2018-01-17 19:27:10 +05:00
### Export
2018-01-20 01:27:49 +05:00
* Exported files (script by Diego 'GaNDaLDF' Parisi) sometimes contain animation keys
that go outside the animation. Assimp doesn't import them so I've added an extra frame, just to be safe.
2018-01-17 19:27:10 +05:00
It's better to recalculate the animation using existing keys.
2018-01-17 20:43:49 +05:00
UPDATE: could not reproduce, reverted. Will double check later.
2018-01-17 19:27:10 +05:00
## License
This is all GPL 2.0. Pull requests welcome.
The import script is a heavily rewriten script from Glogow Poland Mariusz Szkaradek.
I've had to rewrite all the chunk reader stuff and all the import stuff, because Blender API
has heavily changed since then.
The export script uses portions (copied almost verbatim, just ported to Blender Import-Export format)
from supertuxcart project by Diego 'GaNDaLDF' Parisi. Since it's all GPL-licensed, he shouldn't mind.
The b3d format documentation (b3dfile_specs.txt) doesn't have a clear license (I assume Public Domain)
but it was hard to find, so I just put it here in the repository as well.
2018-01-18 09:40:29 +05:00
## Alternatives
2018-01-18 09:42:33 +05:00
* [Assimp ](http://assimp.sourceforge.net/ ) - doesn't read .b3d animation in most cases, maybe I have acquired a very particular set of files
2018-01-18 09:40:29 +05:00
* [fragMOTION ](http://www.fragmosoft.com/ ) - works fine most of the time, but it's a terrible nagware and the only suitable export is .smd
## References
* https://github.com/joric/gnome