Hello everyone!
Have you ever had similar problem?
—> http://img.obrazok.com/wtf.py4g.jpg
all other models working, this one is good as well. I can use it in other application without any problems. How you can see .mtl file is there, but exception is thrown:
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,6,main]
com.jme3.asset.AssetNotFoundException: Cannot find material dressoirNoir.mtl for model Models/dressoirNoir.obj
at com.jme3.scene.plugins.OBJLoader.loadMtlLib(OBJLoader.java:330)
at com.jme3.scene.plugins.OBJLoader.readLine(OBJLoader.java:384)
at com.jme3.scene.plugins.OBJLoader.load(OBJLoader.java:573)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:243)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:376)
at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:386)
at viewPackage.Decomposer.addFurniture(Decomposer.java:49)
at viewPackage.Scene.addObjects(Scene.java:299)
at viewPackage.Scene.simpleInitApp(Scene.java:121)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:230)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:129)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:205)
at java.lang.Thread.run(Thread.java:722)
I may be mad but I already saw this issue before 8). Try converting it to .j3o.
@glaucomardano said:
I may be mad but I already saw this issue before 8). Try converting it to .j3o.
I think we will be friends :)
if I tryed to convert it:
Unknown statement in MTL! tf
Trying to save asset that has not been loaded before or does not support saving!
Could not locate saved file.
btw why should I do it when it’s good with all other .obj files?
As the log says, Unknown statement in MTL! tf. Open the .mtl file and coment out that statement by hand.
@glaucomardano said:
As the log says, *Unknown statement in MTL! tf*. Open the .mtl file and coment out that statement by hand.
It seems that it doesn't matter. log after update:
"Trying to save asset that has not been loaded before or does not support saving!
Could not locate saved file."
phantom error... all models similar like this one, all are working as .obj. this one not... in other projects it's working well. Some other ideas which I can try?
Yes, it matter. It doesn’t says Unknown statement in MTL! tf anymore xD. Can I ask you where was the model exported from? If this model is not personal I can take a look at it for you.
if I convert others, log is looking like:
“Unknown statement in MTL! tf
Loaded material definition: Phong Lighting
Unknown statement in MTL! tf
Unknown statement in MTL! tf
Child (largeCouch-geom-0) attached to this node (largeCouch-objnode)
Child (largeCouch-geom-1) attached to this node (largeCouch-objnode)
Child (largeCouch-geom-2) attached to this node (largeCouch-objnode)”
but .j3o is successfully created. All assets were created and exported in the same way.
but .j3o is successfully created
Then are you able to open it in SceneComposer?
@glaucomardano said:
Yes, it matter. It doesn't says *Unknown statement in MTL! tf* anymore xD. Can I ask you where was the model exported from? If this model is not personal I can take a look at it for you.
ahahah :D yep, you can, I will be very thankful!
for_glaucomardano.rar
@glaucomardano said:
Then are you able to open it in SceneComposer?
yes, all other objects I can open in SceneComposer as well... I am talking about all other .obj files which I don't need to convert. I can use it in .obj format in my project.
There’s nothing weird with your model. I was able to load it both in SceneComposer and in source code as well. Make sure your jMP is up to date. In source code I did so:
[java]
rootNode.attachChild(assetManager.loadModel("Models/dressoirNoir.j3o"));
// rootNode.attachChild(assetManager.loadModel("Models/dressoirNoir.obj"));
rootNode.addLight(new PointLight());
[/java]
Both .obj and .j3o works like a boss. I’m using the lastest unstable nightly builds.
@glaucomardano said:
There’s nothing weird with your model. I was able to load it both in SceneComposer and in source code as well. Make sure your jMP is up to date. In source code I did so:
[java]
rootNode.attachChild(assetManager.loadModel("Models/dressoirNoir.j3o"));
// rootNode.attachChild(assetManager.loadModel("Models/dressoirNoir.obj"));
rootNode.addLight(new PointLight());
[/java]
Both .obj and .j3o works like a boss. I’m using the lastest unstable nightly builds.
uhm I wll try it for sure :) thank you! last wish: can you upload .j3o for me please?
@glaucomardano said:
http://www.2shared.com/file/MH9gE1zx/Models.html
thank you very much :) I am amateur monkey but I will be watching your posts, wana reciprocate :P everything is working, I need to update my jMP as you said maybe.
Reciprocate by posting back when this work so next new monkeys with the same problem can solve it ;).
So what was the issue? The “Unknown statement in MTL!” is a warning and can be ignored in most cases, jMP doesn’t display logging correctly so you don’t really know whats a SEVERE log and whats a WARNING log
@Momoko_Fan said:
So what was the issue? The "Unknown statement in MTL!" is a warning and can be ignored in most cases, jMP doesn't display logging correctly so you don't really know whats a SEVERE log and whats a WARNING log
yes, you are right “Unknown statement in MTL!” was only a warning. if I ignored it, my problem wasn't solved. As I said, there were many similar .obj files and .mtl files, I use them all without anz problems but there was a "phantom error" with one... as you can see in the screenshot which was uploaded at the first by me, .mtl file for "dressoirNoir" is loaded in assets/models of my project but some methods responsible for loading .obj file and searching material for it throw the exception that .mtl file was not found... that's my version of this story... in other projects this model as .obj files works... I need to update my jMP... but it's not guarantee of solution of this issue. There isn't time to waste with solving this little problem for me. You can see in replies that this model isn't weird, so I really don't know... I can use it in this "weird?" project as .j3o correctly so I gona use this converted format everywhere in jme project if possible. SOLVED
Yeah. As your model works pretty nice for me then the problem is your jMP :). A simple update solves that ;).