matState.setAmbient(new ColorRGBA(0.0f, 0.0f, 0.0f, 0.5f));
matState.setShininess(128.0f);
matState.setEmissive(new ColorRGBA(0.0f, 0.0f, 0.0f, 0.5f));
matState.setEnabled(true);
BlendState alphaState = (BlendState)rm.createRendererState(StateType.Blend);
alphaState.setBlendEnabled(true);
alphaState.setSourceFunction(BlendState.SourceFunction.SourceAlpha);
alphaState.setDestinationFunction(BlendState.DestinationFunction.OneMinusSourceAlpha);
alphaState.setTestEnabled(true);
alphaState.setTestFunction(BlendState.TestFunction.GreaterThan);
alphaState.setEnabled(true);
sphere.setRenderState(alphaState);
// Remove the back faces of the object so transparency works properly
CullState cullState = (CullState)rm.createRendererState(StateType.Cull);
cullState.setCullFace(CullState.Face.Back);