.OBJ : texture problem

Hi folks !



We're currently learning to use JME and while testing, we have encounter problems with the texture loading from obj objects (3DS Max7 and maya7 exported)

We're using the class HelloLoadingModel for the test.



Here's the XML generated while loading :




<scene >
   <mesh name="temp0" >
      <vertex data="22.871872 8.07151 6.646522 18.621872 6.07151 13.646522 27.121872 6.07151 13.646522 27.121872 6.07151 ......... >
      </vertex>
      <normal data="0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ........................>
      </normal>
      <color >
      </color>
      <defcolor data="1.0 1.0 1.0 1.0" >
      </defcolor>
      <texturecoords data="0.5 1.0 0.0 0.0 1.0 0.0 0.196429 0.0 1.196429 0.0 0.0 0.0 1.0 0.0 0.196429 0.0 1.196429 .............................>
      </texturecoords>
      <index data="0 1 2 0 3 4 0 5 6 0 7 8 9 10 11 11 10 12 12 10 13 13 10 9 14 15 16 14 17 18 14 19 20 14 21 22 ........................... >
      </index>
      <materialstate diffuse="0.8 0.8 0.8 1.0" ambient="0.2 0.2 0.2 1.0" emissive="0.0 0.0 0.0 1.0" specular="1.0 1.0 1.0 1.0" shiny="0.0" alpha="0.0" >
      </materialstate>
      <texturestate >
      </texturestate>
   </mesh>
</scene>



If we load this file with the loaderXML, an exception is thrown by the tag <defcolor>. Thus texture aren't there...

We've read the loader, the JME obj library, export with 3DS and Maya but the problem still persist.

Could someone be of any help, we will be the happiest monkeys... er... man...

Thanks,
Bye

mtl



# Max2Mtl Version 4.0 Mar 10th, 2001
#
# Multi/Sub Auberge (10) to come
#
newmtl Sol
Ka  0.6 0.6 0.6
Kd  0.6 0.6 0.6
Ks  0.9 0.9 0.9
d  1.0
Ns  0.0
illum 2
map_Kd -s 2.0 2.0 1.0 CEDFENCE2.JPG
bump -s 2.0 2.0 1.0 CEDFENCE2.JPG
#
newmtl Mur_A
Ka  0.6 0.6 0.6
Kd  0.6 0.6 0.6
Ks  0.9 0.9 0.9
d  1.0
Ns  0.0
illum 2
map_Kd -s 6.0 3.0 1.0 GrayRock.bmp
bump -s 6.0 3.0 1.0 GrayRock.bmp

....



obj



# Max2Obj Version 4.0 Mar 10th, 2001
#
mtllib Auberge.mtl
g
# object (null) to come ...
#
v  22.871872 8.07151 6.646522
v  18.621872 6.07151 13.646522
v  27.121872 6.07151 13.646522
v  27.121872 6.07151 -0.353478
v  18.621872 6.07151 -0.353478
v  22.871872 6.07151 6.646522
# 6 vertices

vt  0.5 1 0
vt  0 0 0
vt  1 0 0
vt  0.196429 0 0
vt  1.196429 0 0
vt  0 1 0
vt  1 1 0
vt  1 0 0
vt  0 0 0
vt  0.5 0.5 0
# 10 texture vertices

g (null)
usemtl Toit
s 4
f -6/-10 -5/-9 -4/-8
s 2
f -6/-10 -4/-7 -3/-6
s 16
f -6/-10 -3/-9 -2/-8
s 32
f -6/-10 -2/-7 -5/-6
usemtl Plafond
s 8
f -5/-5 -1/-1 -4/-4
f -4/-4 -1/-1 -3/-3
f -3/-3 -1/-1 -2/-2
f -2/-2 -1/-1 -5/-5
# 8 faces

......



Thanks again,
Bye again