cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved] Weird flickering with Avatars SDK mesh

hyperion337
Explorer
Just started messing with the Avatar SDK and I'm getting weird mesh flickering. Check out the gif. What am I screwing up?

rvjhuwnz12dx.gif
35 REPLIES 35

hyperion337
Explorer
Using Oculus Utilities 1.8, Oculus SDK 1.8 & Unity 5.4.1p1

hyperion337
Explorer
Think I worked it out. I didn't remove the OvrTouch package before importing OvrAvatars.

Nope that didn't help.

Anonymous
Not applicable
That looks like z-fighting with the depth prepass used to make the hands appear self-occluding. What kind of graphics card do you have? If we have one handy, I can try to reproduce.

hyperion337
Explorer
I'm using a Nvidia 980. I found that if I put that shader on other meshes it has the same problem, so definitely seems like that self occluding shader is messed up somehow.

Also, I just confirmed that it doesn't happen when I load that avatars SDK into a fresh Unity project, so something in our project must be conflicting.

Anonymous
Not applicable
Is there any chance you're doing anything to adjust the resolution of the depth buffer in your render scene?

One thing you can try is biasing the depth test in the avatar surface shaders to try to cover precision issues. If you go into AvatarSurfaceShaderPBS and AvatarSurfaceShaderSelfOccluding and add a line like:
Offset -0.1, -1
before CGPROGRAM, you may be able to offset any precision issues. (Full documentation on shader depth test offsets here: https://docs.unity3d.com/Manual/SL-CullAndDepth.html )

hyperion337
Explorer
Strangely it doesn't happen in our master scene, only the example scenes, so this isn't a blocking problem for us. Will try out that fix tomorrow just to see if that's the cause.

Sondyr
Honored Guest
Did you ever figure out the cause or solution to this? I'm having the same problem. 

Digibix
Protege
I fixed a problem similar to that by NOT using the Single Pass Stereo (Unity 5.4) or by using the Stereo Rendering Mode: Multipass (Unity 5.5) on the Players Settings....

Its seems that the Avatar SDK shaders are not yet compatible with single pass stereo.... 

You can try on the editor by toogling the option when running the game on the editor.....

jlink
Explorer
I am having this issue currently as well, and can confirm that multi pass stereo rendering "fixes" it.

Edit: I just tried Noughtceratops'es fix, and while offset values of -0.1, -1 didn't work (it made the materials completely invisible), values of 0.1, 1 fix the flickering issue.