Forum Discussion

Samuidayone's avatar
Samuidayone
Honored Guest
10 years ago

moire effect / interference pattern

Hi everyone,

just a little insight to who's talking: I am working in 3D scanning, 3D printing and to a certain amount in 3D visualization. The goal is an Oculus simulation for a museum, which I never did before. Our VR guy left the team and so we had to hire someone to create an environment in Unity. I am posting here, not in the Unity section, because I think, the problem is a general one, not a Unity one. I could be wrong. So I was creating the geometry in 3ds max, exported it and the hired developer put it together, created lighting and collisions and everything needed.

Now finally the problem. There are several historical buildings in the simulation and they are more or less detailed. There are columns, pilasters with vertical fluting and a broad stairway entrance for example. Depending on the viewing distance and angle these details basically look like many parallel lines and those are causing a moire effect. Unfortunately this interference pattern is not static but depending on the player's movement. Therefore it is flickering or looking like raining down which is very disturbing. Here is a phone-made video of what's going on on the screen




I have tried changing the graphics card settings for antialiasing and whatever I can find there, but neither on the computer monitor nor in the Oculus I can spot a difference, which makes me wonder. I do like experimenting with values, but without a visible result, I'm desperate. I accept, that there are no changes in the Oculus if my settings (although they are global) only affect the computer monitor. Since I am not sure, I would like to know, if the Oculus is actually connected to the Nvidia settings or not. It does not appear in the Nvidia or Windows display overview, which is a hint. If this fact would be clear, my next fear is that this is not coming from anti aliasing at all. I also tried downsampling (playing around with physical and theoretical resolution) but that didn't work.

I am a total noob but I do know that current games mostly don't suffer from such flickering effects. How do they solve this? Should I look into the computer and graphics card settings, the settings in the Oculus Configutation Utility or is the Unity development a place to make some changes? I have no clue so I hope, you guys have an idea. If I can provide information to help you help me, please tell me.

system stats:
Windows 7, 64 bit, 16GB RAM, CPU i5 4690 3.5 Ghz
Nvidia GeForce GTX 970, latest driver
Oculus DK2, Firmware 2.12, Oculus Configuration Utility Version 1.1 (SDK 0.8.0.0)

Cheers,
Sam

4 Replies

  • Part of the problem with moiré patterns is that conventional screen space effects that work on 2D applications (things like anti-aliasing of the scene texture before it's sent to the Oculus runtime) won't work.

    The texture that's handed off to the runtime undergoes distortion. The distortion results in a 1:1 texture pixel to screen pixel ratio at the very center of the image (directly under the lens axis), but as you move away from the lens axis that ratio rapidly increases. Because of this, high frequency patterns that are anywhere but dead center on the screen will frequently result in moiré patterns.

    I believe the SDK has (or had) a flag for specifying using a more costly, but higher quality sampling mechanism during distortion. Looks like it's currently exposed as `ovrLayerFlag_HighQuality`.

    Unfortunately I know nothing about Unity or how to trip this flag there. You might have more luck in the Unity specific forum.
  • Thanks for the response!

    I will encourage the developer to dig deeper into Unity's options. I will also hit the Unity forum.

    What I can tell you, except for the bottom, there has been no texture used. As for the bottom texture, there has been applied some sort of distance blur to avoid pixel flickering in the distance. Now that I wrote this, I think something like this could be done to the geomety. Decreasing the level of detail (aka removing disturbing details) for distant buildings and increasing it when the player gets closer to see the buildings in their full 'beauty'. I wonder if I have to build those low detail models or if Unity works that out. I think I should do it.

    I would like to add, that the flickering effect does not only appear off center, but everywhere on the screen. So I think the distortion is maybe influencing the effect, but not causing it.

    Cheers,
    Sam
  • Mars3D's avatar
    Mars3D
    Honored Guest
    i don't know about Unity but from a programming perspective I can reduce moire in my application by increasing the 'PixelScale' factor that is passed in to the ovr_GetFovTextureSize function which determines the size of the textures rendered to. As I understand it Increasing the factor beyond 1.0 is effectively giving you supersampling, unfortunately it can also significantly impact performance.
  • "Samuidayone" wrote:
    What I can tell you, except for the bottom, there has been no texture used.


    The texture I was referring to is the one that Unity renders to and passes to the Oculus SDK. This texture can still contain high-frequency patterns based on the lighting and coloring effects in your scene.