Problems with Loading a Dae model's Texture

Hello again guys.



I have tried and tried figuring out of this, and i have decided to post again. I have imported my model, but the problem now is that there isnt any texture on the model, only colors. So anyone have any ideas that might help me ?



Thanks :slight_smile:



The following code is my application.



import com.jme.app.AbstractGame.ConfigShowMode;
import com.jme.app.SimpleGame;
import com.jme.bounding.BoundingBox;
import com.jme.math.Vector3f;
import com.jme.scene.Node;
import com.jmex.model.collada.ColladaImporter;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

public class Model extends SimpleGame  {

   
    protected void simpleInitGame() {

        playerModel();
        playerModel().setModelBound(new BoundingBox());
        playerModel().updateModelBound();
        playerModel().setLocalTranslation(new Vector3f(2,0,0));
        rootNode.attachChild(playerModel());
        rootNode.updateRenderState();

        rootNode.attachChild(playerModel());
        rootNode.updateRenderState();
    }


public static Node playerModel() { 

        InputStream source;

      try {
         source  = new FileInputStream("data/model/tis.dae");
      } catch (FileNotFoundException e) {
         throw new RuntimeException(e);
      }
       
      ColladaImporter.load(source,"data/model/tis.dae");

      return ColladaImporter.getModel();
   
         }
   
    public static void main(String[] args) throws Exception {

        Model app = new Model();
        // We will load our own "fantastic" Flag Rush logo. Yes, I'm an artist.
        app.setConfigShowMode(ConfigShowMode.AlwaysShow, Model.class.getClassLoader().getResource("Test"));
       
        app.start();
}
}



Here is the scene:

try to add a BoundingBox to your model.

It might be culled if it dosen't have a correct bounding volume.

I have tried to make it to a boundingbox:


   
protected void simpleInitGame() {

        loadColladaModel();
        loadColladaModel().setModelBound(new BoundingBox());
        loadColladaModel().updateModelBound();
        rootNode.attachChild(loadColladaModel());
    }



I get this in the output, and still black screen in the scene. Im programming in NetBeans 6.5.1 , dont know if thats a problem?



26-03-2009 23:12:46 com.jme.app.BaseGame start
INFO: Application started.
26-03-2009 23:12:46 com.jme.system.PropertiesGameSettings <init>
INFO: PropertiesGameSettings created
26-03-2009 23:12:46 com.jme.system.PropertiesGameSettings load
INFO: Read properties
26-03-2009 23:12:48 com.jme.system.PropertiesGameSettings save
INFO: Saved properties
26-03-2009 23:12:48 com.jme.app.BaseSimpleGame initSystem
INFO: jME version 2.0 Stable (r4093)
26-03-2009 23:12:48 com.jme.input.joystick.DummyJoystickInput <init>
INFO: Joystick support is disabled
26-03-2009 23:12:48 com.jme.system.lwjgl.LWJGLDisplaySystem <init>
INFO: LWJGL Display System created.
26-03-2009 23:12:49 com.jme.renderer.lwjgl.LWJGLRenderer <init>
INFO: LWJGLRenderer created. W:  640H: 480        Version: 2.0.1
26-03-2009 23:12:49 com.jme.app.BaseSimpleGame initSystem
INFO: Running on: vga
Driver version: 6.0.6001.18000
ATI Technologies Inc. - ATI Mobility Radeon HD 3400 Series - 2.1.7415 Release
26-03-2009 23:12:49 com.jme.renderer.AbstractCamera <init>
INFO: Camera created.
26-03-2009 23:12:49 com.jme.util.lwjgl.LWJGLTimer <init>
INFO: Timer resolution: 1000 ticks per second
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (Graph node) attached to this node (Stats node)
26-03-2009 23:12:49 com.jme.renderer.lwjgl.LWJGLTextureRenderer <init>
INFO: FBO support detected.
26-03-2009 23:12:49 com.jme.renderer.lwjgl.LWJGLTextureRenderer initCamera
INFO: Init RTT camera
26-03-2009 23:12:49 com.jme.renderer.AbstractCamera <init>
INFO: Camera created.
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Line <init>
INFO: Line created.
26-03-2009 23:12:49 com.jme.renderer.lwjgl.LWJGLTextureRenderer setupTexture
INFO: setup fbo tex with id 2: 640,360
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (lineGraph) attached to this node (Graph node)
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (f4) attached to this node (Graph node)
26-03-2009 23:12:49 com.jme.renderer.lwjgl.LWJGLTextureRenderer <init>
INFO: FBO support detected.
26-03-2009 23:12:49 com.jme.renderer.lwjgl.LWJGLTextureRenderer initCamera
INFO: Init RTT camera
26-03-2009 23:12:49 com.jme.renderer.AbstractCamera <init>
INFO: Camera created.
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.renderer.lwjgl.LWJGLTextureRenderer setupTexture
INFO: setup fbo tex with id 3: 640,120
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (labelGraph) attached to this node (Graph node)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jmex.model.collada.ColladaImporter load
INFO: Version: 1.4.1
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pPlane1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pCone1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pSphere1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pSphere2) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (spotLight1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (spotLightShape1) attached to this node (spotLight1)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (camera1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (VisualSceneNode) attached to this node (Test.DAE)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jmex.model.collada.ColladaImporter load
INFO: Version: 1.4.1
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pPlane1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pCone1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pSphere1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pSphere2) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (spotLight1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (spotLightShape1) attached to this node (spotLight1)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (camera1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (VisualSceneNode) attached to this node (Test.DAE)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jmex.model.collada.ColladaImporter load
INFO: Version: 1.4.1
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pPlane1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pCone1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pSphere1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pSphere2) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (spotLight1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (spotLightShape1) attached to this node (spotLight1)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (camera1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (VisualSceneNode) attached to this node (Test.DAE)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jmex.model.collada.ColladaImporter load
INFO: Version: 1.4.1
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pPlane1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pCone1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pSphere1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (pSphere2) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (spotLight1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (spotLightShape1) attached to this node (spotLight1)
26-03-2009 23:12:49 com.jme.scene.Node <init>
INFO: Node created.
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (camera1) attached to this node (VisualSceneNode)
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (VisualSceneNode) attached to this node (Test.DAE)
26-03-2009 23:12:49 com.jme.scene.Node attachChild
INFO: Child (Test.DAE) attached to this node (rootNode)
26-03-2009 23:12:51 com.jme.app.BaseSimpleGame cleanup
INFO: Cleaning up resources.
26-03-2009 23:12:51 com.jme.app.BaseGame start
INFO: Application ending.

Its working now… There was a problem with the model exporting :)… Thanks for answer