PBR + RenderToTexture + EnvironmentCamera

My example in:

https://bitbucket.org/JavaSabr/jme3-spaceshift-editor/src/504a29815f16c728743b8cca060e913660c850fc/src/com/ss/editor/state/editor/impl/model/ModelEditorState.java?at=master&fileviewer=file-view-default

public void updateLightProbe() {
        EXECUTOR_MANAGER.addEditorThreadTask(() -> {

            final Node stateNode = getStateNode();
            stateNode.detachChild(getModelNode());
            stateNode.detachChild(getToolNode());
            stateNode.detachChild(getLightNode());

            frame = 0;
        });
    }

 @Override
    public void update(float tpf) {
        super.update(tpf);

        if (frame == 2) {

            final Node customSkyNode = getCustomSkyNode();

            final Array<Spatial> customSky = getCustomSky();
            customSky.forEach(spatial -> customSkyNode.attachChild(spatial.clone(false)));

            EDITOR.updateProbe(probeHandler);
        }
}
1 Like