vimesito
(vimesito)
December 28, 2017, 8:08am
1
Hello everybody!
I’m doing a game where you can collect things, in this case coins, I have the static mesh and I want to render the static mesh on the UI Widget, is there some way to do it?
Thank you!
vimesito
(vimesito)
January 9, 2018, 10:30pm
3
Grot13:
Hi,
I’m currently working on the same thing so I hope I can help, there are probably several ways for doing it, but here is how I’ve done:
The first thing you need is a to create a render target 2d (right click in content browser > materials and textures >render target) and set it’s size. In my case the UI viewport was 988*850 so I set the same size for the render target, but edges were crenellated, so I multiplied it by 2 to keep ratio, and it’s fine.
Now this render target must be used in a material which domain is User interface:
https://img15.hostingpics.net/thumbs/mini_812952materialdomain.png
Set your texture parameter with the render target :
https://img15.hostingpics.net/thumbs/mini_725220Texture.png
Now you can use this material or an instance on a image widget
https://img15.hostingpics.net/thumbs/mini_794065Image.png
For the moment it should be black because the render target is not used anywhere (exept in the material). You can create a room in a blueprint or somewhere in your level. You can see this room as a studio to present your items.
In this room you can place a podium or arrange howhever you want, but you have to put a scene capture 2d ( or scene capture component 2d if you are in a blueprint ) that uses the render target you created at the begining:
https://img15.hostingpics.net/thumbs/mini_929474Viewport.png
Now you should see what is in front of the scene capture in your UI, on the image widget.
More or less is like this: Render 3D objects in UMG Widget/HUD | EngineUnreal but didn’t work
Syedhs
(Syed)
January 9, 2018, 11:48pm
4
That is a nice step by step explanation by @Grot13 and it should work (I got mine work too). What is it that doest work?