Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

moire effect / interference pattern

SamuidayoneSamuidayone Posts: 7
edited February 2016 in Unity Development
Hi everyone,

just a little info on 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 already posted this in PC development before, because I thought, my problem a hardware one. I'd like to hear you Unity developers this time. So I was creating 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


Update:

Last weekend, the Unity developer tried different things:

- deactivating edge detection
- shadow settings (type, angle, bias)
- renderer settings
- camera settings
- light settings
- bake (light, occlusion)
- material settings

But the flickering stays. The effect is alreay visible on screen, not in the glasses only. THe developer is trying geometry export/import settings

Comments

  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    It looks like you're seeing pixellation. There are 4 settings that will help here.

    1) UnityEngine.VR.VRSettings.renderScale. This refers to the minimum number of eye buffer texels Unity renders each screen pixel on the Rift. In the video, it looks like your app may be setting this to a low value to save performance. Try setting it to 1. You may have to use simpler shaders or smaller textures (or get a faster GPU) to hit frame rate after increasing the render scale.

    2) If you are using the Unity's deferred renderer, switch to the forward renderer. The deferred renderer doesn't support proper multisample antialiasing (MSAA), which is important for VR. It also costs more pixel and texture bandwidth per frame, so simply switching to forward may help you hit frame rate with a higher render scale.

    3) Enable 4x MSAA. Again, this will only work with forward rendering. MSAA is very accurate for VR and will result in less "crawling" and inter-eye disparity than techniques like FXAA. It also costs less performance than a comparable increase in render scale.

    4) Use linear lighting instead of gamma lighting. Linear lighting uses a color space that preserves more detail in the ranges that your eyes are the most sensitive to. In many cases, this noticeably (and cheaply) decreases "crawling" effects.
  • SvenVikingSvenViking Posts: 298
    Art3mis
    Use linear lighting instead of gamma lighting
    Does this apply to Gear VR also, or is Gamma lighting still recommended there? Thanks.
    Scorched Battalion - VR Jam edition available for Gear VR and DK2 (Win/Mac/Linux)
    Jungle Juice
    Sven Co-op
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    All 4 settings also apply to Gear VR. However, 2X MSAA is almost free on Gear VR and you may not want to want to spend the extra bandwidth to use 4X MSAA.
  • scottoculusscottoculus Posts: 35
    Brain Burst
    So does Unity now allow changing to higher eye buffers than 1k that Unity and Oculus default to instead of full display resolution? I know for 3D rendering Oculus is concerned about the added power/heat issues with rendering higher resolutions but for still image displays and other non-GPU heavy tasks this creates lower resolutions and more moire issues.
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    renderScale is actually a multiplier for the "recommended" eye buffer resolution. On Rift, the recommended resolution results in 1 texel per display pixel. On Gear VR, it actually has a different behavior: it multiplies 1024x1024. So a RenderScale of 0.7 would give 716x716 - half the total pixels of 1.0.
    So does Unity now allow changing to higher eye buffers than 1k that Unity and Oculus default to instead of full display resolution?
    Yes, on Gear VR, you can set renderScale above 1.0 to get a higher resolution. Warning: the performance cost for scales above 1.0 is very high and scales quadratically with the renderScale.
  • SvenVikingSvenViking Posts: 298
    Art3mis
    vrdaveb wrote:
    SvenViking wrote:
    Use linear lighting instead of gamma lighting
    Does this apply to Gear VR also, or is Gamma lighting still recommended there? Thanks.
    All 4 settings also apply to Gear VR. However, 2X MSAA is almost free on Gear VR and you may not want to want to spend the extra bandwidth to use 4X MSAA.
    I'd thought this had changed, for some reason, but it looks like Linear lighting is still unavailable on Android.
    Scorched Battalion - VR Jam edition available for Gear VR and DK2 (Win/Mac/Linux)
    Jungle Juice
    Sven Co-op
  • Woah guys,

    thanks a lot for this feedback! I will read through this, but more importantly, I will show this to the Unity developer of our simulation and cross fingers.

    Cheerio,
    Sam
Sign In or Register to comment.