My app displays a large map with various objects some of which are transparent spheres. The camera can move freely in the world and look back over the entire world from high above. From this perspective, some translucent spheres at a certain distance from the camera loose their red color and turn white/lavender, while the spheres nearer the camera stay red. The color of the sphere has meaning in my program so I need the spheres to remain the color I assign them no matter what the distance. Does anyone know why the colors change or how to make them remain the assigned color? Here is how I created the sphere geometry and coloration:
...
Appearance sAppearance = new Appearance();
sAppearance.setColoringAttributes(new ColoringAttributes(new Color3f(1.0f, 0.0f, 0.0f), ColoringAttributes.NICEST));
sAppearance.setTransparencyAttributes(new TransparencyAttributes(TransparencyAttributes.BLENDED, 0.8f, TransparencyAttributes.BLEND_SRC_ALPHA, TransparencyAttributes.BLEND_ONE_MINUS_SRC_ALPHA, true, true));
Shape3D shape = new Shape3D(s.getGeometry(), sAppearance);
...
This shape is then added to the scenegraph and displays correctly except for its appearance when viewed from afar.