I’m having this problem when I export the .obj file with Maya 4.5 using OBJexport, it doesn’t convert properly to .jme, just returns:
java.lang.NullPointerException
at com.jme.scene.model.XMLparser.Converters.ObjToJme.addFaces(ObjToJme.java:235)
at com.jme.scene.model.XMLparser.Converters.ObjToJme.processLine(ObjToJme.java:158)
at com.jme.scene.model.XMLparser.Converters.ObjToJme.convert(ObjToJme.java:73)
at com.jme.scene.model.XMLparser.Converters.FormatConverter.attemptFileConvert(FormatConverter.java:50)
at jmetool.modelconverter.JmeFormatConverter.convertFilesButtonActionPerformed(JmeFormatConverter.java:357)
at jmetool.modelconverter.JmeFormatConverter.access$400(JmeFormatConverter.java:45)
at jmetool.modelconverter.JmeFormatConverter$5.actionPerformed(JmeFormatConverter.java:246)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
I am aware that Maya doesn’t create the .mtl file, but I read that it isn’t necessary so I’m not too worried about that. I’m not sure what would cause this problem (the example maggie.obj file converts properly). I don’t know if it is a Maya issue or not. Any help would be appreciated.
I’m using the Jme Format Converter app.
I have found that .obj files which don’t define faces in the format:
f 1//1 2//1 4//1
( vertex / texture vertex / vertex normal )
cause errors. Certainly, the .obj exporter from Lightwave creates face entries which look like this:
f 1 2 4
( vertex )
which causes errors. The importers robustness in this regard could be improved.
whilst it isn’t the same problem mentioned, its worth checking the format of the .obj file - perhaps you could post the .obj file ?
yes, please supply us with any models that do not load properly. Because models tend to have slight variences here and there, it’s sometimes hard to catch all cases.
Email me the obj and I’ll check it out. See if I can fix it. cep221atgmaildotcom
Alright, the obj file is
http://www.geocities.com/valohtarspace/flipper.txt
I had to rename it to flipper.txt so it would upload.
I did triangulate it if that makes any difference.
If you update from CVS the file ObjToJme it should load. I commited a bug fix (just two lines extra of code).
Thanks, it works now.