Author Topic: Can't deserialize a 3Dobject when adding a texture  (Read 3591 times)

Offline Altarfinch

  • byte
  • *
  • Posts: 4
    • View Profile
Can't deserialize a 3Dobject when adding a texture
« on: March 12, 2012, 11:55:38 am »
Hello,

I am having troubles with the serialization process :
I can serialize an object in jPCT, deserialize it in jPCT-AE and display it, but, when I add a MTL file, I am getting this error :
Quote
java.lang.RuntimeException: [ 1331547415172 ] - ERROR: Can't deserialize object: [ 1331547415170 ] - ERROR: A texture with the name '__obj-Color:149/149/149' has been declared twice!

Here is my MTL, I tried to remove the texture lines without success : I am getting the same error
Code: [Select]
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# Filchier créé : 06.03.2012 18:30:33

newmtl ReviaMonoColorLightMapMat_style_de_rendu
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 1.0000 1.0000 1.0000
Kd 1.0000 1.0000 1.0000
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka ConcreteBare0321_5_S.jpg
map_Kd ConcreteBare0321_5_S.jpg

newmtl 15___Default
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5882 0.5882 0.5882
Kd 0.5882 0.5882 0.5882
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000

newmtl Mat_riau__1900
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5880 0.5880 0.5880
Kd 0.5880 0.5880 0.5880
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000
map_Ka MetalFloorsBare0035_1_S.jpg
map_Kd MetalFloorsBare0035_1_S.jpg

newmtl Mat_riau__1744
Ns 5.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5882 0.5882 0.5882
Kd 0.5882 0.5882 0.5882
Ks 0.4500 0.4500 0.4500
Ke 0.0000 0.0000 0.0000

newmtl 01___Default
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.1137 0.1137 0.1137
Kd 0.1137 0.1137 0.1137
Ks 0.1800 0.1800 0.1800
Ke 0.0000 0.0000 0.0000

newmtl INOX_Main
Ns 22.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.5882 0.5882 0.5882
Kd 0.5882 0.5882 0.5882
Ks 0.1800 0.1800 0.1800
Ke 0.0000 0.0000 0.0000

newmtl ReviaMonoColorLightMapMat_style_de_rendu2
Ns 10.0000
Ni 1.5000
d 1.0000
Tr 0.0000
Tf 1.0000 1.0000 1.0000
illum 2
Ka 0.4353 0.3294 0.2078
Kd 0.4353 0.3294 0.2078
Ks 0.0000 0.0000 0.0000
Ke 0.0000 0.0000 0.0000

Any clue ?

Thank you.

Yours faithfully,
Paul George.
« Last Edit: March 12, 2012, 05:38:51 pm by Altarfinch »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Can't deserialize a 3Dobject when adding a texture
« Reply #1 on: March 12, 2012, 08:31:39 pm »
This should not happen...can you upload the obj and the mtl file for me to see for myself!?

Offline Altarfinch

  • byte
  • *
  • Posts: 4
    • View Profile
Re: Can't deserialize a 3Dobject when adding a texture
« Reply #2 on: March 12, 2012, 08:57:19 pm »
I uploaded the MTL, the OBJ and the textures : http://altarfinch.upload.free.fr/tuyaux.rar

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Can't deserialize a 3Dobject when adding a texture
« Reply #3 on: March 12, 2012, 09:32:38 pm »
Serializes and loads on Android just fine here...which version of jPCT-AE are you using? If it's the latest official one, please try this beta version instead. Maybe i fixed something regarding this problem and forgot about it: http://jpct.de/download/beta/jpct_ae.jar

Offline Altarfinch

  • byte
  • *
  • Posts: 4
    • View Profile
Re: Can't deserialize a 3Dobject when adding a texture
« Reply #4 on: March 13, 2012, 10:12:15 am »
Thanks, it solved the problem. I was using the latest official version (1.24).