Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

frame rate drops by GI (realtime & baked)

Discussion in 'Global Illumination' started by Rosenbergers, Apr 5, 2015.

  1. Rosenbergers

    Rosenbergers

    Joined:
    Mar 27, 2015
    Posts:
    1
    I get very bad frame rates when using GI - what's the trick to fix this?
     
  2. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    999
    You shouldn't. How bad is 'very bad'? V Sync is usually the cause of my framerate issues. Have you used the profiler?
     
  3. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    In the project I'm working on my framerate is fine according to all stats I have access to (Fraps, the stats window and the profiler all claim I have hundreds of frames per second), but it's still choppy with realtime GI if I rotate my light. If I stop rotating the light the choppiness also stop. Something about constantly updating the bounced light seems to be causing choppiness. I made a note about it here:
    http://forum.unity3d.com/threads/apartment-architectural-visualization.314694/#post-2055151

    I haven't found a solution yet.

    As for baked GI I have no idea. I would expect that to be virtually free. Isn't it just a lightmap?
     
  4. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    What value is the CPU usage set to for Precomputed Realtime GI? Unlimited or Lowest?

    Have you tried looking at the profiler?

    Yes, Baked GI is static lightmaps and will take up some memory. Non directional is cheap in the shader, directional is less chap and directional specular is kinda expensive because it does an extra BRDF evaluation.
     
  5. owen_sixense

    owen_sixense

    Joined:
    Jan 7, 2014
    Posts:
    3
    I am seeing the same thing even with pretty simple scenes. It manifests as extreme variance in GPU performance, where every few frames there is a big consistent spike, with no spikes at all in the CPU profiler. This suggests to me that there is some very severe GPU-CPU sync point, bad enough that it is completely unusable for continuously moving light sources.

    Perhaps Unity is not double buffering the GI data on the GPU? It would also be nice if we had scripting control over when the GI gets updated, like with reflection probes, then we could avoid doing other expensive infrequent rendering tasks in the same frame, or spread the GPU upload over several frames. Those sorts of optimizations are super critical when doing something this expensive and complicated.
     
  6. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Hi, it is hard to say what is causing the spike without digging into your project. Would it be possible for you to share the scene with us? You could create a bug report and post the case number here.