cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best approach to antialising for Unreal Engine UMG widgets for GearVR

saldavonschwart
Explorer
I'm working in an app for GearVR where I display a set of 'cards' in world space via UMG widgets. It looks something like this:

htcljl3y8e5w.png

The issue I have is that the cards look pretty aliased on the device in a number of ways. I explain now the issues and what I've done about it.

1. The images shimmer a lot especially with patterns (i.e. the wooden deck lines in this image).
I read this post by Carmack. What I take from it is to use mipmaps, alpha padding and trilinear filtering. About filtering though he seems to contradict himself towards the end, or I misunderstood something. He first says to use GL_LINEAR_MIPMAP_LINEAR, then he says trilinear might not be what you want. AFAIK GL_LINEAR_MIPMAP_LINEAR is OpenGL's trilinear, so not sure what he meant.

But either way, I tried a few different mipmap gen settings in UE's texture editor, along with trilinear filtering and while it does produce a texture that shimmers a bit less, it is definitely not good enough.

2. The text shimmers depending on the viewing angle too.
With this one I am at a loss since I don't know that UMG provides any way to tweak text related textures.

3. The card edges are pretty jagged.
Carmack here suggest MSAA x2 or even x4. I had a very long discussion on another thread where I wasn't sure if MSAA was even on in UE. Turns out it is on at x2 by default. I was told that recompiling the engine after changing OpenGLRenderTarget.cpp line 152 should be the way to increase MSAA, but this section of the engine code is not being executed actually, so not sure as of now how to increase MSAA.

The last thing I tried was stereo layers. Stereo layers did produce a rock solid image of the cards. But I think they do not support transparency / masking at all, or I do not know how to enable it. As you can see from the image above, my cards have rounded edges. But when doing a RTT and then displaying the result in a stereo layer component, the result is a square in which the areas not covered by the rounded edges default to matte black, like this:

y0ut34fgklj0.png

Stereo Layers also have the disadvantage that I would then have to somehow hide the real widgets and would have to do additional work to mimic interacting with any controls (i.e. buttons) in the cards through the stereo layer which actually just displays a quad.

So not sure how I should go about this. In his post Carmack says it should be totally possible to achieve rock solid non shimmering results, but I just haven't figured out how to do so with UE.

4 REPLIES 4

Anonymous
Not applicable
Did anybody find a solution to this in those past 3 years? Im using 4.22 Oculus and 3D Widgets hurt my eyes on the Oculus Go/Quest!

Discalculate
Explorer
I've been searching all day and can't find a way to have smooth looking 3D widgets on the Quest. Did you guys ever figure this out?

hollowdilnik
Honored Guest

For people finding this through search, the render target of UWidgetComponent does not get filtered by default (mipmaps are not generated too) and enabling it is a pain. I made a note on how to enable it (also available as a plugin on github): https://hollowdilnik.com/2021/01/09/widget-filtering.html 

MetaQuestSupport
Community Manager
Community Manager

Hey there Salda! Looks like you're putting in a lot of work here, impressive!  You might have more luck posting this question on the developer forums though, it's accessible here. Hope this helped!😁👍

If you're the author of a thread, remember to mark a reply as the Accepted Solution to help others find answers!