Low FPS although scene is almost empty Gear VR

Hi guys,
My scene contains a 100x600x100 terrain with a height map resolution of 129. The only update function I have is on my player object and it controls its movement. However, my average FPS still seems to hover around 30. I’m running on a Note 5 and using the grass texture from this package on my terrain. Other than that the scene is empty. Here’s a screenshot of the profiler:


Let me know what other information/details you guys need and I’ll be happy to include them.

You can’t use hardly any per-pixel lighting effects like dynamic lights. Bake the lighting and remove per pixel effects like reflection or bump maps and you’ll have 60 fps.

As always, thanks for the high quality content. I watched a few of your videos, including the one you posted here, and I’ve implemented your settings recommendations in my scene. I haven’t deployed the game yet so I’ll let you know the stats when I do. In the meantime, I have some questions that came up while watching your videos in regards to how the lighting settings will affect the game I have in mind. I’ll just list them out below for clarity.

  1. With baked lighting how will non-static objects that need to move around in my scene be lit?
  2. Would I be able to implement a day/night cycle with these settings?
  3. Would baked lighting work for a terrain whose height map gets created when the game starts or, alternatively, planes that are only initialized when the game starts? Or would these objects have to be created and changed in the editor and the lighting baked before running the game?

That’s a very large topic but in general as the name implies baked lighting is precomputed ahead of time so things are quick in game. Since it is precomputed it’s not best for things that change after that (things that move around, lighting conditions changing, procedural generation, etc.). All 3 of your questions indicate some type of change after the baking. There is a reason why on mobile VR most games look sci-fi, cartoony, etc.

This is not to say you couldn’t fake it with a lot of tricks but it isn’t ever going to get to the point like global illumination on desktop unless VR and phones get a lot more powerful. These tricks include having sets of lights one for the baked and the other for moving that are isolated on which gameobjects they effect. For things like shadows you would fake it with shadow projectors. It’s a lot of trial and error. Depending on the complexity of your game, you might be able to hit a framerate target with a few tricks if it’s only a few moving objects but the only way to know is to profile often.

2 Likes
  1. You can use 'unlit shaders on moving objects and fake a shadow with a ‘blob’ under the character.

  2. No, day night not really possible unless you have 2 scenes and bakes 1 day and 1 night scene.

  3. Terrain generated at runtime is not baked.

As in my video, you can use legacy vertex lit rendering path to render dynamic lighting on vertices only, not pixels, and that works for dynamic lights on mobile vr.

1 Like

In the video you linked here you use Mobile/Unlit for the sky dome. Or are you referring to something else. In the following videos in the series you use Unlit/Color on the brown InteractableCube, Legacy Shaders/Diffuse on the robber and Standard shaders on the weapons. Do these objects get dynamic lighting that way?

In other news, I’m no longer procedurally generating my terrain and I’m using Mobile/VertexLit on the material. Here are before and after images of the bake:
Before bake:


After bake:

My settings should be the same as yours from the video. What do you guys think?

Edit 1: I used a different grass texture on my terrain which seems to show the terrain’s unevenness much better after baking than the previous texture. Although I eventually ended up removing the unevenness all together so, for now at least, the terrain is flat. FPS now hovers more or less at 60 as was intended.

So this just leaves the first half of this post still open. If my questions make sense, that is :slight_smile: