Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a tool for Linux (preferably a command-line tool) that can convert from the .x text format to the binary format? I wish to use this format with Irrlicht but the text format is loading very slowly (taking around 8 seconds to load one model), so I'm wondering if the binary format will be faster.

I have seen this question, but that seems to be asking more for pointers on learning the .x format, whereas I am specifically looking for a Linux tool.

share|improve this question
Where are you exporting it from? – iamcreasy Jul 11 '11 at 15:15
I guess it's somehow easy to develop convertor yourself. since your gameengine can probably both decode and encode X file. – Ali.S Jul 11 '11 at 19:20
8 seconds!?! That's an eternity in CPU time. Are you sure you aren't getting the time it takes to read the file from disk, make coffee, load textures, create mipmaps, and THEN parse it? I wrote a text *.x file loader and a P2@333MHz could do it in a fraction of a second. – PatrickB Jul 12 '11 at 0:24
That is to say, I don't think text vs binary is the problem. I'd check out that problem first before you invest too much effort into solving the text->binary problem. If you do want use a binary format, *.x probably is a very poor choice since it is essentially the same as *.x text but using tokens instead of single characters, e.g. comma gets a 32-bit token, semicolon gets a 32-bit token, etc. – PatrickB Jul 12 '11 at 1:00
I haven't used irrlicht in years, but I remember its .x loading gave me endless problems; if there's any other format you can use, you might be best off looking into that. – Riley Adams Jul 13 '11 at 3:03
up vote 2 down vote accepted

As far as I'm aware, there is no such tool -- at least not one dedicated to this task that would run on Linux (or, for that matter, Windows -- the closest you might is meshconvert.exe which was part of the SDK, but even if it would run via wine it probably won't do what you need it to).

The best option is probably to use a tool like Blender to do file format conversions, or write such a tool yourself. At that point it may be better to select a different file format (as you appear to have), since .X is pretty verbose and long-in-the-tooth these days (as PatrickB noted).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.