my problem is:
i have made a 3D model with texture in Cinema 4d ( similiar to this one : http://preview.turbosquid.com/Preview/2011/03/30__13_54_17/space%20shuttle%206.jpgeec17db2-6651-453c-9d27-ea1908e3c7dfLarge.jpg )
Now i want to export it to my jMonkeyEngine to set it up in my scene and to animate it.
I tried to export my model as a .obj-file and load it into my projekt (just the .obj-file).
The result is that i have no textures! What do i wrong?
package mygame;
import com.jme3.app.SimpleApplication;
import com.jme3.light.DirectionalLight;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.renderer.RenderManager;
import com.jme3.scene.Geometry;
import com.jme3.scene.Node;
import com.jme3.scene.Spatial;
import com.jme3.scene.shape.Box;
/**
* test
* @author normenhansen
*/
public class Main extends SimpleApplication {
public static void main(String[] args) {
Main app = new Main();
app.start();
}
@Override
public void simpleInitApp() {
//Modell laden
Spatial spaceShuttle =assetManager.loadModel("Models/test/space.obj");
//Skalieren
spaceShuttle.scale(0.005f, 0.005f, 0.005f);
//Szenenbaum erstellen
Node sceneNode = new Node("sceneNode");
Node geometryNode = new Node("geometryNode");
Node lightNode = new Node("lightNode");
sceneNode.attachChild(lightNode);
sceneNode.attachChild(geometryNode);
rootNode.attachChild(sceneNode);
//neue Elemente in den Baum Einfügen
geometryNode.attachChild(spaceShuttle);
DirectionalLight sun = new DirectionalLight();
sun.setDirection(new Vector3f(1,0,-2).normalizeLocal());
sun.setColor(ColorRGBA.White);
rootNode.addLight(sun);
}
@Override
public void simpleUpdate(float tpf) {
//TODO: add update code
}
@Override
public void simpleRender(RenderManager rm) {
//TODO: add render code
}
}