DirectX to J3O Converter

I wrote a conversion application which is able to directly convert DirectX (.x) meshes to j3o format.

It can be used as command - line tool to convert individual files or folders, or as library to read .x files. I wrote it when I had to port many X files to jMonkeyEngine. I hope it may also be of use to other developers.

I uploaded the project on sourceforge: X2JME.


Cool! Is this a “normal” jme3 import plugin? Or do you create the j3o files “by hand”? If its an importer I’d put it into the jMP contributions depot as an import plugin.

It can be used to convert files by hand. But I’ll take a look at turning it into an importer.

Cool thanks for this contribution

I noticed that the version I put online yesterday has a couple bugs which made it unusable. These are solved now, and the new version is online on the sourceforge project as beta 2.

An importer is ready, too.

stanhebben said:
(...) An importer is ready, too.

As a jMP plugin? Well, regardless, I went for a pre-emptive strike and added you as a committer to the jmonkeyplatform-contributions repo ;)

Yup, it’s a jMP plugin. I was waiting for normen to add me, but it seems like you were faster :slight_smile:

The code is uploaded to the contributions repository.

Oh, cool, its all done already? Theres a new feature called AssetManagerConfigurator, did you create one of these (see the other importer plugins for an example)? Its used for some automagic in jMP lately.



I based the importer off the Blender Support plugin, and needed only minor changes in my code to make it work. And yes, I did create an AssetManagerConfigurator.

Hey, I saw you committed the whole “suite” but actually you should only commit the module. The suite is already in svn, the whole contributions are one “suite”. You only create a suite locally so you can use the same project settings as in svn. I moved the plugin folder to a folder called “directx-support” now. I suggest you delete your local xjmp folder, remove all .svn folders from the module suite folders and check out this folder as the new “xjmp” folder to fix your local version.



Ah, thanks for the clarification. I have my local version fixed as you said.


How can I use this? I checked my plugins and I do have the DirectX Mesh File Support downloaded and installed but I can’t seem to find a way to use it. Also I tried downloading from stanhebben’s sourcepage and the zip is corrupted or something. I’d really like to be able to use my .x models. I can’t import them blender, Milkshape3d or even deep exploration. the only place I can use them is by installing my old copy of DarkBasic :S

It’s really frustrating. Can anyone help?

Just install the plugin and import a model as outlined in the manual.

I did.

[java]public void setupModel(){

assetManager.registerLocator(“”, ZipLocator.class);

Spatial model = assetManager.loadModel(“minos.x”);



I get this error.

java.lang.IllegalStateException: No loader registered for type “x”

PS: Thx for the quick reply.

With the SDK, not via code.

No, the plugin is a converter, not an asset manager.

Just copy the .x model (with textures) to your assets and double-click it, which will generate a 3do file.

I do have an asset manager for this thing somewhere, though, if I remember correctly.

EDIT: actually the plugin includes an asset manager. But somehow it doesn’t get registered automatically.

It says can’t import this file :S

Guess it’s a lost cause.

Sry standhebben, missed your post. But I tried doing what you said and I get this unexpected exception

com.jme3.asset.AssetNotFoundException: C:/Users/AtomR/Documents/jMonkeyProjects/BasicGame1/iberiks_walking.x
at com.jme3.asset.DesktopAssetManager.loadAsset(
at com.jme3.asset.DesktopAssetManager.loadModel(
[catch] at com.jme3.gde.core.assets.SpatialAssetDataObject.loadAsset(
at com.jme3.gde.core.assets.actions.ConvertModel$

I tried it with a very old .x file and with a more recent boned, animated .x file and the error was the same.

Put the file in the assets folder.

Oh, an animated file… can you send it? Then I finally have a test case to implement animations. (animation is not yet implemented)

See PM for my e-mail.