Search Unity

How does the real time GI and IBL work ?

Discussion in 'Global Illumination' started by nasos_333, Feb 22, 2015.

  1. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,360
    I have a skybox shader and have set a sphere to constant bake and GI to realtime

    Do i still need to wait for the baking (lower right side has some progressing jobs) or i can have the skybox IBL right away when enter play mode ?

    The shadow on the sphere is black no matter the skybox color, all GI intensities are set to max

    Thanks for any insight on this
     
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    Unity has to do some pre computation for the level geometry so that the real-time light calculations are reasonable fast.
    If you want the GI to work you have to waiting until the baking is finished.
     
  3. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,360
    I see, thanks.

    Do these calcs have to be done again if an item changes for the whole scene ? Or are done once and the info is saved in the scene file ?
     
  4. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    Normally unity should only rebacke if something that is effecting the backing has changed. (I cant test it i do not have unity5)
    If you do not like the baking process running all the time you can change the bake mode to manual (i guess that what its called) and only compute it once you like to see the changes.
     
  5. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,360
    Thanks, i will check that option since it is extremely slow in my laptop even for a very simple scene.
     
  6. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,360

    Sky Master shader on skybox gives GI that changes in real time, before process has finished

    I have tested the system a lot and seems it moves very slowly (on my old laptop), though i can see results even before "bake indirect" finishes.

    "Bake indirect" seems to be stuck at 12/15, is that a possible bug and the process has finished ? Since i can indeed see the GI update in real time when i run Sky Master new mode
     
  7. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    13,360
    Stuck point shown in bottom right


    I found a way to work around the stuck in Indirect lighting calculation issue, for anyone insterested.

    I needed to create a video and the fact that it never left this calculation created spikes that stopped the demo. So the solution was to lower the priority of the two processes unity creates in the task manager for the calculations. After that the video was created smoothly as expected and the GI appeared ok. I could also use it by killing the processes altogether.

    My guess is that the GI calculations are done and for some reason it does not exit the calculation, but i cant be sure.

    Here is the video showing the GI, seems to work nice even though it had not finished the indirect light calcs (or appeared to have not finished) and is very smooth.

     
    Last edited: Feb 26, 2015