Low FPS on build, perfect FPS on editor

Hi,

I’m building a specific scene where I need to light a neutral environment (basically an empty living room) with a lot of spotlights that are moving.
I put a small picture showing the render I want, with point of lights moving on the wall.

I this scene, I have about 100 pixel spotlights in realtime, with bounce to 0 and shadow disabled.
These 100 pixel spotlights are moving during the scene, and so is the camera (oculus), however the room does not move.

I understand using that many pixel lights is very uncommon in Unity engine, but it actually works fine in the editor preview (play button).

On the other hand, in the built windows player, FPS are dropping drastically. I know some of the lighting effects unity is capable of are not rendered in editor preview.

Visual quality is very secondary for this application, and I would like to make the build work like the editor does.
Do you have any idea on what I should change in my settings to do so ?

Also, I tried different stuff to optimize but everything failed :

  • I tried using vertex lights, but the wall I use is a Unity cube of one vertex (I think) per face, and therefore it is just gloablly lit instead of being lit on a spot
  • I tried changing shaders between the collection we have in Unity, but none seems to fix the problem
  • I tried baking mode instead of realtime, but the problem stays the same
  • I tried precomputed realtime, didn’t work
  • Using a cinema4d homemade sphere with holes in it and only one light, but the light either did not go through the sphere at all or completely

I’m out of ideas now, that’s why I turn to you. I’m very noob to unity, but I think what I could do is :

  • Add vertices to cube to use vertex instead of pixel, but how to do that with unity generated cubes ?
  • Reduce quality settings to get the build to similar level of the editor but I don’t know either how to do it :frowning:

Thank you for your help,
Lucas

2618657--183801--Capture d’écran 2016-05-02 à 11.41.08.png

Hi lucas-quantum !

Try to change the rendering path for your camera (legacy deferred should work for you).
You can get more informations here : Unity - Manual: Rendering paths in the Built-in Render Pipeline

See you!
Palette

Hi Palette75,

Thank your for your answer.

It helps, since I get less lags, but the rendering is still not smooth (there is a trail behind light dots when I move my head).

In the meantime I tried :

  • Quality settings to minimum but same amount of lag
  • Detexturing everything but same amount of lag
  • Replacing environment by a neutral grey (no textured) cube but same amount of lag

All of this, and in the editor it is very smooth and perferct ! I feel like I have tried every single setting in lighting, and yet I can’t get my player to run as smooth as the editor.

Does anyone know the difference between editor and player ?

Lucas

I would suggest making a debug build and use the profiler to figure out what is taking all the time in the build version.