Newest Version of OgreMax Breaks With Message:

Started by AGP, June 05, 2013, 09:53:44 PM

Previous topic - Next topic

AGP

Exception in thread "main" java.lang.NumberFormatException: For input string: "f
loat2"

When I replace "float2" with "1" in the xml it comes closer to loading (but breaks for lack of proper UVs).

raft

always post the stack trace in case of an exception.

which 3d editor is that? maya? max?

what exactly dou you mean by lack of proper UV's? no UV's or what?

AGP

Max 2013. Here's the stack trace. The comment about the UVs is for when I edited the XML directly and replaced "float2" with "1". Doesn't apply to this stack trace.

Exception in thread "main" java.lang.NumberFormatException: For input string: "f
loat2"
        at java.lang.NumberFormatException.forInputString(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at java.lang.Integer.parseInt(Unknown Source)
        at com.jmex.model.XMLUtil.getIntAttribute(XMLUtil.java:162)
        at com.jmex.model.ogrexml.OgreLoader.loadVertexBuffer(OgreLoader.java:34
8)
        at com.jmex.model.ogrexml.OgreLoader.loadSubmesh(OgreLoader.java:520)
        at com.jmex.model.ogrexml.OgreLoader.loadMesh(OgreLoader.java:694)
        at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:241)
        at com.jmex.model.ogrexml.OgreLoader.loadModel(OgreLoader.java:193)
        at OgreToBones.createAnimatedGroup(OgreToBones.java:134)
        at OgreToBones.initialize(OgreToBones.java:160)
        at OgreToBones.loadModels(OgreToBones.java:256)
        at OgreToBones.<init>(OgreToBones.java:67)
        at OgreToBones.main(OgreToBones.java:337)

raft

Quote from: AGP on June 05, 2013, 10:11:30 PM
The comment about the UVs is for when I edited the XML directly and replaced "float2" with "1". Doesn't apply to this stack trace.
ok but what exactly dou you mean by lack of proper UV's? no UV's or what?

what happens when you try to open this file with OgreMax viewer?

AGP

#4
The file has UVs, but messing with the "float2" lines breaks them.

The binary still works. But that doesn't help with Bones.

raft

you still didn't answer ny question.
Quotewhat exactly dou you mean by lack of proper UV's? no UV's or what?

try to convert that working binary with OgreXMLConverter and see if that helps.

AGP

In point of fact, I have answered it.

And I'm surprised to say that the product of OgreXMLConverter still didn't succesfully convert to bones. But I can tell you that the product of OgreMax 2.4.3 did (and 2.4.6 doesn't).

AGP

That is to say, a binary generated by 2.4.6 couldn't be successfully converted into a usable XML for conversion into bones.

raft


AGP


raft

no, send the xml and binary file please. I have no program to open the max file.

I've sent you my email

raft

this looked like a flaw in the latest version of OgreMax. you converted to xml format with OgreMax right? after manually changing float2 to 2 (not 1) Bones successfully loaded the model. I dont have the texture but it seemed okey to me.

I couldn't convert to xml with OgreXMLConverter yet since my version is Ogre tools is 1.7.4 but the binary file is created with 1.8. To upgrade to 1.8 I need to upgrade my Ubuntu which will take some time.

I would suggest sticking to older version of OgreMax if there is no problem with that. also contacting with OgreMax author may help.


AGP

I've e-mailed OgreMax's Derek about this. I'll report his response, but I expect it to be something to the tune of "I can only concern myself with the people using Ogre itself." Thanks for the "2" tip, I suppose I should've tried it myself.

raft

the Ninja.mesh.xml file gives the clue, that "float2" value should actually be "2" ;)

AGP

My expectation was close enough:
"Hello,

OgreMax 2.4.5 was updated to have its XML mesh and skeleton format to match to newest version of the Ogre3D 1.8.x release (actually, the OgreXMLConverter tool, since the Ogre3D library itself doesn't have an XML format).

Since the newest Ogre3D 1.8.x and 1.9.x releases allows different types other than floats to be used (for example "short2"), it would make more sense to adjust your software to support either "2" or "float2" since this is how all the Ogre3D versions are going to work.

-Derek"

My response was to ask him for a backwards-compatibility option. The alternative for us I think would be to manually edit the XML parser. I'll post his second response, though.