Bug - Masked unlit material doesn't render

OP: [Gear VR] Masked unlit material doesn't work - Rendering - Unreal Engine Forums

I am trying to implement fade in/out effect and I figured since post process is a no-go for Gear VR, I could use something as arcane as Wolf3D’s fade screen effect.

Basically it’s just a low poly UV mapped inverted hemisphere, parented to the camera:

It works in the Editor, but doesn’t work on the device.

Here is what it looks like in the Editor and material setup:

wolf3d_screen_fade1.png
Full image: http://s21.postimg.org/hivq2kb3p/wolf3d_screen_fade1.png

wolf3d_screen_fade2.png
Full image: http://s22.postimg.org/4gln6o4vj/wolf3d_screen_fade2.png

When running on the device, red noise is absent.

Bumping it up.

Can anyone confirm?

P.S. If I change “Masked” to “Additive”, it works on the device and ES2 preview.

I was able to replicate the bug on the same project. I found a “workaround” by removing the hemisphere from the FirstPersonCharacter blueprint’s hierarchy and manually placing it in the scene where the camera spawns, but this obviously doesn’t follow the camera when it moves or rotates. This seems to move the bug away from masked layers rendering and towards GearVR apps not instanciating the children of FirstPersonCharacter blueprints.

firstpersoncharacter.PNG

(this is what the FirstPersonCharacter blueprint hierarchy looks like, view_fade_hemisphere being the masked inverted hemisphere. placing it outside of this blueprint shows it, leaving it in doesn’t on the device but does on mobile preview).

ue release 4.11.1, masked material , s7 edge + gear vr,crashed.
I tested many times to find out where cause the crash. then found out it’s masked material.

Hey liumingod - could you post a bug report for that and post the link here? https://answers.unrealengine.com/spaces/11/bugs-and-crashes.html

Also which model of the S7 Edge do you have? I’m also noticing some strange crashes only on some S7 Edge models and wondering if it’s caused by masked materials or not as it appears to be working on my device - do you have a simple masked material project example where I could try to reproduce on mine?

Just Simple masked materials can cause crash. for example, a const scalar link to opacity mask can make this . and if I turn off vr mainfest or disable masked materials ,it won’t crash. ES2 Preview looks all good.

Forget to post S7 edge info
04-15 14:06:23.742 5081 5104 D UE4 : [2016.04.15-06.06.23:757] 0]LogAndroid: Default profile: Android_Default

04-15 14:06:23.742 5081 5104 D UE4 : [2016.04.15-06.06.23:757] 0]LogAndroid: GpuFamily: Adreno ™ 530

04-15 14:06:23.742 5081 5104 D UE4 : [2016.04.15-06.06.23:757] 0]LogAndroid: GlVersion: OpenGL ES 3.1 V@145.0 (GIT@I241dab1ec4)

04-15 14:06:23.742 5081 5104 D UE4 : [2016.04.15-06.06.23:757] 0]LogAndroid: AndroidVersion: 6.0.1

04-15 14:06:23.742 5081 5104 D UE4 : [2016.04.15-06.06.23:758] 0]LogAndroid: DeviceMake: samsung

04-15 14:06:23.752 5081 5104 D UE4 : [2016.04.15-06.06.23:758] 0]LogAndroid: DeviceModel: SM-G9350

04-15 14:06:23.752 5081 5104 D UE4 : [2016.04.15-06.06.23:758] 0]LogAndroid: Selected Device Profile: [Android_Adreno5xx]

04-15 14:06:23.752 5081 5104 D UE4 : [2016.04.15-06.06.23:758] 0]LogInit: Applying CVar settings loaded from the selected device profile: [Android_Adreno5xx]

04-15 14:06:23.752 5081 5104 D UE4 : [2016.04.15-06.06.23:758] 0]LogInit: Setting Device Profile CVar: [r.BloomQuality:1]]

04-15 14:06:23.752 5081 5104 D UE4 : [2016.04.15-06.06.23:758] 0]LogInit: Setting Device Profile CVar: [r.DepthOfFieldQuality:1]]

04-15 14:06:23.752 5081 5104 D UE4 : [2016.04.15-06.06.23:758] 0]LogInit: Setting Device Profile CVar: [r.LightShaftQuality:1]]

04-15 14:06:23.752 5081 5104 D UE4 : [2016.04.15-06.06.23:759] 0]LogInit: Setting Device Profile CVar: [r.RefractionQuality:1]]

04-15 14:06:23.752 5081 5104 D UE4 : [2016.04.15-06.06.23:759] 0]LogInit: Setting Device Profile CVar: [r.MobileContentScaleFactor:1.0]]

04-15 14:06:23.752 5081 5104 D UE4 : [2016.04.15-06.06.23:759] 0]LogInit: Setting Device Profile CVar: [r.ShadowQuality:2]]

and crash report this

04-15 16:15:23.792 26052 26158 I VrApi : CPU levels [0, 3]

04-15 16:15:23.792 26052 26158 I VrApi : GPU levels [0, 3]

04-15 16:15:23.792 26052 26158 D VrApi : setSystemPerformance cpu: 2 gpu: 3

04-15 16:15:23.812 26052 26158 D VrApi : SetVrClocks: {CPU CLOCK, GPU CLOCK, POWERSAVE CPU CLOCK, POWERSAVE GPU CLOCK}

04-15 16:15:23.812 26052 26158 D VrApi : -> / 1113600

04-15 16:15:23.812 26052 26158 D VrApi : -> / 401800000

04-15 16:15:23.812 26052 26158 D VrApi : -> / 940800

04-15 16:15:23.812 26052 26158 D VrApi : -> / 214000000

04-15 16:15:23.812 26052 26158 I VrApi : CPU Clock = 1113 MHz

04-15 16:15:23.812 26052 26158 I VrApi : GPU Clock = 401 MHz

04-15 16:15:23.812 26052 26158 W VrApi : out of order frame index (prev = 0, new = 3)

04-15 16:15:23.822 26052 26161 D VrApi : setSchedFifoStatic tid:26078 pto:1

04-15 16:15:23.832 26052 26161 D VrApi : VRManager set thread priority to 1

04-15 16:15:23.832 26052 26161 D VrApi : setSchedFifoStatic tid:26158 pto:1

04-15 16:15:23.842 26052 26161 D VrApi : VRManager set thread priority to 1

04-15 16:15:23.952 26052 26161 D UE4 : Signal 11 caught!

You really should post all that into AnswerHub as bug report. That’s what Epic requires us all to do.

I am on S6 with Android 6.0.1 and it works for me with UE 4.11.2

It would be great if you could add an example project and many details as possible about your device to that answerhub bug report.

(I’m going to double check this) it’s working on my S7 Edge (SM-G935F, 6.0.1, Oculus System Activities version: 1.0.2.4) however I can see with my released games there are a few S7 Edge users having crashes and I’m unable to reproduce or find the cause which leads me to believe it’s a specific device / software compatibility related problem. -> perhaps the exact issue you found as I do have some masked materials!

PS: here is a dead simple project with a masked material that works fine on my S7 Edge:
http://en.file-upload.net/download-11501905/maskedMaterialTest.zip.html
(download link is the smaller blue download button don’t get tricked by the ad :wink: )
Could you confirm you get a crash on it? Thanks!

OK I tested your demo, it carshed on my s7 edge.
I modify your materal like this, because the masked material (I guess indeed a discard instruction in shader.)must be effective to make crash.

@liumingod: Did you post that on AnswerHub (with image and crash report) ?

Do you have HDR on? If so, turn it off, turn off all post process effects.

yes ,all off . Report here ,but no one response now. ue release 4.11.1, material masked, s7 edge + gear vr,crashed. - Rendering - Unreal Engine Forums

Just tried this on my S7 edge and no crash - I’ll add the details of my device to your bug report - liumingod please check your PM would be great if you could test an apk for me! :slight_smile:

PS: I had masked material on the sphere in the charPawn blueprint - did that one work ok for you?

Read this… i have regretfully a note-5 bought a few months too soon so Vulkan has to wait for me but the article above solved alot for me…

Done, tested worked… note-5 on GearVR… this also solves the scene pop on load and has a great fade… it’s all in the link above.

As for disabling depth on say a widget HUD that sits out beyond your characters collision capsule is possible… it does fool you though by not acting properly on PC but works once in GearVR and there’s two ways to commit to it. I took the easier way. If interested I’ll post info and link to what I found that helped.

hope this helps ya some…