Click here to Skip to main content
15,565,747 members
Articles / Mobile Apps / iOS
Technical Blog
Posted 5 Nov 2012


6 bookmarked

Converting DirectX .X Files for Use in Games

Rate me:
Please Sign up or sign in to vote.
5.00/5 (3 votes)
14 Dec 2016CPOL4 min read
How to convert DirectX .X files for use in games

While putting together the UnityXNA article, I cast aside all warnings and threw caution to the wind and spent a bit of time trying to get my 3D starter XNA sample in to the framework, it should come as no surprise from the tenant of that article that I failed, granted I only spent about an hour or so on it but I realized quickly why it was only 2D so far.

That being said, I find myself looking at the UnityXNA source and Unity’s API daring myself to go back and fix it, I may if I have time Open-mouthed smile.

Now one of the biggest barriers I hit was that some of my assets were in Microsoft’s DirectX X .X format, there is no problem for XNA but Unity does not like these, not one bit.

What Formats DOES Unity Support

Image 2

Amazingly, Unity has an astounding amount of support for 3D model formats, including:


Road to Conversion

Image 4

Now quite surprisingly, converting models FROM .X is quite difficult, want a package to SAVE in .X format no problem, but Import!, that’s a one way trip to the funny farm.

After a few hours of searching and installing tools, I eventually came across a solution that not only worked, it was also FREE.


LithUnwrap is primarily a tool for mapping and editing the UV coordinates of low poly models, but it can also read and write models from one format to another.

It supports Importing & exporting LWO, OBJ, DXF, 3DS, ASC, COB, and X files.

So after launching up LithUnwrap, you can open up a model file:


Once loaded, we can simply then save the model to whichever format we want to use, I’ve no particular preference but I generally use OBJ files as they are more commonly supported by other tools, but if you are using Unity and have access to 3D Studio Max (or have a modeler who does), then you can just export to .3DS which Unity also supports:


Just be sure to use the “Model –> Save” options, the export options are for other things.


I could not confirm (just because I didn’t have any assets to test with) if LithUnwrap will also convert / save all the features of a model such as Animations, Bones. It does support Meshes and Textures (including the ability to UnWrap / change the UV mapping of a model) but you should check if you have Animations or Bones in your model if they are also exported. Granted if you have no other option you might just have to live with it and re-create them in your tool of choice.

What Didn’t Work?

Image 8

In my journey, I followed many posts and hints of ways I could convert .X files, here why most of them didn’t work:

  • Milkshape – Was free to TRY and could read .X files. But doesn’t allow saving in the trial. Granted it wasn’t much and you may want to buy Milkshape if you wish.
  • TrueSpace3D – Truespace was made free several years back after Microsoft bought them, can be tricky to find but it's a great Free 3D tool. However, it cannot import .X files no matter what people say! (<Download Link>)
  • Online / downloadable model converters – looked at several but ALL require purchase, anything from $100 to $$$$, seems it’s a very hot market.
  • 3DS Max / Maya – I found hints that these big boy tools may be able to read .X files but couldn’t confirm (plus Autodesk’s site wasn’t working when I tried to check)
  • had some great tools (like xconv) but they generally only convert into 1 format or another, usually for specific Game engines like Modern Warfare
  • Blender is a great and FREE 3D modelling tool, however it can only Export .X files. I think it did Import .X files at one point but such things have been lost to the past (I went back as far as version 2.49b but no luck.)

Back on Story

Right, I’m going back to my futures series, next up is the SunBurn engine which has raised a fair few eyebrows of late with announcements such as this:



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Written By
Architect ZenithMoon Studios
United Kingdom United Kingdom
Long time game developer / IT maniac.
By day working as a lowly Technical Architect for a healthcare software firm, by night Masquerading as the Master Chief of ZenithMoon Studios.

At heart I'm a community developer breaking down lots of fun and curious technologies and bringing them to the masses.

I'm also a contributor to several open source projects, most notably the AdRotator advertising rotator project for Windows and Windows Phone.

After a hefty break with Windows Phone and Windows 8 I'm heading back to my XNA roots to show how beginners and current XNA devs can take their skills forward with XNA's bleak future.

ID&Xbox MVP & Best selling author
[Mastering Unity 2D Game Development] (
[Unity 3D UI Essentials] (

Comments and Discussions

QuestionSenkov Andriy Pin
Member 1292274126-Dec-16 9:45
Member 1292274126-Dec-16 9:45 
Questiongood Pin
butuhtidur24-Dec-16 21:31
butuhtidur24-Dec-16 21:31 
very nice bro
Questionnice Pin
butuhtidur23-Dec-16 23:57
butuhtidur23-Dec-16 23:57 
PraiseRe: nice Pin
Simon Jackson24-Dec-16 1:46
Simon Jackson24-Dec-16 1:46 
GeneralThanks Pin
Mazen el Senih8-May-14 7:40
professionalMazen el Senih8-May-14 7:40 
GeneralRe: Thanks Pin
Simon Jackson8-May-14 8:19
Simon Jackson8-May-14 8:19 
GeneralA slightly easier DIY approach (but still a DIY approach) Pin
Matthew Eanor8-Nov-12 12:13
Matthew Eanor8-Nov-12 12:13 
GeneralRe: A slightly easier DIY approach (but still a DIY approach) Pin
Simon Jackson8-Nov-12 13:48
Simon Jackson8-Nov-12 13:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.