@Override
    public void simpleUpdate(float tpf){
        Quaternion q = new Quaternion();
 
        angle += tpf;
        angle %= FastMath.TWO_PI;
        q.fromAngles(angle, 0, angle);

        offBox.setLocalRotation(q);
        offBox.updateLogicalState(tpf);
        offBox.updateGeometricState();
    }
Renders a rotating box to a cubemap texture, then applies the cubemap
texture as a sky.
jme3-examples/src/main/java/jme3test/post/TestRenderToCubemap.java