Rendering 3D skeletal mesh in UI

Hello,

Quite a simple question, we are actually in R&D for an inventory system.

We actually try to render a SKM directly in the UI (widget). The goal is to render the character, but also in the need to render 3D Weapons and capturing live thumbnail for them.

We actually see in the search that the common way to do it, is to have a scene capture, and manipulating the render target into the ui.

However, this solution bring some issues : pixelisation on the edge, need to create a sublevel to capture the player properly, have an impact on performance specially if we want the render to be live. In other word, the systeme for it seem pretty complexe.

We would like to know if there is already a way to directly render a skeletal mesh in the UI, instead going trough the scene capture ?

Thanks you !

Hi there,

Unfortunately, there is no innate way to draw 3D meshes in the UI. Compositing via a render target is how the PocketWorlds plugin in Lyra handles this, though.

In terms of the issues you raise, I’ll try to address them here.

I’m not completely sure what you mean with regards to pixelisation on the edge. Aliasing artefacts can be present on composited render targets if the target is too small or if the AA mode is ineffective. In general, a correctly sized target should be sample without aliasing. If rendering quality is of the utmost importance, the render target could be oversized to supersample the image on composite. There is a GPU side performance cost there, though.

You will need to create a sublevel or a level instance, yes. This is something that PocketWorlds does for that implementation, so there’s a good jumping off there.

There is an impact on performance on both the CPU and GPU, though there would be even with an innate version since there aren’t many other ways of achieving the effect other than rendering to a render target. In general, the cost of rendering a single object in a scene capture that is limiting what it renders (both in terms of via the ShowOnly list and enabled rendering effects) is palatable. There is a fairly consistent cost on the CPU for setting up the extra view (and for processing animations if it’s a skeletal mesh as here), and a GPU cost that scales on resolution, the object complexity, shaders in use, and rendering features. Depending on your target hardware and frametime budget, that could conceivably become an issue, though even then, there are ways around it with UI-specific meshes or reduced-complexity shaders if things are becoming too heavy.

I hope that helps.

Best regards,

Chris

Thanks for your answer, that totally answer it !

You are very welcome.

If you have any further questions, please feel free to ask. Otherwise, would you mind if I close out this case for now?

Best regards,

Chris

The issue can be close, thanks you !

No worries. I’ll close this out.

Best regards,

Chris