Directx import problem

Hi! I’m trying export a cube with default material and uv coordinates from blender → directx → JMP.



I’ve got such error…



java.lang.NullPointerException

at be.stanhebben.x2jme.data.XDMaterial.toMaterial(XDMaterial.java:93)

at be.stanhebben.x2jme.data.XDMeshMaterialList.toMaterial(XDMeshMaterialList.java:57)

at be.stanhebben.x2jme.data.XDMesh.toSpatial(XDMesh.java:91)

at be.stanhebben.x2jme.data.XDFrame.toSpatial(XDFrame.java:63)

at be.stanhebben.x2jme.data.XDFrame.toSpatial(XDFrame.java:63)

at be.stanhebben.x2jme.XFile.toNode(XFile.java:144)

at be.stanhebben.x2jme.XImporter.load(XImporter.java:35)

at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:243)

at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:379)

at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:389)

[catch] at com.jme3.gde.core.assets.SpatialAssetDataObject.loadAsset(SpatialAssetDataObject.java:81)

at com.jme3.gde.core.assets.actions.ConvertModel$1.run(ConvertModel.java:63)

at java.lang.Thread.run(Thread.java:636)









Directx file (untitled.x):




xof 0303txt 0032



Frame Root {

FrameTransformMatrix {

1.000000, 0.000000, 0.000000, 0.000000,

0.000000,-0.000000, 1.000000, 0.000000,

0.000000, 1.000000, 0.000000, 0.000000,

0.000000, 0.000000, 0.000000, 1.000000;;

}

Frame Cube {

FrameTransformMatrix {

1.000000, 0.000000, 0.000000, 0.000000,

0.000000, 1.000000, 0.000000, 0.000000,

0.000000, 0.000000, 1.000000, 0.000000,

0.000000, 0.000000, 0.000000, 1.000000;;

}

Mesh { //Cube_001 Mesh

24;

-1.000000; 1.000000;-1.000000;,

-1.000000;-1.000000;-1.000000;,

1.000000;-1.000000;-1.000000;,

1.000000; 1.000000;-1.000000;,

0.999999;-1.000001; 1.000000;,

-1.000000;-1.000000; 1.000000;,

-1.000000; 1.000000; 1.000000;,

1.000000; 0.999999; 1.000000;,

1.000000;-1.000000;-1.000000;,

0.999999;-1.000001; 1.000000;,

1.000000; 0.999999; 1.000000;,

1.000000; 1.000000;-1.000000;,

-1.000000;-1.000000;-1.000000;,

-1.000000;-1.000000; 1.000000;,

0.999999;-1.000001; 1.000000;,

1.000000;-1.000000;-1.000000;,

-1.000000; 1.000000;-1.000000;,

-1.000000; 1.000000; 1.000000;,

-1.000000;-1.000000; 1.000000;,

-1.000000;-1.000000;-1.000000;,

-1.000000; 1.000000; 1.000000;,

-1.000000; 1.000000;-1.000000;,

1.000000; 1.000000;-1.000000;,

1.000000; 0.999999; 1.000000;;

6;

4;0;1;2;3;,

4;4;5;6;7;,

4;8;9;10;11;,

4;12;13;14;15;,

4;16;17;18;19;,

4;20;21;22;23;;

MeshNormals { //Cube_001 Normals

24;

0.000000; 0.000000;-1.000000;,

0.000000; 0.000000;-1.000000;,

0.000000; 0.000000;-1.000000;,

0.000000; 0.000000;-1.000000;,

0.000000;-0.000000; 1.000000;,

0.000000;-0.000000; 1.000000;,

0.000000;-0.000000; 1.000000;,

0.000000;-0.000000; 1.000000;,

1.000000;-0.000000; 0.000000;,

1.000000;-0.000000; 0.000000;,

1.000000;-0.000000; 0.000000;,

1.000000;-0.000000; 0.000000;,

-0.000000;-1.000000;-0.000000;,

-0.000000;-1.000000;-0.000000;,

-0.000000;-1.000000;-0.000000;,

-0.000000;-1.000000;-0.000000;,

-1.000000; 0.000000;-0.000000;,

-1.000000; 0.000000;-0.000000;,

-1.000000; 0.000000;-0.000000;,

-1.000000; 0.000000;-0.000000;,

0.000000; 1.000000; 0.000000;,

0.000000; 1.000000; 0.000000;,

0.000000; 1.000000; 0.000000;,

0.000000; 1.000000; 0.000000;;

6;

4;0;1;2;3;,

4;4;5;6;7;,

4;8;9;10;11;,

4;12;13;14;15;,

4;16;17;18;19;,

4;20;21;22;23;;

} //End of Cube_001 Normals

MeshMaterialList { //Cube_001 Material List

1;

6;

0,

0,

0,

0,

0,

0;;

Material Material {

0.800000; 0.800000; 0.800000; 1.000000;;

1.000000;

1.000000; 1.000000; 1.000000;;

0.000000; 0.000000; 0.000000;;

}

} //End of Cube_001 Material List

} //End of Cube_001 Mesh

} //End of Cube

} //End of Root Frame

The directx importer is not supported by the core team, theres a link to the contribution thread in the plugin description, maybe the developer answers there.

ok, but what about obj? when i convert obj to j3o… i’ve got mirrored uv coordinates with light material. Only ogre is fully fuctional yet.

Yeah, as stated everywhere its the preferred import path.