Hello Chaps,
I've been trying out obj importing into an ArticulatedModel using
fromFile using a simple textured cube generated in Blender 2.61. The
log file opens the obj geometry OK, but reports that the material file
cannot be found. It shows the reported path includes an erroneous
space in front of the file name, which breaks the path. Sure enough,
when I debug in, the TextInput class in ArticulatedModel::initOBJ
correctly identifies the 'mtllib' token but returns the whole of the
remaining line (including the whitespace separation between the token
and the value). This is then appended (with no trimming) to the root
path for the file operation, resulting in an incorrect file path.
This *appears* to be quite a fundamental problem with OBJ loading, but
I can't find anything obvious when searching this forum, which makes
me suspect that I must be the one doing something wrong here? Any
advice gratefully received.
The offending obj file contents are as follows (.obj, followed
by .mtl):
# Blender v2.61 (sub 0) OBJ File: ''
#
www.blender.org
mtllib untitled.mtl
o Cube
v 1.000000 -1.000000 -1.000000
v 1.000000 -1.000000 1.000000
v -1.000000 -1.000000 1.000000
v -1.000000 -1.000000 -1.000000
v 1.000000 1.000000 -0.999999
v 0.999999 1.000000 1.000001
v -1.000000 1.000000 1.000000
v -1.000000 1.000000 -1.000000
usemtl Material
s off
f 1 2 3 4
f 5 8 7 6
f 1 5 6 2
f 2 6 7 3
f 3 7 8 4
f 5 1 4 8
and:
# Blender MTL File: ''
# Material Count: 1
newmtl Material
Ns 96.078431
Ka 0.000000 0.000000 0.000000
Kd 0.640000 0.640000 0.640000
Ks 0.500000 0.500000 0.500000
Ni 1.000000
d 1.000000
illum 2
Cheers
E