@H said:
j3md loading works fine in the examples code. No need for that line. You just need to make sure that the folder that contains the assets is added to the project classpath. assets folder is added to project's classpath by default on SDK, you need to add it manually on eclipse.
I use eclipse and the SDK (netbean), I feel more confortable writting code using eclipse but SDK has very nice features (Material Editor, sceneViewer, etc)
I have an exception without this line:
[java]
03.10.2012 19:31:43 com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: AudioRenderer supports 64 channels
03.10.2012 19:31:43 com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio effect extension version: 1.0
03.10.2012 19:31:43 com.jme3.audio.lwjgl.LwjglAudioRenderer initInThread
INFO: Audio max auxilary sends: 4
03.10.2012 19:31:43 com.jme3.material.MaterialDef <init>
INFO: Loaded material definition: Unshaded
03.10.2012 19:31:43 com.jme3.scene.Node attachChild
INFO: Child (BitmapFont) attached to this node (null)
03.10.2012 19:31:43 com.jme3.scene.plugins.ogre.MeshLoader load
WARNING: Cannot locate TestModels/LightBlow/jme_lightblow.material for model TestModels/LightBlow/jme_lightblow.mesh.xml
03.10.2012 19:31:44 com.jme3.scene.plugins.ogre.MeshLoader applyMaterial
WARNING: Cannot locate Material for model TestModels/LightBlow/jme_lightblow.mesh.xml
03.10.2012 19:31:44 com.jme3.scene.Node attachChild
INFO: Child (jme_lightblow-geom-1) attached to this node (jme_lightblow-ogremesh)
03.10.2012 19:31:44 com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.asset.AssetNotFoundException: MatDefs/MatCap/MatCap.j3md
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:278)
at com.jme3.material.plugins.J3MLoader.loadFromRoot(J3MLoader.java:486)
at com.jme3.material.plugins.J3MLoader.load(J3MLoader.java:533)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
at com.jme3.asset.DesktopAssetManager.loadMaterial(DesktopAssetManager.java:345)
at com.shaderblow.test.matcap.TestMatCap.simpleInitApp(TestMatCap.java:20)
at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:225)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.initInThread(LwjglAbstractDisplay.java:130)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:207)
at java.lang.Thread.run(Thread.java:679)
03.10.2012 19:31:44 com.jme3.renderer.lwjgl.LwjglRenderer cleanup
INFO: Deleting objects and invalidating state
03.10.2012 19:31:44 com.jme3.input.lwjgl.LwjglMouseInput destroy
INFO: Mouse destroyed.
03.10.2012 19:31:44 com.jme3.input.lwjgl.LwjglKeyInput destroy
INFO: Keyboard destroyed.
03.10.2012 19:31:44 com.jme3.system.lwjgl.LwjglAbstractDisplay deinitInThread
INFO: Display destroyed.
[/java]