Author Topic: Loading Serialized Object (JPCT-AE)  (Read 4404 times)

Offline firstdeathmaker

  • byte
  • *
  • Posts: 15
    • View Profile
Loading Serialized Object (JPCT-AE)
« on: October 11, 2011, 02:50:17 pm »
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!

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Loading Serialized Object (JPCT-AE)
« Reply #1 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...

Offline firstdeathmaker

  • byte
  • *
  • Posts: 15
    • View Profile
Re: Loading Serialized Object (JPCT-AE)
« Reply #2 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Loading Serialized Object (JPCT-AE)
« Reply #3 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.

Offline firstdeathmaker

  • byte
  • *
  • Posts: 15
    • View Profile
Re: Loading Serialized Object (JPCT-AE)
« Reply #4 on: October 12, 2011, 11:28:35 am »
Ah, ok. Thanks for the answer!

Offline BABABLACK_911

  • byte
  • *
  • Posts: 14
    • View Profile
Re: Loading Serialized Object (JPCT-AE)
« Reply #5 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?