Performance issues

I am not sure what I am doing wrong, but I can’t hot 60 fps on Gear VR using stripped down FPS template. I am hitting 57-58 fps and 17+ ms render time.

No post process effects (unless fog counts as one, but for example in Unity it doesn’t affect fps), static light, medium quality lighting/shadows, LDR, all rough materials, no view weapon model drawing, etc. Everything that can be turned off to aid rendering/processing is off, there is nowhere else to go more basic than that. The only thing I can think of is skies material, but I doubt it creates such an impact on performance. And yet, can’t have 60 fps stable.

And that is just a basic scene, no spatialized sound, no animated characters and no AI.

Tbh I don’t believe stock UE4 as it’s being provided by Epic (e.g. download via launcher) is nowhere near suitable engine for mobile VR. Unless it has to be all unlit, no shadows, no spatialized sound, no animated characters, no AI game / app. Which isn’t VR I want to offer or experience.

Epic, please do something about mobile VR and please provide templates / examples that give 60 fps stable and isn’t just an empty room with unlit materials!!!

You seem to have considered all the performance issues, it’s strange that you cannot get 60FPS. It works totally fine for me.

Here are some more things you could check/double check.

-Energy saving mode on the device off
-Only materials with “fully rough” enabled, no normal maps. Also on skeletal meshes.
-No translucent materials
-No stationary/moveable directional light

Try setting the Android Device profile to this:

Also you could try the game in an empty level, with just a basic ground that uses a simple color without any textures or the skybox. And just a static skylight.

As for fog, you would need to fake it. Either by using a spherical mesh around the level with a scenedepth fog material and depth test disabled. Or using pixeldepth(see cameradepthfade function) for all your level materials to create a simple distance fog. The second method is ALOT cheaper, especially if you use it in the vertex shader.

While FPS template has no normal maps on the world, why do you want VR world without normal maps?! O.o

Power saving is always off on my phone. I have 3 light sources, so to speak, Direct light (static), LightmassImportanceVolume and Skylight (static).

I have no idea about fake fogs, sorry :confused: Doesn’t UE4 have something out of the box or is it something to mess with manually ? (I just starting with UE4 and since I don’t get to hit 60 fps on basic scene, I don’t really have motivation to mess with it deeper, yet) Unity has a checkbox for “fog” and whatever kind of fog it is, it doesn’t affect performance.

How do I get to this panel that is on your screenshot ?


So I removed sky material and made it just simple color - no effect on fps. I am willing to bet it’s some rendering issue, just like Unity used to have something similar.

Normal maps don’t have a real depth effect in VR. Try to make your test level as simple as possible. Take out as much as you can. Just playerstart and static skylight.
But usually using the FPS template should already work out of the box with 60 FPS. The counter usually shows 59-60, it’s never constant, though.

You get the panel with Window -> Developer Tools -> Device Profiles -> Android. There you can add those variables.

To reply to another thread from you: Dynamic shadows from directional lights only work with HDR enabled, unfortunately. I hope there is a fix for this in 4.11.

Getting fog on mobile with LDR set up for UE4 is indeed a bit more complicated.
This is a material for very simple vertex fog. All your materials would need this set up:


Thanks for the tips!

As for normal maps, while the don’t add actual depth, as if let’s say tessellation would, they are still useful for small details. There was an article somewhere about that.

This is what i learned from the VRJam.

The default template for first or third person are not optimized for Gear. For example: The sky as well as the shaders on the default fps template’s player arms/gun will make a impact on performance.

If you want a smooth project avoid reflections, transparency and optimize your models/levels so they make the least amount of draw calls.

Also don’t try to push it to it’s limit while barely maintaining a steady 60FPS. You can make some really beautiful things with this engine (as well as unity) however you’re just gonna overheat everyone’s phones.

As I mentioned, I removed sky material and replaced with simple color. I also made view weapon model not render. So all in all, it’s the simplest test case - no transparency/translucency, no fancy materials, super low polycount, baked lighting. So, it should perform at 100+ fps, but it doesn’t. Hell, Quake runs at 60 fps on Cardboard / GVR (powered by open source Darkplaces engine). Entire game, with physics and AI, and much higher polycount that FPS template test scene.

With the test case at hand, I am light years away from recommended complexity limits :confused:

That’s ok - if it’s a good looking / playing game or app, I (and many others) will add fan for cooling :slight_smile:

Did you delete the default sky entirely or did you modify it’s material?

Modified the material.

It seems like it has Blueprint on it, so I didn’t want to go down the rabbit hole, since I am not yet that familiar with UE4 and Blueprints.

If you’re just experimenting then I recommend deleting the skysphereblueprint and the atmosphericfog from your World Outliner box. I’m not sure which one of the two it actually is but one of them has a noticeable impact on performance.

Me personally I find the templates are best for learning and experimenting. For your actual official project I recommend starting with a blank slate and importing resources as needed.

Aye, I will try deleting those.

Btw, in Unity it’s easy to work from scratch - just import prefabs from Oculus Utils and you get yourself VR app / game working in a moment.

In UE4 I don’t see how it’s possible, since I’d have to set up first person character from scratch and it seems to be somewhat a pain :confused:

So, I deleted the fog, sky blueprints, and nothing changed. Still not hitting 60 fps.