0

I'm trying to load a model that comes with the WorldForge 3d models. When I do it I however get this exception and I suspect that the program can't find the model nor the textures:

com.jme3.asset.AssetNotFoundException: objects/creatures/goblin/goblin.mesh.xml
    at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:277)
    at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:410)
    at com.jme3.asset.DesktopAssetManager.loadModel(DesktopAssetManager.java:420)
    at adventure.Main.simpleInitApp(Main.java:110)
    at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:225)
    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:679)

The code I want to run that should import a goblin is 1

Spatial model3 = assetManager.loadModel("objects/creatures/goblin/goblin.mesh.xml");

Neither does an absolute path work. Can you help me?

Update

I found that adding the assets folder to the src path in eclipse solved the assetnotfoundexception. Now I can load the mesh but it is missing texture and material:

enter image description here

Niklas Rosencrantz
  • 25,640
  • 75
  • 229
  • 424
  • 1
    Where does goblin.mesh.xml reside? How are you launching your program? Within Eclipse? – Paul Webster Jul 10 '12 at 11:22
  • @PaulWebster goblisn.mesh.xml is residing in `/home/dev/workspace/DungeonWorldAdventure/assets/objects/creatures/goblin/goblin.mesh.xml` where to my knowledge it should be. I'm launching my program from within Eclipse. If I put the model in a zip file and add the zip file to the asset manager then I can load the mesh but then it goes into exception saying that it needs material. – Niklas Rosencrantz Jul 10 '12 at 14:09

1 Answers1

1

Have you configured correctly the project under Eclipse? Check the "Setting up dependencies" section. Setting up JME3 in Eclipse