about Object3D[],why load3DS is ok,but loadSerializedObjectArray is wrong?

Started by Uncle Ray, September 24, 2014, 05:44:37 AM

Previous topic - Next topic

Uncle Ray

i have two files,a.ser,a1.3ds.
there are the same thing just different format,this is the big model which contains many parts.i want every part of it is the single objetc3D
in jpct.here is the code:

which is ok:

Object3D[] waypoint= Loader.load3DS(res.openRawResource(r.raw.a1), 1);   
           
world.addObject(waypoint[1]);




which is wrong:
Object3D[] waypoint= Loader.loadSerializedObjectArray(res.openRawResource(r.raw.a));   
world.addObject(waypoint[1]);





ps:the model have 100 parts,use load3ds everything is ok.
use loadSerializedObjectArray,just world.addObject(waypoint[0]) is ok,and show 100 parts.
i think,in loadSerializedObjectArray all of parts is saved in waypoint[0] not waypoint[].
How can i fix it?
thx,ego.

EgonOlsen

So, basically what is at index 1 in the "normal" loaded object array can be found at index 0 in the deserialized one? I don't see how this is supposed to happen nor have i ever experienced anything like it. Are you sure that your serialization code doesn't cause this somehow?

Uncle Ray

i translate 3ds to ser just with jbrush,every single model(3ds,md2,obj)  translate into ser with jbrush, is ok,but object3D array is my first time with jbrush.
maybe the problem is the jbrush?

I think jbrush's  ser method is the same thing with jpct_desktop's ser method.
may be i am wrong?

EgonOlsen

it should be the same method, but maybe it's doing something else in addition that causes this. Have you tried to serialize the model by using normal Java code instead of jBrush?