www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: firstdeathmaker on October 11, 2011, 02:50:17 pm

Title: Loading Serialized Object (JPCT-AE)
Post by: firstdeathmaker on October 11, 2011, 02:50:17 pm
Hi,


im using the mesh serializer plugin (http://sourceforge.net/p/meshserializer/home/Home/) 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!
Title: Re: Loading Serialized Object (JPCT-AE)
Post by: EgonOlsen on October 11, 2011, 07:52:57 pm
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...
Title: Re: Loading Serialized Object (JPCT-AE)
Post by: firstdeathmaker on October 12, 2011, 10:17:04 am
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?
Title: Re: Loading Serialized Object (JPCT-AE)
Post by: EgonOlsen on October 12, 2011, 11:14:00 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.
Title: Re: Loading Serialized Object (JPCT-AE)
Post by: firstdeathmaker on October 12, 2011, 11:28:35 am
Ah, ok. Thanks for the answer!
Title: Re: Loading Serialized Object (JPCT-AE)
Post by: BABABLACK_911 on December 21, 2012, 07:14:31 pm
Hello Egon,
Is there any other way to convert an OBJ into .SER?
or should we just go with the plugin itself?