Forum Discussion
motorsep
10 years agoStart Partner
[Gear VR] UE 4.12 is the worst build for mobile VR - massive performance issues out of nowhere
I hate to say it, but John Carmack was right when he recommended against using UE4 for Gear VR. While I couldn't have done what I did for my Gear VR app with Unity in the same time frame, I can never get it to perform well in all circumstances. Now I see why Gear VR apps/games are mostly done using Unity.
I narrowed down performance issue I had with 4.11.2 and it finally ran at stable fps no matter what. Now with 4.12.5 I am in the same pickle, except now there isn't any way to fix performance issues (at least I don't see how).
I don't have HISMCs or foliage in my level. The entire game logic is as simple as it can be - just doing 1 trace and revealing / hiding 1 actor base on trace hit results. Shader complexity is nowhere near to be complex (checked it with viewmode shadercomplexity when in ES2 preview), low number of drawcalls, low number of tris in the view.
When I look around and up in the sky, fps is stable. As soon as I look down to my "feet", fps drops significantly. There is absolutely no reason for it to do so!!!!
Here is a video with profiling results:
https://www.youtube.com/watch?v=uBBVrnAPuWA
I narrowed down performance issue I had with 4.11.2 and it finally ran at stable fps no matter what. Now with 4.12.5 I am in the same pickle, except now there isn't any way to fix performance issues (at least I don't see how).
I don't have HISMCs or foliage in my level. The entire game logic is as simple as it can be - just doing 1 trace and revealing / hiding 1 actor base on trace hit results. Shader complexity is nowhere near to be complex (checked it with viewmode shadercomplexity when in ES2 preview), low number of drawcalls, low number of tris in the view.
When I look around and up in the sky, fps is stable. As soon as I look down to my "feet", fps drops significantly. There is absolutely no reason for it to do so!!!!
Here is a video with profiling results:
https://www.youtube.com/watch?v=uBBVrnAPuWA
15 Replies
Replies have been turned off for this discussion
- motorsepStart Partner@vrdaveb @artyom17 @rpalandri would you happen to have an idea about what's happening ?
- eScapeExplorerIts the landscape, im having similar problems, Tried optimizing everything with minimal results, then removed one actor compiled, removed another one compiled...repeat. After a day of circular compiling agony only the landscape was left and i was still running low on hz, Started over, and this time i only removed the landscape, and i immediately gained a massive frame boost.
The landscape was the culprint. Optimized landscape LOD levels, compiled, looked fine in UE4, only to see landscape dissapear on GearVR. Changed LOD levels back compiled, still no landscape, Only way to get Landscape back was to copy a backup version over.
UE4 has some landscape problems on GearVR, setting sg.EffectsQuality too low, will also make it dissapear - motorsepStart Partner@eScape
I don't use Landscape at all. - eScapeExplorerLooks like a landscape in the video, is it a static mesh? Whatever it is you are standing on,you see a framedrop when you look down. So whatever you are standing on is probably the problem, or you have some serious overdraw
- motorsepStart Partner
eScape said:
Looks like a landscape in the video, is it a static mesh? Whatever it is you are standing on,you see a framedrop when you look down. So whatever you are standing on is probably the problem, or you have some serious overdraw
It's a static mesh. There is no overdraw when I look down. There is nothing behind the mesh (even if there are something, the mesh is an occluder and it's opaque, so anything behind it would be culled). It's pretty clear from the video that when I look down, I only see 1 mesh. When I look around, not only the mesh I stand on in the view, but in addition everything else around me is in the view.
I am also showing Profiling results, and it's all CPU stalls that cause performance drop. I don't understand why it's happening. It's most likely engine's bug. - eScapeExplorerCheck if you are GPU bound, on the device, via console command stat unittime. If you are use ProfileGPU in UE4(does not run on device AFAIK) instead of CPU profiler. Im no expert, just trying to pass my gained experience after weeks of frustration ;-)
- motorsepStart PartnerI use "stat startfile/stopfile" to record profiling results and then play them in the Editor. That's the only way to profile directly in the device.
Do you mean "stat Unit" ? How would I know if I am GPU bound ? (does it show discretely, like in red color or something? I haven't used this stat before)
Btw, I recall someone told me GPU profiling isn't possible on Gear VR (or maybe I am mixing it up with something else) - eScapeExplorerYep "stat unit". On GearVR it does not show GPU, it shows Frame,Game and Draw. If Frame is higher than Game and Draw, then Frame is showing the "hidden" GPU value. -So if the Frame value is highest, you are GPU bound. I havent found a way to GPU profile directly on GearVR, but using the GPU profiler in the editor, will give you some kind of idea of where the GPU spends its time
- motorsepStart PartnerOoh, this gets even better :/ I marked piece of the terrain on which player teleports after spawn as not to be rendered and placed BSP cube under teleport destination. Player spawned, teleported as usual and landed on that BSP cube. Looking down did not drop fps at all. So logically something is wrong with the piece of the terrain, right?Next thing I did was marking terrain as to be rendered, as by default, but I also left BSP cube in place. It happened that cube was raised above the terrain a bit. So when played got teleported on top of the BSP cube, it ended up being above the terrain. Yet again, looking down did not drop fps !!!! However, as soon as I jumped off the cube and onto the terrain, while looking down, fps dropped.So if I am standing right on top of the terrain, and looking down - I experience fps drop. If I am standing on something above the terrain (and least half of player's height, but the higher the better) and looking down - there is no performance drop.Very very odd !!!
- motorsepStart PartnerNarrowed it down!This is my terrain's original material setup which yields performance issues when view distance from cam to terrain is short:
full: https://s4.postimg.io/xq632ymp7/ue4_gearvr_performance_bad.pngand this is modified setup that makes performance issues go away:
full: https://s3.postimg.io/cd1e34x7l/ue4_gearvr_performance_good.png
P.S. Before you ask why I have such a fancy normal map setup - https://answers.unrealengine.com/questions/466152/broken-lightmaps-when-building-static-lighting-wit.html
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 5 years ago