A merged single Model with separate texture for each Individual Mesh

Started by mayuran.r, September 08, 2017, 01:22:11 PM

Previous topic - Next topic

mayuran.r

Hi.
I have large .Obj model, that consist of several meshes combined together and exported as one single .obj. Each mesh is assigned to a different texture( A house with Pillars, Windows, Wall, Steps and Roofs).
The Size is relatively large, I have serialized and then compressed and rendered the model without the texture and also with one single plain image as texture. (if anyone need helps on Serialization I am happy to help)
1. I want to render the model with respective textures for each separate mesh.
2. In which step I have to add the texture for the model, during Serialize the model in the Java Project or during the time of loading serialized object using JPCT-AE (in android) ?
(I have UV unwrapped textures for each mesh)
3. I have a close button also in the app, when I click it, model should be removed and all the textures in TextureManager should be removed.

Please guide me on adding respective textures for the model.

Thanks in Advance.

AGP

You just have to add the textures to the Texture Manager BEFORE loading the model. But I suspect that if you call merge() you will break the texture references.

EgonOlsen

The serialization process keeps the references to the texture names but not the textures, so you have to add textures with the same names to the TextureManager that the object used when serializing it before loading the serialized version and it should assign them automatically.