Can I save a single frame of Scene Capture as a texture?
I want to use Scene Capture to to take screenshots in runtime, but rather than saving them a an image file in the screenshot folder, I want a single frame of it as a texture variable I can use in a blueprint. For example, when I press the F key, the game takes a screenshot of the Scene Capture and stores it in my texture array in my blueprint so I can use later.
I tried making a Texture and TextureRender variable and assign TextureRender to Texture when I press F, but Texture updates with TextureRender. Any way to get a single frame from it?
asked Jan 18 '15 at 05:11 AM in Rendering
Just found this post while trying to do something similar, and found an easier way in the upcoming version.
Starting with 4.8, you can also use the BP Node "Update Content":
That way you don't have to move the Capture Component 2D around twice for every snapshot. The rest of the setup is the same as Eric showed.
answered May 14 '15 at 11:36 AM
Hey Admiral Skye -
Place your SceneCapture2D Actor in a BP with Capture Every Frame set to False. In the Event Graph, Place two Set Relative Location nodes with the SceneCapture2D as the Target. In the first Set Relative Location set the New Location to 0,0,0.01 In the second Set Relative Location set the New Location to 0,0,-0.01 Add a Press F key pressed event Connect the three nodes in this order Event Key Pressed >> First Relative Location >> Second Relative Location
The nest step takes a bit more work. You will need to decide how many Render Target Textures you want to store as they must be established in the Content Browser before runtime. You can overwrite them if more is needed but this is a performance heavy activity. In this example I set up 3 different ones that will overwrite each other in a looping cycle so 0,1,2,0,1,2.....
answered Jan 20 '15 at 07:50 PM
Lovecraft_K ♦♦ STAFF
Follow this question
Once you sign in you will be able to subscribe for any updates here