How to make a sphere not transparent?

Hello,



i have a sphere-object with torus-objects around (see figure). The problem is that the sphere seems to be transparent by rotating the node with the sphere and torus-objects. Is there a possibility to make the sphere not transparent?



http://i.imgur.com/zBWKg.png



[java]

Torus circleX = new Torus(32, 32, 1f, ThreeDAppConfig.NAV_SPHERE_RADIUS);

circle_X = new Geometry(“circle_X”, circleX);

circle_X.setMaterial(threeDApp.getMaterial(ColorRGBA.Red, false, false));

circle_X.getMaterial().getAdditionalRenderState().setDepthTest(false);

Quaternion qX = new Quaternion();

qX.fromAngleAxis(FastMath.HALF_PI, Vector3f.UNIT_Y);

circle_X.setLocalRotation(qX);

circle_X.setLocalTranslation(sphere.getWorldTranslation());

navigationSphereNode.attachChild(circle_X);



Torus circleY = new Torus(32, 32, 1f, ThreeDAppConfig.NAV_SPHERE_RADIUS);

circle_Y = new Geometry(“circle_Y”, circleY);

circle_Y.setMaterial(threeDApp.getMaterial(ColorRGBA.Blue, false, false));

circle_Y.getMaterial().getAdditionalRenderState().setDepthTest(false);

Quaternion qY = new Quaternion();

qY.fromAngleAxis(FastMath.HALF_PI, Vector3f.UNIT_X);

circle_Y.setLocalRotation(qY);

circle_Y.setLocalTranslation(sphere.getWorldTranslation());

navigationSphereNode.attachChild(circle_Y);



Torus circleZ = new Torus(32, 32, 1f, ThreeDAppConfig.NAV_SPHERE_RADIUS);

circle_Z = new Geometry(“circle_Z”, circleZ);

circle_Z.setMaterial(threeDApp.getMaterial(ColorRGBA.Green, false, false));

circle_Z.getMaterial().getAdditionalRenderState().setDepthTest(false);

Quaternion quatX = new Quaternion();

quatX.fromAngleAxis(FastMath.HALF_PI, Vector3f.UNIT_Z);

circle_Z.setLocalRotation(quatX);

circle_Z.setLocalTranslation(sphere.getWorldTranslation());

navigationSphereNode.attachChild(circle_Z);

[/java]

You mean that you can see the toruses through the sphere?



That’s because you’ve turned off depth testing for them.

2 Likes