Search Unity

Question Probe Volumes for Additive Levels

Discussion in 'Graphics Dev Blitz Day 2023 - Q&A' started by pbritton, May 24, 2023.

  1. pbritton

    pbritton

    Joined:
    Nov 14, 2016
    Posts:
    160
    I am currently using probe volumes as the GI solution. However, the levels are loaded as additive. What is the recommended solution for handling the lighting when only one probe volume / set can be loaded at a time? Should this be managed by a script or is there a built-in solution?
     
    M_MG_S, mandisaw and ModLunar like this.
  2. ModLunar

    ModLunar

    Joined:
    Oct 16, 2016
    Posts:
    374
    I'm curious as well, bump
     
  3. maximeg_unity

    maximeg_unity

    Unity Technologies

    Joined:
    Apr 13, 2022
    Posts:
    9
    Hey,
    You can choose Baking Set (instead of Single Scene) as a Baking Mode in the Probe Volumes panel. This way you can add multiple scenes in your baking set and bake them together. With this setup you should be able to bake all your scenes that are additively loaded in a single bake and into a single APV structure.
    Note that only one baking set can be loaded at the same time (that's why it should contain all the scenes that you want to load together), and that a scene can only belong to a single baking set.
    Hope this helps !
     
  4. pbritton

    pbritton

    Joined:
    Nov 14, 2016
    Posts:
    160
    Hi Maximeg,
    I have been doing that but unfortunately Unity hard crashes and exits. I am using 2022.2.20f1. If I bake individual scenes it succeeds but they don't hold because it wasn't baked as a set and would not show during runtime. I am baking 19 scenes and that is about 10% of the all scenes that would be used in the game. The failure occurs when baking with CPU and GPU.
     
  5. pbritton

    pbritton

    Joined:
    Nov 14, 2016
    Posts:
    160
    There was an issue with my HDRP package that was causing Unity to crash. I deleted the HDRP packages from the Package Cache and it has resolved the crashing.
     
    M_MG_S and mandisaw like this.
  6. maximeg_unity

    maximeg_unity

    Unity Technologies

    Joined:
    Apr 13, 2022
    Posts:
    9
    Happy to hear the issue was solved !
     
  7. ModLunar

    ModLunar

    Joined:
    Oct 16, 2016
    Posts:
    374
    I'm curious actually if there's a workflow for..

    Say I released a game containing 20 different scenes in total, including main menu, levels, etc.
    For simplicity of an example, say I have 1 Baking Set for the 20 scenes.

    While the game is already released on Steam (or wherever), I want to expand the game in monthly updates.
    I add 3 new levels and now have a total of 23 scenes.
    Would I have to rebake all 23 scenes' lighting in 1 Baking Set?


    I guess there's no way around that cause the lighting of all of the scenes can impact each other, but just wanted to ask if there was any other workflow for adding scenes/levels additively to an existing game I'm working on.
    Thanks!
     
  8. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    270
    The solution here would be to have multple baking sets in case some scenes are not meant to be loaded together at the same time.
    Like the main menu scene could be in it's own baking set i suppose.
    If you have only one baking set then you have no choice but to rebake everything
     
    ModLunar likes this.
  9. ModLunar

    ModLunar

    Joined:
    Oct 16, 2016
    Posts:
    374
    Gotcha, thanks! This is helpful to know before I get started :)