Search Unity

Realtime lights / snowfall - performance

Discussion in 'Editor & General Support' started by kai_226, Apr 30, 2019.

  1. kai_226

    kai_226

    Joined:
    Jul 6, 2017
    Posts:
    53
    Hey everyone,

    I am developing a racing game and am currently facing performance issues on one of my tracks. The issues come due to the setup, basically two things:
    - Falling snow [pretty dense] that collides with the track and landscape
    - Many realtime lights in a small space

    The track has tunnels made of glass and stone so I need the snow to collide with the environment. What I already did was dividing the snow particle system into overlapping pieces with collision set to off. Only when the player is underneath the certain "tile", I enable collision [using triggers]. This was a big improvement for the performance, however there is for example a long tunnel and the player would not reach the next tile before exiting the tunnel, making snow from the next tile without collision enabled fall through the ceiling of the tunnel, what you can see ahead.
    Any ideas for another approach or optimization?

    The next thing is realtime lights. I have many lights on the side of the road in one section [around 70] that also throw shadows. I really don't know how I could improve that. Occlusion culling won't really work as there is almost nothing that occludes the view in that section. Baking the light seems not to be an option as I like to achieve that "shadow continuously overtaking the car" effect [like when passing by lights on the side of the road, your own shadow constantly overtakes you].
    Of course I played with the shadow settings but could not really achieve a big performance improvement.

    I googled around but except for the solutions mentioned above, which don't seem to fit for my desires, I didn't really find anything helpful. But maybe I oversee something...

    Thanks for any ideas/feedback/suggestions