Now I have a new question.
My Code:
package Uebung2;
import com.jme3.app.SimpleApplication;
import com.jme3.font.BitmapText;
import com.jme3.light.DirectionalLight;
import com.jme3.material.Material;
import com.jme3.math.Quaternion;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.Spatial;
import com.jme3.scene.shape.Box;
public class Uebung2 extends SimpleApplication{
public static void main(String[] args){
Uebung2 uebung2 = new Uebung2();
uebung2.start();
}
@Override
public void simpleInitApp(){
Spatial teapot = assetManager.loadModel("Models/Teapot/Teapot.obj");
Material mat_default = new Material(assetManager, "Common/MatDefs/Misc/ShowNormals.j3md");
teapot.setMaterial(mat_default);
rootNode.attachChild(teapot);
Box box = new Box(Vector3f.ZERO, 2.5f,2.5f,1.0f);
Spatial wall = new Geometry("Box", box);
Material mat_brick = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat_brick.setTexture("ColorMap", assetManager.loadTexture("Textures/Terrain/BrickWall/BrickWall.jpg"));
wall.setMaterial(mat_brick);
rootNode.attachChild(wall);
DirectionalLight light = new DirectionalLight();
light.setDirection(new Vector3f(-0.1f,-0.7f, -1.0f));
rootNode.addLight(light);
}
}
The program doesn`t show mistakes in the Engine but if I start it, it closes itself.
I think the reason is, because I haven`t the data Unshaded.j3md in my MatDefs Folder.
Brickwall.jpg is also missing.
Where can I download this two files to start the programm.