Highresolution background image?

But I just don't want a one color background to my scene.



So is there any simple way of using a highresolution image as background with jme?



I know this is kind of outside the scenegraph and the 3D part of the rendering. But I still wanna use jme for my 3D rendering but mix if with highresolution 2D graphics.



Any hint how to do this?

My guess would be to extend LWJGLRenderer and do something when buffers are cleared?



If you wonder when I would want to use this. Think of an ingame menu where I use some 3D graphics to display options menu's and such but also want a flashy highresolution image in the back.

You could have a skybox, or simply a Quad rendered in Ortho mode with a ZBuffer state to be drawn behind everything else.

duenez said:

a Quad rendered in Ortho mode with a ZBuffer state to be drawn behind everything else.


Are you sure thats even possible?
The wiki says "Ortho objects are drawn last because these are screen oriented (UI, HUD, etc) graphics and should always be “on top” of the rest of the scene"

If I even try to change the z-value of my "ortho" quads they just vanishes.

My first try was actually to use ZOrder to move a quad behind the scene but that didn't work :/. And using a quad and a texture to draw a highresolution image to the screen might not be the best way.

An easy way is to use CameraNode and attach a quad to it.

You need a quad or several quads (depending on the minimum texture size supported) textured and placed next to each over.

For example, if your minimum texture size requirement is 1024 and your image is 2048x2048 then you need to split it into 4 quads and place them next to each over. If you want them drawn in the background then you need to make sure they are drawn first, set up a renderpass and render to ortho queue without depth buffering, flush render queues, then render the menu.

hey there,



i think it should be possible to do it with renderPasses. u take two of them. on just has the image in ortho mode and is added first to the passManager. then you add everything else to the second renderPass and add that one two … like that it should be drawn in the back even the image being rendered in ortho bucket.



sorry if i got something wrong here but i imagine it should work properly,



Andy

Momoko_Fan said:

set up a renderpass and render to ortho queue without depth buffering, flush render queues, then render the menu.


Ah, thnx. I'll take a look at multiple renderpasses. Never played around with that but it sound like what I want.