Again Background - Quad is drawn over 3D Scene

Hello,



The image is rendered through three nodes. A backgroundnode attached to a PreViewPort, a rootNode attached to a MainViewPort and a guiNode attached to a PostViewPort. The red quad is attached to the PreViewPort. Nevertheless it is drawn over the 3D scene (molecule) in the MainViewPort.

Does anyone know which flags I have to set for PreViewPort and MainViewPort to let the quad appear behind the 3D scene?

Thanks.



Regards,

Equi

http://hub.jmonkeyengine.org/groups/graphics/forum/topic/setting-a-stationary-background-image-in-jme3/

If you don’t clear the Z-buffer after the preview then it is likely that nothing else will be drawn where your quad is… depending on its depth.



Given that, and I’m guessing since I don’t see any code, I think you need to make sure that the next viewport in the chain clears the Z-buffer. This may be the main viewport.