Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity Light Probe Coefficients == 0?

Discussion in 'Global Illumination' started by SuperUltraHyper, Mar 22, 2016.

  1. SuperUltraHyper

    SuperUltraHyper

    Joined:
    Sep 7, 2015
    Posts:
    112
    I am trying to save light probe data to a file.

    However, nothing is [Serializable] (LightProbes or ShericalHarmonicsL2) so I am attempting to do it manually)

    The problem is that all of my Unity Light Probe Coefficients print as 0?

    Any idea what I am doing wrong?

    Code (CSharp):
    1. for(int c =0; c <LightmapSettings.lightProbes.count; c++)
    2.      {for(int i =0; i <3; i++)
    3.      {for(int j =0; j <9; j++)
    4.      {Debug.Log(c +","+ i +","+ j +" = "+LightmapSettings.lightProbes.bakedProbes[c][i, j]);
    5. }}}
     
  2. SuperUltraHyper

    SuperUltraHyper

    Joined:
    Sep 7, 2015
    Posts:
    112