Rendering Nodes and Groups always in foreground

Hello folks, I have a problem with Xith3D.

I want to create a node whose children shoud be permanently in foreground in the scene.
Meaning, no matter how close to the camera I move any other Object in the scene
it will never clip my foreground-node.
I already tried the Foreground class node from Xith3d, however it seems that it does nothing
but moving the attached geometry to position (0,0,0).
However, first this makes it necessary to change my front clipping plane distance to 0 and second
if any of the “background nodes” come close to the camera they still cover my “foreground node”
or parts of it.
Is there any way to ensure that my foreground is really always foreground no matter how close any other
objects are to the camera?

Thanks in advance

You can turn off Z-Buffering (I belive it’s called like that) Then it always shows on top - no matter where it is.

[quote]I already tried the Foreground class node from Xith3d, however it seems that it does nothing
but moving the attached geometry to position (0,0,0).
[/quote]
It renderes the attached geometry RELITIVE to 0,0,0, you can still add a TransformGroup to move it around – if you couldn’t it would be pretty useless.

Don’t forget about the three different camera modes either (View.VIEW_NORMAL, View.VIEW_FIXED_POSITION, View.VIEW_FIXED)

You can disable the Z-buffer on ANY object simply by setting an attribute:


                        Appearance a = new Appearance();
			a.setRenderingAttributes(new RenderingAttributes());
			a.getRenderingAttributes().setDepthBufferWriteEnable(false);

The Background and Foreground nodes do not do this for you.

Checkout my SkyBox code which combines a Background Node and disabling the Z-buffer: http://xith.org/showsrc.php?src=src/org/xith3d/geometry/SkyBox.java

I found that with my HUD it is better NOT to disable the Z-buffer as that has the side-effect of not playing nicely with alpha layers. However, if you don’t care about that then disabling the Z-buffer on the Foreground node should work.

Will.