public static LightProbe makeProbe(RenderManager rm, AssetManager am, int size, Vector3f pos, float frustumNear, float frustumFar, Spatial scene) {
        IBLHybridEnvBakerLight baker = new IBLGLEnvBakerLight(rm, am, Format.RGB16F, Format.Depth, size,
                        size);

        baker.setTexturePulling(true);
        baker.bakeEnvironment(scene, pos, frustumNear, frustumFar, null);
        baker.bakeSpecularIBL();
        baker.bakeSphericalHarmonicsCoefficients();

        LightProbe probe = new LightProbe();

        probe.setPosition(pos);
        probe.setPrefilteredMap(baker.getSpecularIBL());

        int[] mipSizes = probe.getPrefilteredEnvMap().getImage().getMipMapSizes();
        probe.setNbMipMaps(mipSizes != null ? mipSizes.length : 1);

        probe.setShCoeffs(baker.getSphericalHarmonicsCoefficients());
        probe.setReady(true);

        baker.clean();

        return probe;

    }
Creates a LightProbe with the given EnvironmentCamera in the given scene.

@param rm
           The RenderManager
@param am
           The AssetManager
@param size
           The size of the probe
@param pos
           The position of the probe
@param frustumNear
           The near frustum of the probe
@param frustumFar
           The far frustum of the probe
@param scene
           The scene to bake
@return The baked LightProbe
jme3-core/src/main/java/com/jme3/environment/FastLightProbeFactory.java