Single player save game icon in-game creation.

Hi Everyone

So I need help creating a picture from the camera that can then be used in game as a save game icon. and this all needs to be done in-game automatically.

All the save game stuff is working fine. I just need to get an icon so that the player knows what they are loading into.

I hope that makes sense.

I have found “scene capture 2d” That can capture video to a material that I could then put on a save screen using a “Render Target” but this is a dynamic video not a picture.

What I think I need is to make a screen capture function that saves the capture in my HUD materials folder with a spastic name and over weights the existing pic for that games save slot.

I imagine this is a pity common problem for any signal player game.

Thanks

Andrew

You can use the ‘HighResShot’ console command to take screenshots. This will automatically save the file to hard disk. You can then load this file into a texture and use it to draw on the HUD.

UTexture2D* SavegameTexture = Cast<UTexture2D>(StaticLoadObject(UTexture2D::StaticClass(), NULL, *(Path)));

Hi Mindfane thanks for your help.

I am a pit confused.

How do I tell the game to look somewhere outside of the game directory for a texture?

It’s the “You can then load this file into a texture” bit that I am not sure about how to do.

I am going to need to do this in C++ aren’t I.

I think you will need C++.

Here is how you laod it from hard disk:
https://answers.unrealengine.com/questions/23440/loading-textures-at-runtime.html

As far as I know the image should reside somewhere down the UE4 game directory.

PS: Checkout the blueprint libraries provided by @Rama (you will find it in the forums). He has written several Blueprint nodes that will help you with stuff like these.

Thanks MindFane

I will look in to it

there is an option in the scene capture 2d that said “Capture every Fram” disable it and it wil take only on screanshot

14331-answ1.png

tell me if you figured out

I will look now… Thanks Amiot

Yep that got it working. Thanks Amiot. I will post all the info and a working video shortly

Just made a Video tut 10 min long.

Video is 160min away.

Hey Andrew

thanks for sharing!

You wrote you where going to use the captured image for a savegame icon.
Im trying to do the same… but got stuck at writing the rendertarget into the savegame.

It always seems like it just stores a reference to my rendertarget … but i need the value to be stored.

How did you accomplish this?

1 Like