I am trying to recreate the behaviour of the ‘shot’ or ‘highresshot’ console commands in order to take a screenshot of the viewport. I was using these commands previously, however I found that they weren’t working in the packaged version of the game (I tried using both the console command blueprint node and the equivalent in CPP, neither worked). Regardless, I never really liked using console commands to achieve this.
In my level map, I have two light sources: a directional light and a sky light. I also have a GlobalPostProcessVolume. I have added a SceneCapture2D actor to the map, keeping all settings to default except for changing Capture Source and preventing it from capturing every frame.
I have the following blueprint logic:
This produces the following screenshot:
However, this differs from what is shown in the viewport. If I use the ‘shot’ command, I get this:
Firstly, while the camera location and rotation seem fine the FOV is slightly too low. More importantly, the light rendering seems completely different - the screenshot generated from the blueprint seems to have no self-casting shadows, and no reflected light cast on the walls.
I’ve tried every combination of SceneCapture2D capture source, and Render Target format, and this combination I’ve shown gives the “best” result.
What am I doing wrong here? Is it best to achieve this in a different way? (I am not tied down to this method by any means)