Per-viewport gui rendering question

Hi All,

I’m using a VR project to produce a side-by-side stereo application and I’d like to re-render GUI/UMG widgets in each viewport instead of across the entire viewport, looking through the code I can see a UI render in GameViewportClient::Draw() which looks like it is executed per player (I’m assuming that with multiple local players and splitscreen enabled this renders UI correctly in each viewport?), I’d like to replicate that for my HMD VR application but not sure if this is the best place to handle that, I see AHUD::Draw() as a possible alternative too?

I presume I’d need to create a custom plugin to reimplement the GameViewportClient::Draw() function, are there alternatives to this approach or what would be the best direction to go to implement this, are the classes / functions highlighted the correct ones to modify?

Thanks, Sticky.

You should use the Widget Component, and put your UI in the world. Even if you could get what you propose to work, you’ll probably make people sick or uncomfortable. Users don’t like having the UI directly on their eyes, there has to be some depth between the eyes and the UI.

Hi Nick,

I understand what you are saying but we have not had any issues previously with this method, we generally use this to display debug information or utilities for stereo adjustment in-app and the ability to design and render a gui in screen-space is far quicker then setting it up in world-space, we make bespoke stereo applications with dynamic settings so we need a quick method to guarantee readable gui at any moment. I realise this is considered bespoke but is this not really possible at the moment?

I can see we could hack together something by duplicating a WidgetComponent and laying it out side-by-side using a custom event handler to update both widgets but thats not ideal, do you have any other suggestions?

Thanks, Sticky.