The model disappears

Hello I am new Jmonkey. I’m trying to create a scene for a 2D game turrets.

I am using TestOrtho as an example. The problem I have is that when I add the background to the scene, the model disappears

Here is the code:

[java]// Import the model

Spatial pezGlobo = assetManager.loadModel(“Models/PezGlobo/PezGlobo.j3o”);

pezGlobo.scale(0.5f, 0.5f, 0.5f);

pezGlobo.setLocalTranslation(0f, 0f, 1f);


// Add a light to make the model visible

DirectionalLight sun = new DirectionalLight();

sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f));


// Create background image

Picture imagenFondo = new Picture(“Fondo”);

imagenFondo.move(0, 0, -1); // make it appear behind stats view

imagenFondo.setPosition(0, 0);



imagenFondo.setImage(assetManager, “Scenes/ImagenFondo.png”, false);

// attach geometry to orthoNode


Obviously the gui isn’t in the background… Why would it be? oO

@normen said:
Obviously the gui isn't in the background.. Why would it be? oO

I thought the location was enough.

pezGlobo.setLocalTranslation(0f, 0f, 1f);

imagenFondo.move(0, 0, -1); // make it appear behind stats view

anyway I will try your suggestion
@hickaru said:
I thought the location was enough.

Its still in the gui node then.. And the gui is in front as I said.
@hickaru said:
anyway I will try your suggestion

thanks xD

still I have problems with the background image, try the solution you gave me but I get this error.

Uploaded with

The Source Code:


public void simpleInitApp() {

// Instantiated the object image

Picture p = new Picture(“Background”);

// Set te image for the Object

p.setImage(assetManager, “Scenes/ImagenFondo.png”, false);

// Set the size of the image



// Set the position of the image on the origin



// Create the “pre viewport”

ViewPort pv = renderManager.createPreView(“Background”, cam);

pv.setClearFlags(true, true, true);


viewPort.setClearFlags(false, true, true);