Skip to main content
added 1 character in body
Source Link
Thijser
  • 955
  • 10
  • 28

I have the following basic code:

public void simpleInitApp() {
    Box b = new Box(1, 1, 1);
    Geometry geom = new Geometry("Box", b);
    Texture cube1Tex = assetManager.loadTexture(
    "/home/thijsglados/codes/3/assets/Textures/map/oldParchment.jpg");

    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat.setTexture("ColorMap", cube1Tex);
    geom.setMaterial(mat);

    rootNode.attachChild(geom);
}

which is supposed to simply attach a texture to the cube loaded from Textures/map/oldParchment.jpg

My resource setup is as following: enter image description here

running this gives the following error:

com.jme3.asset.AssetNotFoundException: /home/glados/codes/3/assets/Textures/map/oldParchment.jpg (Flipped) (Mipmapped)
    at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
    at com.jme3.asset.DesktopAssetManager.loadTexture(DesktopAssetManager.java:346)
    at com.jme3.asset.DesktopAssetManager.loadTexture(DesktopAssetManager.java:356)
    at mygame.Main.simpleInitApp(Main.java:27)
    at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
    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:744)

Anybody know what I'm doing wrong?

I have the following basic code:

public void simpleInitApp() {
    Box b = new Box(1, 1, 1);
    Geometry geom = new Geometry("Box", b);
    Texture cube1Tex = assetManager.loadTexture(
    "/home/thijs/codes/3/assets/Textures/map/oldParchment.jpg");

    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat.setTexture("ColorMap", cube1Tex);
    geom.setMaterial(mat);

    rootNode.attachChild(geom);
}

which is supposed to simply attach a texture to the cube loaded from Textures/map/oldParchment.jpg

My resource setup is as following: enter image description here

running this gives the following error:

com.jme3.asset.AssetNotFoundException: /home/glados/codes/3/assets/Textures/map/oldParchment.jpg (Flipped) (Mipmapped)
    at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
    at com.jme3.asset.DesktopAssetManager.loadTexture(DesktopAssetManager.java:346)
    at com.jme3.asset.DesktopAssetManager.loadTexture(DesktopAssetManager.java:356)
    at mygame.Main.simpleInitApp(Main.java:27)
    at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
    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:744)

Anybody know what I'm doing wrong?

I have the following basic code:

public void simpleInitApp() {
    Box b = new Box(1, 1, 1);
    Geometry geom = new Geometry("Box", b);
    Texture cube1Tex = assetManager.loadTexture(
    "/home/glados/codes/3/assets/Textures/map/oldParchment.jpg");

    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat.setTexture("ColorMap", cube1Tex);
    geom.setMaterial(mat);

    rootNode.attachChild(geom);
}

which is supposed to simply attach a texture to the cube loaded from Textures/map/oldParchment.jpg

My resource setup is as following: enter image description here

running this gives the following error:

com.jme3.asset.AssetNotFoundException: /home/glados/codes/3/assets/Textures/map/oldParchment.jpg (Flipped) (Mipmapped)
    at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
    at com.jme3.asset.DesktopAssetManager.loadTexture(DesktopAssetManager.java:346)
    at com.jme3.asset.DesktopAssetManager.loadTexture(DesktopAssetManager.java:356)
    at mygame.Main.simpleInitApp(Main.java:27)
    at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
    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:744)

Anybody know what I'm doing wrong?

Source Link
Thijser
  • 955
  • 10
  • 28

Jmonkey loading texture from fails

I have the following basic code:

public void simpleInitApp() {
    Box b = new Box(1, 1, 1);
    Geometry geom = new Geometry("Box", b);
    Texture cube1Tex = assetManager.loadTexture(
    "/home/thijs/codes/3/assets/Textures/map/oldParchment.jpg");

    Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
    mat.setTexture("ColorMap", cube1Tex);
    geom.setMaterial(mat);

    rootNode.attachChild(geom);
}

which is supposed to simply attach a texture to the cube loaded from Textures/map/oldParchment.jpg

My resource setup is as following: enter image description here

running this gives the following error:

com.jme3.asset.AssetNotFoundException: /home/glados/codes/3/assets/Textures/map/oldParchment.jpg (Flipped) (Mipmapped)
    at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
    at com.jme3.asset.DesktopAssetManager.loadTexture(DesktopAssetManager.java:346)
    at com.jme3.asset.DesktopAssetManager.loadTexture(DesktopAssetManager.java:356)
    at mygame.Main.simpleInitApp(Main.java:27)
    at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:226)
    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:744)

Anybody know what I'm doing wrong?