Noob question (trying to load maya obj files)

Hey there,

I have a standard maya (6.5 or 7) .OBJ file along with its .MTL file. Now I’m trying to load it using the OBJLoader2. All seems fine but the thing is totally black - do I have to place light sources somewhere ???

regards, palin

Also: There seems to be something missing in the common understanding of maya .OBJ files as faces are allowed to lack textures, so a legal OBJ-definition could be:

f 37//57 33//58 41//59 40//60

this however results in somewhat illegal face lists (FaceList inner class Face fills texCoords array with null) - the setTextureCoordinates method in GeomContainer will crash when trying to set the floats.

ok, all you delved into the code, nevermind. I found the issue - so for all who care:

Though there is this neat MaterialLibLoader(2) class, parsing the .MTL file, it might do its job very well. But all effort seems futile if the FaceList builds a single Shape3D (with all coords in a triangle array) using the last .OBJ file face’s material (Appearance) a for-loop before yielded… in my case the last material happens to be black, so the whole shape turns out to be very very blackish as well…

…hmm… either I need to amend this functionality or switch to another 3d prog…

cheers, palin

the shape is supposed to have more than one texture?

no but the obj-loader (or more exactly the facelist) makes one single shape out of all faces (which have dozens of different appearances) - and since a shape only has one texture, my entire model gets the last color the build-shape3d-out-of-faces-method finds.

This should be easily fixeable.