I can see that it uses a background node. But reading that code and the Background.java code in Xith3D I can't see any indication that its disabling the depth test before writing the background geometry.

Ok, Java3d does disable the z buffer and draw a one unit background (in my case a sphere), xith doesn't (yet?), so you have to draw a huge cube to do it. The way I have done it for darkvoid is to create an ac3d model with the starfield texture applied that is 280 metres across (not big enough for propper play, but ok for now, corners at -140,-140,-140 to 140,140,140). This then has the texture applied to the inside of it. I use my ac3d loader to load it into xith and place it in the background. I hope that helps a little, but it's just summing up what others have said.

I'd like to see the z disabled for background nodes and a one unit size like java3d did, maybe when I've sorted a few things out here I'll look into it if no-one gets there first

But reading that code and the Background.java code in Xith3D I can't see any indication that its disabling the depth test before writing the background geometry.

Isn't that what I asked before?

It seems that background stuff is rendered first. So theres hope that a skybox e.g. isn't fogged away. But it still has to be a large box taking the Z-clipping into account when setting up the geometry?

I did, and noticed a strange thing.First of all, the thing that almost every 3D tutorial seem to be forgotting about skyboxes is that you have to disable the depth buffer when drawing them around the camera, to ensure that the scene will be drawn on top of the skybox instead of partially (of totally) behind the sky geometry.

This is the rather ugly code for a skybox proto-demo. It is working correctly only if you use vertex colouring for the skybox. If you enable the texture it seems to make ignore the DepthBufferEnabled flag. I'm doing something wrong, I hope.

//sets renderingattributes to not use depthbuffer for the skyboxRenderingAttributesra = newRenderingAttributes();ra.setDepthBufferEnable(false);AppearanceboxApp = newAppearance();boxApp.setRenderingAttributes(ra);

//Enable this to have a blue working skyboxboxApp.setColoringAttributes(newColoringAttributes(newColor3f(0.0f, 0.0f, 1.0f), ColoringAttributes.NICEST));

//using this call broke the setRenderingAttributes!//boxApp.setTexture(skyTex);

I can see that it uses a background node. But reading that code and the Background.java code in Xith3D I can't see any indication that its disabling the depth test before writing the background geometry.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org