Hi all.
I'm making great strides with jME and finally hit a speed bump I can't navigate.
It looks like the code is okay, but my obj file is hosed. I downloaded one from turbosquid and it loaded.
My .obj file was missing lines marked with "vt" :
vt 0.25919679 0.28718722
vt 0.26695663 0.51861292
vt 0.27761754 0.29095283
vt 0.28447551 0.47540379…
v = vertex, vn = normals, f = face
vt = ??
Thanks!
Joe
vt is texture coords
mud2005 said:
vt is texture coords
Thanks, that makes sense since I don't have any textures associated with the model, at least in the modeling program I'm using. The program doesn't export .obj, so I export as .3ds and then use another program to convert to .obj, .mtl, etc.
It loads now, but it's totally white. There is a corresponding .mtl file and it does have the colors set, but no joy.
It loads now, but it's totally white. There is a corresponding .mtl file and it does have the colors set, but no joy.
make sure .mtl is in same place as .obj,also make sure you have a lightstate or all objects will be white, if youre extending simplegame its already done for you. here is an example of .mtl that works for me
# Exported from Wings 3D 0.98.32b
newmtl blue
Ns 100.000
d 1.00000
illum 2
Kd 0.00000e+0 0.00000e+0 0.473333
Ka 0.00000e+0 0.00000e+0 0.493333
Ks 0.906760 0.906760 0.906760
Ke 0.00000e+0 0.00000e+0 0.00000e+0
also in the .obj file needs to point to the .mtl
mtllib gutter.mtl
g cube1_blue
usemtl blue
good luck
mud2005 said:
also make sure you have a lightstate or all objects will be white, if youre extending simplegame its already done for you
That's part of it! I forgot about adding a light state (I'm using VariableTimestepGame)!
I'm still not getting a color, but my material file is missing some of lines you show.
But, at least I'm getting shading!
Thanks!