Using the Mesh Serializer eclipse plugin, and getting ERROR: Can't deserialize

Started by hedgehog, August 12, 2012, 12:40:07 AM

Previous topic - Next topic

hedgehog

I have installed the Mesh Serializer plugin that you have provided, and it has converted my landscape object that I created in Blender. In doing so it split it into three .ser files, but the biggest of these fails to load.

Files and sizes:

OBJ file exported from Blender:
landscape2.obj   - 1395757 bytes

SER files created in the Mesh Serializer plugin:
landscape2_0.ser  - 605552 bytes
landscape2_1.ser  - 1244 bytes
landscape2_2.ser  - 1311204 bytes

In my code I have:

   private Object3D landscape2_0 = null;
   private Object3D landscape2_1 = null;
   private Object3D landscape2_2 = null;

   landscape2_0 = Loader.loadSerializedObject(res.openRawResource(R.raw.landscape2_0));
   landscape2_1 = Loader.loadSerializedObject(res.openRawResource(R.raw.landscape2_1));
   landscape2_2 = Loader.loadSerializedObject(res.openRawResource(R.raw.landscape2_2));

When the app is run it gives the error below - obviously the SER file is too big, but that is how the eclipse plugin created it! How can I make the plugin not generate files that are too big to load?

08-11 23:19:20.435: D/asset(303): Data exceeds UNCOMPRESS_DATA_MAX (1311204 vs 1048576)

08-11 23:19:20.445: I/jPCT-AE(303): [ 1344723560453 ] - ERROR: Can't deserialize object: null
08-11 23:19:20.495: W/dalvikvm(303): threadid=7: thread exiting with uncaught exception (group=0x4001d800)
08-11 23:19:20.505: E/AndroidRuntime(303): FATAL EXCEPTION: GLThread 8
08-11 23:19:20.505: E/AndroidRuntime(303): java.lang.RuntimeException: [ 1344723560453 ] - ERROR: Can't deserialize object: null



hedgehog

An update - I know why there are three .ser files - it is because my Blender scene has three objects!

Anyway, I reduced it down to just the landscape plane, which is an OBJ file of 672690 bytes, but the Mesh Serializer plugin converts this to a .ser file which is 1311204 bytes, as before, which is too big to load.

So the problem still remains, in that the Mesh Serializer has generated a file too big to load into my android app. Perhaps it should warn users, or not allow this to happen? Or is there a way of configuring it to split a big object into multiple smaller objects? Or should I just do that in Blender first, and export multiple smaller objects into a single OBJ file which will then result in multiple SER files?

EgonOlsen

Android puts some size restrictions on different file types. Either ZIP the file and load it as a ZIP or rename it to .mp3. Mp3 has no restrictions.