Texture issue in .obj

Hello all,



First question, where can I find (it’s not in the JavaDoc listing) a complete list of all the properties for ObjToJme? I know a couple just from some of the examples, but a complete list would be helpful.



I have a simple model (a tube with a rounded end cap) that has two textures in it. It displays fine when loaded into the utility I use:



http://apogeedevelop.com/images/norm.png



I had no problems with simple colors. When I first added textures, the “missing texture” sign on the model.



I checked the mtl file which looked fine:



newmtl 1stStage MAT_1

Ka

I ran into the same problem (couldn't get texdir to work), my (quick and dirty) solution was to edit the mtl file and put the texture dir in front of the image files manually :P. You can do that as part of the conversion code, because those fixed paths get saved into the jme file when exported.

Do you mean the full path? What happens when this deployed to other machines with different paths?



If I can do this so it can be deployed elsewhere, I'll try it. Right now I just read in .obj and .mtl and don't save in the jme format. If this works I'll write a little converter and just switch to the proprietary format.



Thx!

I haven't really experimented with deployment yet. Currently I have an eclipse project, and the models and textures are packed into a jar file. The jar file has been added to the project (project properties->java build path->libraries->add jar).



one of the lines changed in the mtl:

map_Kd data/model/tank/M1_B_BAK.bmp



java line that gets the url for the model:

URL objFile=TestObjJmeWrite.class.getClassLoader().getResource("data/model/tank/m1a1.obj");



I test directly in eclipse (which grabs those jars on the build path), but when deployed it's probably just one line needed that adds the data jar to the classpath.

Well it worked to a point. I removed the setting of "texdir" and added the full paths for both texture files. But I got the same issue as when I set "texdir" before: no "missing texture" signs, but the last texture file is the one used on both sections of the model. If I switch the order in the .mtl file it still uses the last file in .mtl.



Weird. Thanks for the info so far!

Cheers