Hello,
How to take a screenshot or photo through camera in game and use it in widget?
Thanks.
If it helps you can press G when in edit mode and screen shot from there
Hello you have to use a render target and capture scene 2d.
Here is a quick example to create it :, Unreal Render Target & Scene Capture 2D - YouTube
And an example on how put an image in a widget by same person : Unreal 4 UMG Basic Text To Screen & 2D Image - YouTube
Hello Fen,
Thanks for the help. I tried the you told. But I realized I need some more. Actually it is a slot based save game system and the slots are unlimited. Now I also want a thumbnail for each slot. Now as you told I can save the texture/thumbnail image with some specific name and path. But now I dont know how to call the texture/thumbnail image by file name and use it. I tried to google, but cant find any satisfactory suggestion, though I came up with there is a plug in from rama’s extra node which can solve the problem. But I have a fear for plugins and I really dont know how to get rama’s plugin for 4.16. Any suggestions?
Recently someone asked a similar question. Maybe you’ll can use it too : https://forums.unrealengine.com/deve…o-the-material
Thanks again. But I couldn’t find “Get Asset by Object Path”, “get Asset”,“get Asset Registry”. Are they Rama’s plugin or anything else?
I found them by removing context sensitive in right click search (i was in event graph)
Engine version?
I tried in 4.19 and found it but not in 4.7 (only ones i have installed actually) (i maybe wrong but it seems added in 4.18.
thanks. I found it on 4.17.
Great ! And cool that you can use an engine version with them.
Another thing I am confused with. When I use “Export Render Target” node what will be the “File path”? I mean now I can put any directory in my pc. But what should be put according to packaging the project for mobile?
And the saved image is Texture Cube, (which is deformed) I dont know how to fix it.
I haven’t used it so much and back to engine recently so i have to do some tries to figure about “take a pic in game and show it later from directory” total action (doing that now ^^) but about directory i personnaly would use a folder in content to have it working in package (but it needs tries too)
About texture cube didn’t you use cube render target instead of rendertarget 2d or scene capture component cube instead of secene capture 2d to explain the cube issue ?
Hi, sorry for the delay. I got a fever.
I used a “Render target 2d” with a “scene capture component 2d” as the “texture target”.
In blueprint I used “capture scene” and then “Export Render Target”. The saved image is a png, but it shows in the details Displayed:128x128x6 (CubeMap) and the file shows as texture cube.
I just need a texture or image or brush, not texture cube. How to do that?
After some searches, it seems that the easier way to do things in texture2d is or using c++ codes or using rama’s plugin : https://forums.unrealengine.com/deve…o-C-Required!=
It is updated for each last version of the engine and have a lot of other usefull stuff in.
(I continue to work around but as not sure to have time and to find something usefull you should try plugin imho.)
Hi, the update is I just did it in a nasty way. I got rid of capture component and render target, I used “execute Console command” which take a screenshot as png. And used Rama’s plug in and node “Victory Load Texture 2D from file” and set brush from texture. All those work OK. The only thing I am really confused about the file path. What should be the file path considering packaging and install the game in mobile.
I mean definitely the path will be somewhere in the game, but as it will be in the mobile how the path will be changed. For saved games we dont need to deliver any file path. But for this we need to fix file path. Can you please give an example?
For example what does this file path mean? And also this one.
I tried save and load from editor and package. In both cases it creates folder /Game/textures in the disk where game folder is.
I made it with just 2 key events for actions (key e see around while pressed and save / r for load) in thirdpersoncharacter,
on begin play : widget create /set and add to player screen in thirdcharactergamemode.
a widget with vertical box and 3 images for check : 0 for reference, 1 to chose and see pic before save (does same as 0 as i did it actually), 2 to see it loaded.
Image saved is darker for me, not sure why, haven’t check.
My render target si in rgba8. 16 seems not working.
I forgot to set material domain to user interface in my material. Don’t do the same. ^^
(infos for future people searching, in hope it helps solve tis faster)
I’ll may try do a better using system later like select camera on widget, choose the angle and zoom tehn click for save and put in an album, but basis will be the same.
“Image saved is darker for me”
Set the Render Target to “RTF RGBA8” and set the Camera (Scene Capture 2D) to “Final Color (LDR) in RGB”
and to make brighter image that is saved to disc;
set the Render Target option “Target Gamma” to 2.0 or highter if needed