In the same way that it’s fairly simple to take a screenshot of the viewport, is it possible to save the Specular or Roughness maps (or any other of those maps in ViewMode>BufferVisualisation) of whatever is being displayed in the viewport?
I’m trying to do this using c++ but blueprint or editorUI answers are also welcome
Using the Editor’s UI is quite simple. Just need to enable the “Include Buffer Visualization Targets” in the “High Resolution Screenshot” dialog. This will save all the viewport’s buffer targets: BaseColor, Specular, WorldNormal, Opacity, Roughness, Metallic, etc.
What about doing this with C++?
To do this in C++ you’ll need to go pretty deep inside the engine. Concretely, the method FRenderingCompositionGraph::DumpOutputToFile(…) is where you can have access without too much trouble to each of those BufferVisualisation maps. I believe most of the maps go in “case PF_B8G8R8A8:”. Hope this helps to anyone trying to access these maps. The modification I made was to, instead of shaving them to disk, save a couple of them in the shared memory space.