Can't load other models via HelloModelLoading.java

I’m having problems loading other .obj models,

The .obj and .mtl files exists, it can find it, but has problem loading.

I tried loading the models I downloaded from http://www3.bc.sympatico.ca/pem/download.htm

:

RocketHelmet and Candy Cane, Non of them work.



Here’s the error message:



java.lang.NumberFormatException: empty String

at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:994)

at java.lang.Float.parseFloat(Float.java:394)

at com.jme.scene.model.XMLparser.Converters.ObjToJme.addVertextoList(Unknown Source)

at com.jme.scene.model.XMLparser.Converters.ObjToJme.processLine(Unknown Source)

at com.jme.scene.model.XMLparser.Converters.ObjToJme.convert(Unknown Source)

at jmepg.HelloModelLoading.simpleInitGame(HelloModelLoading.java:54)

at com.jme.app.SimpleGame.initGame(Unknown Source)

at com.jme.app.BaseGame.start(Unknown Source)

at jmepg.HelloModelLoading.main(HelloModelLoading.java:35)



Does anyone know the solution to that problem?

Which model in paticular? Only a subset of the .obj format is supported. The obj format can get very strange.

Oh, I see. Which loader is fully implemented?



The RocketHelmet and Candy Cane models couldn’t be loaded. They can be downloaded from http://www3.bc.sympatico.ca/pem/download.htm .

The models listed don’t have normals in the input file, that’s why it’s giving you that error. That model should load in its obj format. If you want to make the fix yourself, try to load the .obj file then export it with normals. I"ll commit a bugfix soon and let you know when it’s in the CVS.

Great! Thank you very much.

Update from CVS and try loading the model again. It’s small, so you may want to scale it up some.