Invisible cube from tutorial

Hello,

I have strange problem with tutorial. I created a cube with unshaded material like here: https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:beginner:hello_simpleapplication and gave it a color. I can see only black background and that helpful data like framerate and etc. I can’t see the cube. Everything with unshaded material. From tests included in sdk I see only black and data too here: jme3test.material → TestUnshadedModel.java and at similiar codes. I tried everything. I have latest graphic driver, sdk with nightly build too. I tried re-install everything too. I’ve read that could help disable crossfire. I have one hd 3870x2 and I tried it disable with windows device manager … But whole computer was unusable. This isn’t good way how to achieve my solution. Is there anything that I could do? Other things like models, animations etc. working.

what color did you give it? black? and show us the whole code as it shouldn’t be much.



And does the standard basic blue cube work when you create a BasicGame project?

As I wrote its doing for example for code from tutorial, see link above, there is blue cube. No, it’s not working, basically it’s the cube from that tutorial :smiley: … it’s doing for all collors. Only objects with textures are visible. Unshaded no.

a) what version of JME are you using? Latest stable update?



b) post the actual code you are using in case something was messed up between the web page and the code you are using.

As I wrote before, it’s doing for unshaded materials … it doesn’t matter what is the code. If I create basic game from project wizzard - there should be blue cube … so I Can’t see that cube but I see data displayed on black background.



But If you need that code here it is:



package jme3test.helloworld;



import com.jme3.app.SimpleApplication;

import com.jme3.material.Material;

import com.jme3.math.Vector3f;

import com.jme3.scene.Geometry;

import com.jme3.scene.shape.Box;

import com.jme3.math.ColorRGBA;



/** Sample 1 - how to get started with the most simple JME 3 application.

  • Display a blue 3D cube and view from all sides by
  • moving the mouse and pressing the WASD keys. */

    public class HelloJME3 extends SimpleApplication {



    public static void main(String[] args){

    HelloJME3 app = new HelloJME3();

    app.start(); // start the game

    }



    @Override

    public void simpleInitApp() {

    Box b = new Box(Vector3f.ZERO, 1, 1, 1); // create cube shape at the origin

    Geometry geom = new Geometry(“Box”, b); // create cube geometry from the shape

    Material mat = new Material(assetManager,

    “Common/MatDefs/Misc/Unshaded.j3md”); // create a simple material

    mat.setColor(“Color”, ColorRGBA.Blue); // set color of material to blue

    geom.setMaterial(mat); // set the cube’s material

    rootNode.attachChild(geom); // make the cube appear in the scene

    }

    }



    Code from tutorial As i wrote. It’s totally same as at link above.

    Yes, I have the newest release of nightly sdk. As I said, I tried newest stable and nightly too. re-install everything … nothing helped.

    It’s not graphic problem of card, I run everything ok. I think it’s due to crossfire, cos it’s dual GPU card.