Search Unity

Which cubemap file is my auto-baked reflection probe using?

Discussion in 'Global Illumination' started by mgstauff, Aug 21, 2020.

  1. mgstauff

    mgstauff

    Joined:
    Sep 6, 2017
    Posts:
    59
    Unity 2018.4
    I have a reflection probe component on an object in my scene that's used by several mesh objects. It's currently set to type 'baked' and auto-generate is enabled in the scene lighting settings.

    How can I tell which cubemap (either auto-baked or manually baked) is in use by the probe?
    I know that for auto-baked cubemaps, they exist in the GI Cache. But I still don't know which file of the files in the GI cache is in use.

    And to set the cubemap for my probe, do I have to use a probe type of 'custom' for that?

    In particular I'm trying to export a scene from a project for use in another project, and it seems like the only thing not coming through in my asset export is the reflection probe's cubemap.

    Thanks for any advice!
     
    Last edited: Aug 21, 2020
  2. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    328
    Hey there,
    Here's a little trick to check which cubemap a reflection probe is using:
    1. Select the reflection probe in the scene hierarchy
    2. At the top of the inspector window, next to the the padlock icon, press the icon with the 3 dots, and select "Debug"
    3. A new field "Baked Texture" should show up at the bottom of the inspector with a reference to the baked texture.
    I attached some images showing what I mean. This won't work with auto-mode on though, as in that case the reflection probe cubemaps are stored in the Gi Cache, as you have observed. This means they can't be treated as assets, and can't be referenced as such.

    If you want to set a custom cubemap for a reflection probe, you should indeed use the custom probe type for that.
     

    Attached Files:

    HenryTownshend and L0tan like this.
  3. mgstauff

    mgstauff

    Joined:
    Sep 6, 2017
    Posts:
    59
    Thanks for this tip. It's helpful with maps outside the GI Cache for sure. So does that mean there's no way to find out which map is being used from the GI Cache? That's seems like a problem. What do people do in this case? Go thru the GI Cache maps manually and load them in to a type 'custom' reflection probe, and just visually compare? That worked ok in my case since there were so few maps in my GI Cache. But as a general solution it's weak.
     
  4. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    328
    I'm not aware of any method available to users. Auto-mode is mostly meant to be used for fast iteration while authoring the scene, not to produce final bakes.
     
  5. mgstauff

    mgstauff

    Joined:
    Sep 6, 2017
    Posts:
    59
    That's a helpful perspective. FWIW it would help to note this in the documentation.
     
    Pema-Malling likes this.