Loading Texture on applet issue
Opened this issue · 1 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. Create an applet that loads a model with texture;
2. The model and texture files should be inside a directory inside data folder
3. Run the applet via browser
What is the expected output? What do you see instead?
Although running the applet on eclipse works fine, when exporting an applet to
run via browser, only the model is loaded, not the textures.
What version of the product are you using? On what operating system?
OBJLoader 0.21; Processing 1.2.1 on Linux;
Please provide any additional information below.
I get the following error:
Loading this = resources/models/esq/mao_2.obj
Loading this = ./resources/models/esq/mao_2.mtl
./resources/models/esq/mao_2.mtl does not exist or could not be read
Could not find this file ./resources/models/esq/mao_2.mtl
java.lang.NullPointerException
at saito.objloader.OBJModel.parseMTL(OBJModel.java:973)
at saito.objloader.OBJModel.parseOBJ(OBJModel.java:813)
at saito.objloader.OBJModel.load(OBJModel.java:577)
at saito.objloader.OBJModel.<init>(OBJModel.java:109)
at br.usp.libras.graph.AnimObj.<init>(AnimObj.java:52)
As you can see, the path used for loading the .obj is DIFFERENT from the used
to load the .mtl. The second one has a "./" in the beginning, which can be the
cause of the error.
These resources are inside the data folder. .obj loads perfectly, but .mtl not.
Original issue reported on code.google.com by mlikoga
on 27 Nov 2010 at 6:52
Attachments:
GoogleCodeExporter commented
Hmm...Now I realized that my link on the obj is the problem. So the issue is
only that "." works locally but not on the applet. Maybe is not a real issue, I
don't know.
You can close this issue now, sorry.
Original comment by mlikoga
on 28 Nov 2010 at 2:21