Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Sheshmoshen

Pages: [1]
Thank you for the reply.

I'm going to elaborate on my question.

I have a java server side script that converts the obj file into a java serialized object.

Instead of serializing the whole Object3D[] array that is returned from loading.

I do something like this:
Code: [Select]
Object3D[] objects = Loader.loadOBJ(objFileName, mtlFileName, 1.0f);

Object3D resultObj = Object3D.mergeAll(objects);

DeSerializer serializer = new DeSerializer();
serializer.serialize(resultObj, outStream, true);

The texture in the MTL file is named map.jpg, and JPCT outputs this name as well.

Now on the android side of things:

I need to map the texture to different faces of the Object3D model.

How can I achieve this once I merged everything into one Object3D and serialized it?

Here is what I have and it's not quite working.

Code: [Select]

Object3D modelObj = Loader.loadSerializedObject(objInputStream);

  String texFile = "root/map.jpg";

Texture texture = new Texture(BitmapHelper.rescale(


TextureManager.getInstance().addTexture("map.jpg", texture);


It does show something but not quite what I see in MeshLab or Blender.

I think my issue is that I'm mapping the textures improperly.

Hope I clarified my issue, thanks for helping!

Pages: [1]