Hello, I'm new to jPCT and trying to load an OBJ model in JPCT-AE.
The problem is that I'm serializing the object like this:
TextureManager texMan = TextureManager.getInstance();
DeSerializer des = new DeSerializer();
char c = File.separatorChar;
File dir = new File("raw");
String[] files = dir.list();
for (int i = 0; i < files.length; i++) {
String name = files[i];
if (name.toLowerCase().endsWith(".jpg")) {
texMan.addTexture(name, new Texture("raw" + c + name));
}
}
Object3D[] objs = Loader.loadOBJ("raw/raw.obj","raw/raw.mtl", 1);
OutputStream os = new FileOutputStream("raw.ser");
objs[0].build();
des.serialize(objs[0], os, true);
But when loading the model in Android with Loader.loadSerializedObject(...) the textures won't appear.
My question: How does this exactly work? Does this call look for textures in any specific directory?
Do I have to load them once again in Android manually?
Where should I put them? I have lots of them in the model.
Thanks in advance.