PBR needs a LightProbe, which needs an EnvironmentCamera which is an AppState, right? I need some model rendered to texture using PBR, so I only want to have the preview viewport rendered in the EnvironmentCamera.
Any hint on how this scenario is supposed to work?
well… the preview is the render of a scene right?
Think of the probe as a light. A classic scene even in a preview would have some lights, right? Here you’ll have a light probe.
So set up your scene with a nice HDR skybox, then place the env camera in the center and generate a probe. then add your model into it.
also, you can save the probe in a j3o. And all texture data needed by the probe will be also saved. So basically you can then just load the probe without having to use the Env cam every time.
Thanks! I was aware of this - I just wasn’t aware that the scene(rootnode) for the 6 viewports is provided by the LightProbeFactory.makeProbe… So it will work.
Nevertheless, is there a way to manually use the EnvironmentCamera without attaching it as an appstate? The reason behind this, is that the offscreen rendering is only part of one dialog in the UI and I would like to avoid to have a dependecy to the application object to set it up…