I have a player creation screen. What I’d like to happen is when you press the accept button - it takes a picture of your character, and saves image. I’d then like to run an event that uses that image to update the player’s portrait on their HUD and in a lobby menu, etc. Any ideas? Thank you!
Hey there @drewjohnson71! So one way to do this would be to use a Scene Capture 2D to Render Texture to take the original shot, then export them to keep them as an asset and use that asset as a parameter for the material for on the portrait.
Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.
Tutorial for export/importing render texture:
Render Target + Scene Capture tutorial:
The method from @SupportiveEntity is excellent. Here is an alternative method:
I think you can use the Screenshots Tool to take a screenshot and then load the image from your computer. Here is a tutorial: Import Images During Runtime | Community tutorial
Oh that’s excellent! It’s likely also more performant than render targets in this regard. However if you do updating portraits or anything similar RTs would be needed for that feature.
thank you!
@SupportiveEntity thank you!
Hello. I have been searching and watching videos for taking a picture in game like phasmaphobia and nothing I found seemed right for what I needed. Here is what I figured out and it is working great!
the image above is the blueprint code in my camera that saves the pictures.
I used a scene capture 2d for this. The camera is like a video feed but this creates a picture from it.
You can cast to the camera in a widget blueprint and display the slate brush you create with that.
By the way, make sure the compression settings are on HDR Compressed like in that picture. Otherwise, the picture will not display in the widget.
I hope this helps people!
This is the widget blueprint code