.obj problem with latest jMonkeyEngine Libs (jME3_2011-08-29.zip)

Hello,



I’ve been working with jMonkeyEngine for the past few months, and yesterday I decided to update the engine .jar to the latest version → jME3_2011-08-29.zip.



After doing that, the .obj model I was working on stopped showing. I get the feel that the model structure is being loaded correctly, and that the problem relies on the materials that are not being applied. I suspect this because the shadows have carried on working, as you can see from the picture:



http://i.imgur.com/Wr4PS.jpg



The .obj has been created from 3DStudioMax 2012.



Can someone help me with this problem? Thanks in advance!



Cheers!

Can you provide the problematic .obj file?

I’m sorry for the late response, here it is a sample .obj model that has the described behavior.



OBJ:

[patch]

3ds Max Wavefront OBJ Exporter v0.97b - ©2007 guruware


mtllib ShadowTestModels.mtl

#
# object Box001
#

v -43.703072 0.000000 -53.466736
v -43.703072 0.000000 46.057602
v 39.985809 0.000000 -53.466736
v 39.985809 0.000000 46.057602
v 39.985809 -3.840992 46.057602
v -43.703072 -3.840992 46.057602
v 39.985809 -3.840992 -53.466736
v -43.703072 -3.840992 -53.466736
# 8 vertices

vn 0.000000 1.000000 -0.000000
vn 0.000000 -1.000000 -0.000000
vn 0.000000 0.000000 1.000000
vn 1.000000 0.000000 -0.000000
vn 0.000000 0.000000 -1.000000
vn -1.000000 0.000000 -0.000000
# 6 vertex normals

vt 0.000000 1.000000 0.000000
vt 0.000000 0.000000 0.000000
vt 1.000000 1.000000 0.000000
vt 1.000000 0.000000 0.000000
# 4 texture coords

g Box001
usemtl 01___Default
s 2
f 1/1/1 2/2/1 3/3/1
f 4/4/1 3/3/1 2/2/1
s 4
f 5/2/2 6/4/2 7/1/2
f 8/3/2 7/1/2 6/4/2
s 8
f 4/4/3 2/2/3 5/3/3
f 6/1/3 5/3/3 2/2/3
s 16
f 3/4/4 4/2/4 7/3/4
f 5/1/4 7/3/4 4/2/4
s 32
f 1/4/5 3/2/5 8/3/5
f 7/1/5 8/3/5 3/2/5
s 64
f 2/4/6 1/2/6 6/3/6
f 8/1/6 6/3/6 1/2/6
# 12 faces

#
# object Pyramid001
#

v 16.790106 22.596392 -31.991638
v 6.335835 0.005000 -17.833244
v 27.244377 0.005000 -17.833244
v 27.244377 0.005000 -46.150032
v 6.335835 0.005000 -46.150032
v 16.790106 0.005000 -31.991638
# 6 vertices

vn 0.000000 0.531044 0.847344
vn 0.907539 0.419968 -0.000000
vn 0.000000 0.531044 -0.847344
vn -0.907539 0.419968 -0.000000
vn 0.000000 -1.000000 -0.000000
# 5 vertex normals

vt 0.500000 1.000000 0.000000
vt 0.000000 0.000000 0.000000
vt 1.000000 0.000000 0.000000
vt 0.130810 0.000000 0.000000
vt 1.130810 0.000000 0.000000
vt 0.000000 1.000000 0.000000
vt 0.500000 0.500000 0.000000
vt 1.000000 1.000000 0.000000
# 8 texture coords

g Pyramid001
usemtl 07___Default
s 4
f 9/5/7 10/6/7 11/7/7
s 2
f 9/5/8 11/8/8 12/9/8
s 16
f 9/5/9 12/6/9 13/7/9
s 32
f 9/5/10 13/8/10 10/9/10
s 8
f 10/10/11 14/11/11 11/12/11
f 11/12/11 14/11/11 12/7/11
f 12/7/11 14/11/11 13/6/11
f 13/6/11 14/11/11 10/10/11
# 8 faces

#
# object Box002
#

v -17.053314 0.000000 41.072510
v -17.053314 0.000000 1.378830
v -14.225887 0.000000 1.378830
v -14.225887 0.000000 41.072510
v -17.053314 14.472441 41.072510
v -14.225887 14.472441 41.072510
v -14.225887 14.472441 1.378830
v -17.053314 14.472441 1.378830
# 8 vertices

vn 0.000000 -1.000000 -0.000000
vn 0.000000 1.000000 -0.000000
vn 0.000000 0.000000 1.000000
vn 1.000000 0.000000 -0.000000
vn 0.000000 0.000000 -1.000000
vn -1.000000 0.000000 -0.000000
# 6 vertex normals

vt 1.000000 0.000000 0.000000
vt 1.000000 1.000000 0.000000
vt 0.000000 1.000000 0.000000
vt 0.000000 0.000000 0.000000
# 4 texture coords

g Box002
usemtl 02___Default
s 2
f 15/13/12 16/14/12 17/15/12
f 17/15/12 18/16/12 15/13/12
s 4
f 19/16/13 20/13/13 21/14/13
f 21/14/13 22/15/13 19/16/13
s 8
f 15/16/14 18/13/14 20/14/14
f 20/14/14 19/15/14 15/16/14
s 16
f 18/16/15 17/13/15 21/14/15
f 21/14/15 20/15/15 18/16/15
s 32
f 17/16/16 16/13/16 22/14/16
f 22/14/16 21/15/16 17/16/16
s 64
f 16/16/17 15/13/17 19/14/17
f 19/14/17 22/15/17 16/16/17
# 12 faces
[/patch]




MATERIAL:
[patch]
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware

newmtl 01___Default
Ns 9.999999
Ni 1.500000
d 1.000000
Tr 0.000000
Tf 1.000000 1.000000 1.000000
illum 2
Ka 1.000000 1.000000 1.000000
Kd 1.000000 1.000000 1.000000
Ks 0.000000 0.000000 0.000000
Ke 0.000000 0.000000 0.000000

newmtl 07___Default
Ns 9.999999
Ni 1.500000
d 1.000000
Tr 0.000000
Tf 1.000000 1.000000 1.000000
illum 2
Ka 0.588235 0.596078 0.776471
Kd 0.588235 0.596078 0.776471
Ks 0.000000 0.000000 0.000000
Ke 0.000000 0.000000 0.000000

newmtl 02___Default
Ns 9.999999
Ni 1.500000
d 1.000000
Tr 0.000000
Tf 1.000000 1.000000 1.000000
illum 2
Ka 0.541176 0.541176 0.541176
Kd 0.541176 0.541176 0.541176
Ks 0.000000 0.000000 0.000000
Ke 0.000000 0.000000 0.000000
[/patch]

Is this object planned to be transparent ? if yes you need to split into multiple Meshes to allow the forward render to sort correctly.

no the model is not intended to be transparent. Before the libs update,the model was loaded with all its materials, and i could see them applied, and afterwards of the libs update the materials no longer appear. The model seems to be transperent because only the shadows are being applied.

The bug is fixed in SVN.

It was incorrect handling of the “illum” index which specify that transparency shouldn’t be used for the model but it was used anyway.

I’ve checked out the engine, and built it to get the jMonkeyEngine.jar and I’m glad to annouce that the problem is Solved!



Thank you very much for the help!



Cheers.