Hello, I am working on a large map (3x3 km) in UE5.2, in which I would like to capture the scene from different cameras to simulate camera sensors. Currently, my approach includes the following steps:
- Creates different SceneCapture2D;
- Extracts the FTextureRenderTargetResource with GameThread_GetRenderTargetResource();
- Extracts the UTextureRenderTarget2D from the capture component.
- Define a FReadSurfaceContext to use the ENQUEUE_RENDER_COMMAND macro;
- Enqueue my render request that includes also a FRenderCommandFence that i use to understand when the capture has been executed.
- At each tick, extract the rendered image filled by the FReadSurfaceContext, and save it on disk.
I expect that the main bottlenecks will the rendering process on the UTextureRenderTarget2D and the writing process on the disk.
Is my approch valid, or I am misunderstanding some basic logics of UE5?
Can someone point me to the right way?
PS. I am a PhD student in Computer Science, my project is mostrly built upon C++, and I am self-taught, so anytime, for any feature that i would like to include in my project, I felt like a beginner. Hence, I am sorry if my questions will seems simple and inaccurate.
Thanks in advance.