www.jpct.net

Bones - Skeletal and Pose Animations for jPCT/jPCT-AE => Bones => Topic started by: AGP on June 05, 2013, 09:53:44 pm

Title: Newest Version of OgreMax Breaks With Message:
Post by: AGP on June 05, 2013, 09:53:44 pm
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).
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: raft on June 05, 2013, 10:06:35 pm
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?
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: AGP on June 05, 2013, 10:11:30 pm
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)
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: raft on June 05, 2013, 10:14:25 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?
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: AGP on June 05, 2013, 10:16:09 pm
The file has UVs, but messing with the "float2" lines breaks them.

The binary still works. But that doesn't help with Bones.
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: raft on June 05, 2013, 10:18:40 pm
you still didn't answer ny question.
Quote
what 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.
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: AGP on June 05, 2013, 10:33:40 pm
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).
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: AGP on June 05, 2013, 10:34:47 pm
That is to say, a binary generated by 2.4.6 couldn't be successfully converted into a usable XML for conversion into bones.
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: raft on June 05, 2013, 10:41:59 pm
can you post or email the xml file?
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: AGP on June 05, 2013, 10:47:10 pm
Shouldn't I send you the max, instead?
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: raft on June 05, 2013, 10:51:04 pm
no, send the xml and binary file please. I have no program to open the max file.

I've sent you my email
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: raft on June 06, 2013, 03:06:35 am
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.

Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: AGP on June 06, 2013, 09:00:19 am
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.
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: raft on June 06, 2013, 05:41:20 pm
the Ninja.mesh.xml file gives the clue, that "float2" value should actually be "2" ;)
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: AGP on June 06, 2013, 08:02:58 pm
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.
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: raft on June 06, 2013, 08:12:40 pm
mm, ok. seems as this is not a bug but a spec change in ogre xml format. I'll fix this in jME code.
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: AGP on June 06, 2013, 09:21:38 pm
I see. Thanks. Please let me know as soon as you've finished.
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: raft on June 10, 2013, 03:27:56 am
I've fixed the float2 issue. you can download the latest zip.
Title: Re: Newest Version of OgreMax Breaks With Message:
Post by: AGP on June 10, 2013, 03:31:39 am
Thank you very much.