TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Results 1 to 17 of 17

Thread: Blender Toolkit

  1. #1
    Registered: Aug 2001
    Location: Virginia, USA

    Blender Toolkit

    Spurred by Keyla asking about motions, I figured we need more exporters for Blender.

    • Import/Export E files directly (no 3ds conversion)
    • ImageMagick included for reading and writing GIF textures.
    • Convert to and from BVH

    One thing to keep in mind when animating is that you can't change the length of bones, and can only change the offset of the root bone. (Actually, that might not be true. The MI would seem to accept multiple offset components, but I've never seen a model that used it.) So after importing you should go through and lock the scale and offset boxes. It also helps to anchor the limbs so the head of each bone is connected to the adjoining tail. BVH doesn't do this automatically, so when you export the unconnected bones it dumps everything with location/rotation. Just don't anchor to torsos or things get weird.

    I'll keep working on adding direct import/export. There's some minor inconsistencies with the quaternions I need to get straight.

    By the way, if anyone has a Kinect, I saw someone made a mocap rig that writes BVH files.

  2. #2
    Registered: Jan 2008
    Location: Sweden
    Now this is good news!
    I've been longing for a such exporter for quite some time now, I did contact Shadowspawn about it months ago too without any go, as he also were working on a similar one.

    I'll download it ASAP to try it out and give some feedback if necessary.

  3. #3
    Keyla the Otter
    Registered: Mar 2009
    Location: USA
    Now why wasn't I told about this?

    It's nice to see an alternative solution to my "stick man direction" problem with the motion editor. I'll have to take a look at this and see what I can do .

  4. #4
    Registered: Sep 2011
    Location: Germany
    I tried many times installing the E-Plugin in different ways. It seems it doesn't works for me. Really want to know how to install it on WinXP-32 systems? Already read all informations in "Readme.txt". Blender-Version 2.59 already includes "Python 3.2", but "Python 3.2" is also installed seperately. Every time I get this warning message: event has invalid window!. I don't know if it is necessary to set a "pythonpath" or how it would be set correctly. There are only some few informations about Python-Version like 2.2 up to 2.6, but no one for 3.2. So I tried and tried for nothing. Admin; set "pythonpath" to key "C:\Python32;C\Python32\Lib;...etc". It seems to be impossible...No more ideas? Really want to getting start it.
    Last edited by brush; 9th Dec 2011 at 05:42.

  5. #5
    Looking Glass Toolkit for Blender 2.5

    1. Install Python 3.2.

    2. Install Blender 2.5.

    3. Install the E plugin.
    Copy "io_scene_e" to your Blender addons directory.

    I have XP Pro 32-bit on my old comp and it works for me. I install first Phyton 3.2 and change the path installation to C:\Program Files\ and after that I installed Blender 2.61. Then, I copy E plugin in the path of Blender addons directory.
    I hope this will help you.

  6. #6
    Registered: Sep 2011
    Location: Germany
    After new installation of Python3.2 and Blender2.61 the Blender console displays: "found bundled python: C:\*\Blender2.61\2.61\python". That means for me Blender doesn't notice the main Python32. So it can only uses its own one.
    Later, after installing the E-Plugin both menus (Import/Export) show "e-file (.e)", but the console get the warning-message: "event has invalid window!". After restarting Blender the E-plugin is autom. deactivated. What's about setting a "PYTHONPATH" to declare Phython32 as a public variable?

    OT: There is also an addon called "DarkExporter" by Elenir. but temporary there is a problem caused by BlenderAPI. So I tried Blender2.59 at least.
    Last edited by brush; 2nd Jan 2012 at 21:14.

  7. #7
    Registered: Jan 2001
    Location: Formby, NW England
    I wanted to make a pose (rather than a proper animation), but even so I found the motion editor too hard to work with, so I looked into this.

    I couldn't get the Python scripts to run in Blender so I installed Python separately and ran them from the command prompt.

    After a bit of trial and error, I found that the bvh import settings need to be Y forward and Z up, otherwise the exported motion is contorted.
    Those aren't the default settings, but the bvh import script can be edited. Open up [blender folder]\[version number]\scripts\addons\io_anim_bvh\

    On line 121 change default='-Z' to default='Y'

    Then, on line 133 change default='Y' to default='Z'

  8. #8
    Registered: Oct 2004
    Location: Ireland/Poland
    I'm working on a motion importer for 3dsmax and I'm having a hard time getting the right bone orientation. All the motions I load make no sense, as bones get randomly twisted. When I adjust the settings to work OKish for the legs, than the arms get contorted even more...
    Could somebody who managed to import and export correctly some motions using the above script, do a screengrab of the bone structure with the axis orientation of each bone indicated?
    Also I'm not sure if the rotation inheritance should be on for every bone in the skeleton or just for some of them? Or maybe for none of them..?
    If anybody could answer these questions that would be a huge help. Thanks!

  9. #9
    Registered: Sep 2013
    Would anyone be interested in a direct static model .bin import/export addon? I'm writing one now (, and I tried advertising it at, only to find that not a soul gives a toss over there.
    Maybe someone at TTLG cares?

  10. #10
    Registered: Jan 2001
    Location: Formby, NW England
    Any tool that simplifies the process is welcome, but a while ago I wrote a program that uses the existing tools, but automates the process of finding the best bin file (user's obj folder, ep.crf or original crfs) and then finding the best textures using the same rules. And for Blender those textures have to be converted because it doesn't support gif.

  11. #11
    Registered: Sep 2013
    Quote Originally Posted by R Soul View Post
    Any tool that simplifies the process is welcome
    Thanks. I'll make a dedicated post when the tool is feature-complete.

  12. #12
    Registered: Jan 2001
    Location: Formby, NW England

    I've been updating this for Blender 2.8 and it seems to be going well. I've tested it on an AI mesh and an object with multiple parts, with a mixture of texture and RGB materials.

    Most material properties are handled with custom properties. I'd have preferred to have used Blender material properties but there's some awkward inconsistency between what's allowed in Thief and what available in Blender. The only decent match is the texture/RGB colour.

    Using custom properties allows everything else to be kept in one place. The only drawbacks are that the user has to know the correct names and permitted ranges of values.

    The other thing is texture conversion.
    Importing: Blender doesn't support .gif or .pcx, but the inbuilt function for loading images has a semi-automatic way of handling unsupported formats. It can detect when an image is unsupported but the the programmer has to specify a function to run if such an image is found. The existing code for this addon already has a working function. I've also modified the image search code to look for .dds, then .png etc, the same as NewDark. It allows allows .jpg in case someone has that format in their bin to e workflow.

    The original version of this addon had a checkbox options for converting images during import/export but I've removed them because there's no reason for them. Blender cannot load a dummy texture (but it can make a blank placeholder but there's nothing to be gained from that), and NewDark disregards texture extensions so it doesn't matter what ends up in the .bin file.

    Next things:
    * Axles are imported as two vertices only, with no line. It would look better with a line.
    * It would be nice to integrate BSP in to this so we have a 1 click export. Blender can already called command line programs (this is how the Dark Exporter works, using N3ds2e and BSP)
    - It should also be possible to use bintoe to do things the other way, but the process of getting the right textures will be more tricky. And I already have a program for doing all that: (I could do with modifying that to ignore the 3ds conversion)

  13. #13
    Registered: Jan 2001
    Location: Formby, NW England
    Some opinions required.

    It's now at the state where calls BSP and generates a .bin file. That bit has been more or less copied from the Dark Exporter, and I'll be doing the same with the ability to copy the file and delete the temporary ones. I've also allowed for up to 5 game directories - the thinking being that the user may have several FMs in progress (or a main one, and other for testing things).
    Here's a screenshot of the current export options:

    Is that a good balance between flexibility and complexity?

    The other required opinion is on whether or not the name is good. So far I'm calling it the Blender NewDark Toolkit. It has a github page here

    Edit: The BSP feature is working. It also copies to your game dir with an option to delete the temp files. Textures are also copied, and there's an option to choose how to handle replacing files (do or do not) or not to copy anything. The latter option would be useful if you're only using original textures (or EP textures) which don't need to be in txt16.
    (Clone or Download button - Download as zip)
    Last edited by R Soul; 6th Jul 2019 at 19:49.

  14. #14
    Registered: Sep 1999
    Location: Austin, TX
    I don't know enough yet to comment but I'm posting for 1, to bump it so people see new message again, and 2 to thank you for your work; it will come in handy when I'm ready to tackle this part.

  15. #15
    Registered: Oct 2004
    Location: Ireland/Poland
    Quote Originally Posted by R Soul View Post
    I've also allowed for up to 5 game directories - the thinking being that the user may have several FMs in progress (or a main one, and other for testing things).
    Here's a screenshot of the current export options:

    Is that a good balance between flexibility and complexity?
    I think a combobox would be the best option, as it gives ability to add new paths and select them from a dropdown menu with variable number of items. Paths would be presumably stored in some kind of a user prefs file.
    Setting an arbitrary number of paths only clutters the dialog and always poses a question - why not 6? or why not 8? Or maybe 3 is what 90% of people would need etc... There's never a right answer.

  16. #16
    Registered: Jan 2001
    Location: Formby, NW England
    Advice appreciated. I've now implemented a drop down:

    The config file text is like this:
    "game_dirs": "C:\\Games\\Thief2\\FMs\\BGTest;c:\\something else;c:\\you get the idea",
    (there are other items too, in the JSON format)

  17. #17
    Registered: Oct 2004
    Location: Ireland/Poland
    Looking good to me!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts