Rendering a 3D Model with UMG?

Does anyone know of a way to render a 3D mesh on a 2D Texture? Sort of like what’s seen in the majority RPG games where as you can either preview items and/or your character?

While I know it’s certainly possible, I’m wondering of it’s a doable thing through blueprints or if C++ would be the way to go? Would I be able to use UMG to achieve this?

Have a look at Render Textures, you create a new Render Texture Asset, then put the thing you want to render with its camera somewhere and have the camera render into the Render Texture. You can then use this RT in your UMG widget(s)

Hey, thanks for the fast reply! :slight_smile:

Currently fiddlin’ about with this, but I’m somewhat confused. Do I have to spawn the object somewhere in the world, in front of a camera in order to capture it? I tried adding a SceneCaptureComponent2D to the blueprint, but it just captures from what I assume is 0, 0, 0 in worldspace.

Also, I then add this RT to a Material, which I in turn use within UMG on an Image - is this the right way to do it, or?

Yup that’s the right way currently.

All I seem to get is a black image… The RT itself, as well as the Material is updated with the last captured frame. The UMG Image however, is plain black. Any ideas?

Make sure the material is configured to be for UI, it’s one of the checkboxes, ensures one is compiled for slate. Also make sure your output in the material is going to emissive.

Thanks! I had it set to Base Colour and not Emissive - that solved it. Making progress! :rolleyes:

I asked this myself. Theres a UViewport widget thats experimental.