3d-Model over the Gui

Yeah I moved it.

I edit the Code, because of some problems…

[java]import com.jme3.renderer.Camera;

import com.jme3.renderer.RenderManager;

import com.jme3.renderer.ViewPort;

import com.jme3.scene.Geometry;

import com.jme3.scene.Spatial;

import com.jme3.texture.FrameBuffer;

import com.jme3.texture.Image;

import com.jme3.texture.Texture;

import com.jme3.texture.Texture2D;

public class ScreenCaptureHelper {

private ViewPort offScreenView;

private Texture2D texture;

private Camera mainCamera;

private Spatial scene;

private RenderManager renderManager;

public ScreenCaptureHelper(Camera mainCamera, Spatial scene, RenderManager renderManager) {

this.mainCamera = mainCamera;

this.scene = scene;

this.renderManager = renderManager;

offScreenView = new ViewPort(“Offscreen View”, mainCamera.clone());


texture = new Texture2D(mainCamera.getWidth(), mainCamera.getHeight(), Image.Format.ABGR8); //<-ABGR to get a transparent Background (if you need one)


FrameBuffer offScreenBuffer = new FrameBuffer(mainCamera.getWidth(), mainCamera.getHeight(), 0);


//Couldn’t see the mesh, he was the evil ->






  • Captured data will be available in {@link #getTexture()} and can be applied to Picture.
  • Other ways of using derived texture may result unexpected behavior


    public void captureScreen() {

    //It makes problem while moving, so just disable it->



    scene.scale(4f);//The Image was to little so just scale the Model up


    renderManager.renderViewPort(offScreenView, 0);

    scene.scale(0.25f); //And Down :smiley:


    public Texture2D getTexture() {

    return texture;




Sorry I reply so late. I test your fixed code out… Work good but :


is the code that I want to keep. Thanks for point me the error! Nice day my friend.