Is there a way to Render UMG to a texture
Hi, I want to know if it is possible,if yes how, to Render a UMG Widget to a texture and apply it to a mesh. I want to make a SAO style Healthbar that the opponent will see.
asked Mar 30 '16 at 02:14 PM in Using UE4
Yeah but you'll need to create a C++ class to access the needed functions...
Dependances in Build.cs file:
After all of this has been implemented your going to have to cast the UTextureRenderTarget2D into a UTexture so it can be passed as a texture parameter to the material instance (Only in C++), although you could just add this at the end of the function and just have it return the UTexture to make things easier.
You could use the (experimental) 3D Widget Component instead of a Texture. You wont be able to wrap it around the whole model, but if you only want a UI rendered on a flat surface it works just fine.
Here is a tutorial about this: https://docs.unrealengine.com/latest/INT/Engine/UMG/HowTo/Create3DWidgets/
answered Jul 05 '16 at 03:24 PM
The only way I have figured out how to do it is to set up a SceneCaptureComponent2D to capture a 3D Widget Component and render it to a render target. However, this will not allow the same level of control over the transparency.
I would recommend checking out this if you know anything about programming in C++
answered Mar 05 '18 at 01:39 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here