If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

Java 3D: Trouble with .mtl files

So I've been trying to play around with Java 3D and, recently, I've been playing around with importing outside 3D models into a program. At this point, I can get the model into the program as an OBJ file, but for whatever reason, the program won't load the corresponding material file.

Now, the code runs fine when the mtllib call in the .obj file is removed (save for the fact that the pterodactyl is white and has a material generated by default by the Java 3D library), but when the mtllib call is present and uncommented in the .obj file, the following error occurs when I run the program:

Now, I'm not sure if I'm correct, but for this exception to occur in the first place, the program has to acknowledge that the .mtl file exists which begs the question of why it can't read it. Is it because the .mtl file is formatted wrong? Is it because the call in the .obj file is wrong or located in the wrong part of the file, or is it something to do with my coding?

Sidenote: Before anyone suggests it as a fix, Pterodactyl.obj and Pterodactyl.mtl ARE in the same folder.