What is the best approach to antialising for Unreal Engine UMG widgets for GearVR — Oculus
New to the forums? Click here to read the "How To" Guide.

Developer? Click here to go to the Developer Forums.

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

saldavonschwartzsaldavonschwartz Posts: 20
Brain Burst
edited December 2016 in Samsung Gear VR
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:



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:



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.

Comments

  • jinzayjinzay Posts: 13
    NerveGear
    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!
Sign In or Register to comment.