Photomode: Most performant way to store scene captures

I’m making a first person game where a main feature is the player taking a film photography. I want the player to be able to take quite a bit of photos, store them, have them select their favorites and edit them. I’m not sure the best way to implement saving the photos.

I could be wrong but it seems to me if they are saved to memory that would not be ideal but I’m also not sure in Blueprints how to save images to the users disk in way they can be recalled later to placed in widgets and materials.

Any help on this would be greatly appreciated!

Hi @MatthewAustinPye
Let’s see…

To utilize photo-taking, saving, and editing in your game, this is a concise overview:

Capture the Photo:

Utilize Render Targets to render images when a player captures a photo

Save Photos to Disk:

Save rendered Render Target as an image file (e.g., PNG/JPEG) to the player disk using C++. You can expose the C++ function to Blueprints for usage.

Example C++ code: FImageUtils::ExportRenderTarget() for saving Render Targets.

Organize and Recall Photos

Store saved image file paths in an array or custom data structure.

Load images from disk to Textures to draw them to display widgets or material.

Edit Photos:

For light editing (filters, crop), make post-processing effects on the Render Target prior to rendering to file

Favorites and Metadata:

Favorite marking by storing metadata (tags, file path, edit history, etc.) to a file (e.g., JSON).

Use UMG (Unreal Motion Graphics) to display the photos in the UI, loading them dynamically as Textures.

If needed, use the photos as Materials on objects

Disk Permissions:

Offer good file-saving permissions, especially for different platforms (PC, console, mobile).

This approach maintains the performance in equilibrium by saving the photos to disk while allowing the player to take and handle photos in the game

2 Likes

Thank you so so much for this detailed response @BRS_GerDAngelo

I’m wonder if you could elaborate on this:

I’m using Blueprints to build my game so I’m not too familiar with C++, but I can probably figure something out if it’s the only way to make this feature happen.