I’ve been looking for days on how to take pictures while a game is running through either a camera component or camera actor. I plan to use the camera to take a picture every 5 seconds of where a meta human is looking and then store it in a file to be send somewhere else. I’m pretty new to unreal and doing this for a school project, so any help would be much appreciated
i cant write a detailed instruction, but take a look at 2d Scene Capture Component.
do a search on internet and this forum and you’ll find plenty of tutorials.
you can then use it to capture images and save them on disk. you might want to search also how to do that, it’s already there.
Ya it seems the 2d scene is what I need to go with. I started looking at it earlier today and mainly just saw it used as way to stream a video from one location to another. I haven’t seen anything of it actually capturing a still picture and saving it
you can set the capture time on the component. i think the tick interval. maybe you can also use activate/deactivate to ensure it’s active.
im not sure how to reliably tell it to capture one frame only.
the component (usually) writes to a render texture. once there. you can save that render texture as a file.
here are some links unreal 2dcapture to png at DuckDuckGo
The export to disk function can be used to save an image of the SceneCapture2D viewpoint.
This can be called at regular intervals using a timer or similar function.
SceneCapture2D settings are optional, but I changed a few settings to output the same picture as the ViewPort as much as possible.
Changed CaptureSource to FinalColor (with tone curve) in Linear sRGB gamut.
Changed gamma to 2.2 because the output image will be dark if this is not changed, and explicitly checked if Lumen is used. If the render target is completely dark and nothing is drawn, check Anti-Aliasing in GeneralShowFlags.
I don’t know if I’ve set up my scene capture component wrong, but I’m not able to connect it to texture of Export to Disk. How does yours work to do that?
This is the event or function that is called when a save is completed if asynchronous save is enabled.
If you want to do something when the save is completed, connect an event here.
If you don’t need it, you can leave it unconnected.
The one previous image you attached shows that you specified “ViewPointR” for Finename, which is probably incorrect.
You need to specify the complete file path, including the file extension, for Filename.
For example: C:\Users\t-hoshino\Pictures\myimage.jpg
I put in a path to a file I want it to go to and still nothing. My only guess right now is that that the capture component isn’t seeing anything. Currently I’m trying to call the component through my metahuman blueprint. Which I think might be the issue.