Author Topic: many .ser file from one .3ds  (Read 1470 times)

Offline kamax

  • byte
  • *
  • Posts: 2
    • View Profile
many .ser file from one .3ds
« on: January 16, 2011, 01:39:39 pm »
Hello,

I have sometimes a lot of .ser files from a .3ds after converting it.
How do you add them into the wold ?
Must i import each .ser as a object ?

It's a lot of lines when i have +100 .ser files.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: many .ser file from one .3ds
« Reply #1 on: January 16, 2011, 09:04:39 pm »
More than 100 models in one application? Are they really all different? If they share the same mesh, you should only load them once and make clones in code. Another possible solution is to merge them to one object before serializing them. For example, if you load a large level converted to 3ds from Quake3, you'll end up with a bunch of meshes all stored in one 3ds file and jPCT will load them as such. But as it's actually one level, you can use the mergeAll()-method in Object3D to merge them all into one mesh and serialize that.

If both solutions don't apply for you...them you are stuck with loading them via code one by one. However, i can see the need for serializing/deserializing an array of Object3Ds instead of single objects, so i think that i'm going to add this. So if you can wait a few days with this...

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: many .ser file from one .3ds
« Reply #2 on: January 17, 2011, 09:41:07 pm »
Here are two new jars, one for jPCT and one for jPCT-AE. They add support for (de-)serializing arrays of Object3Ds. In addition, they should deserialize faster in some cases. I hope, that nothing has been broken: http://www.jpct.de/download/tmp/jpct_jars.zip