Loading Serialized Object (JPCT-AE)

Started by firstdeathmaker, October 11, 2011, 02:50:17 PM

Previous topic - Next topic

firstdeathmaker

Hi,


im using the mesh serializer plugin to serialize my .obj file. As output I get about 50 single .ser files.

Ho exactly can I load them? I found the Method "Loader.LoadSerializedObject() but that only takes ONE InputStream.

thanks for any answers!

EgonOlsen

That's more an issue with the plugin. The loader loads each sub-object of an OBJ-file and returns them all in an array. The plugin seems to serialize them one by one instead of the while array...maybe it can be extended to save an array instead. However, 50 sub-objects in one file is pretty much. I've never seen such a complex OBJ-file...

firstdeathmaker

That Object file is extracted from a very high detailed CAD Modell. Originally it was ~ 50 MB, now its just 5 MB, but still takes long to load.

By the way: The normal method of loading Object-Files from the /res/raw folder works for us also with files bigger than 1 MB, but it takes quite a while. If we just load the seperate file-parts through the serialized method it works fast for single parts, but sometimes we get an memory out of bound exception (not reliable reproducable).

What exactly is the serializer doing? Is it just a thing of parsing the xml-stlyle .Obj file, loading it into your object presentation data-structure an writing that almost 1:1 as binary down?

EgonOlsen

Quote from: firstdeathmaker on October 12, 2011, 10:17:04 AM
What exactly is the serializer doing? Is it just a thing of parsing the xml-stlyle .Obj file, loading it into your object presentation data-structure an writing that almost 1:1 as binary down?
Yes, that's what it basically does.

firstdeathmaker


BABABLACK_911

Hello Egon,
Is there any other way to convert an OBJ into .SER?
or should we just go with the plugin itself?