New Model stuff

FYI, I'm finding that the majority of the bugs showing up with the conversion to the new binary format is due to the fact that the converter files don't set up the model completely. For some odd reason the previous system would build the majority of the model in *ToJme (i.e. MilkToJme) and then put the rest in during the JmeBinaryReader call. So, now that we are basically using the models as they come out of the *ToJme converters these issues are cropping up. Just wanted to inform in case someone was looking into model loading bugs besides me.

As of right now to get milkshape models converted to Jme binary format and then to be able to load them I still have to modify MilkToJme.java by removing the BinaryExporter and replacing with BinaryWriter.


//BinaryExporter.getInstance().save(finalNode,o);
        JmeBinaryWriter jbw = new JmeBinaryWriter();
        jbw.writeScene( finalNode, o);



This keeps this error to be thrown:

"Binary Header doesn't match.  Maybe wrong file?"



I figure you all already know this, but just in case... should I place as a bug?

Does TestMilkJmeWrite work on your end? That uses the new system.

guurk said:

As of right now to get milkshape models converted to Jme binary format and then to be able to load them I still have to modify MilkToJme.java by removing the BinaryExporter and replacing with BinaryWriter.

//BinaryExporter.getInstance().save(finalNode,o);

Yes, but it's not a full test.



You'll notice that it loads the ms3d file, convertis it and writes it to a ByteArrayOutputStream, but it never ends up as a *.jme file that is then loaded later with JmeBinaryReader.



Try that… and you will see what I'm talking about.



Although… now that I look more closely I see that instead of using the JmeBinaryReader you are using the BinaryImporter… hmm.



(Time clicks by…)



Ahhhhh… yes, that works very nicely. Well done.



Are JmeBinaryReader/Writer then going the way of the Dodo?


Yeah, JmeBinaryReader/Writer will be phased out.