Search Unity

2019.3 LightProbeGroup.probePositions read only

Discussion in 'Global Illumination' started by alia_0, Aug 13, 2019.

  1. alia_0

    alia_0

    Joined:
    Nov 28, 2012
    Posts:
    14
    Greetings!

    I am investigating implementing DDGI (https://morgan3d.github.io/articles/2019-04-01-ddgi/index.html) and hit what seems to be a bit of a snag. I am attempting to place probes at run time since my scene is dynamically generated from voxels. Currently I can only update the LightProbeGroup.probePositions while running in the editor. I was wondering if this could be changed or if not if anyone has some ideas for workarounds.

    Cheers,

    Alia

    Code (CSharp):
    1.  
    2.  
    3.         LightProbeGroup lpg = go.AddComponent<LightProbeGroup>();
    4.         lpg.probePositions = probe_positions;      
    5.  
    6. 'LightProbeGroup.probePositions' cannot be assigned to -- it is read only
     
  2. thefranke

    thefranke

    Unity Technologies

    Joined:
    Jun 20, 2015
    Posts:
    90
    Hey alia_0,

    the reason the probe positions are read only is because they are baked. If you want to implement DDGI or any other dynamic probe system, I'd suggest simply writing a new probe component with which to place these groups. DDGI is also volume based, so the LightProbeGroup with it's ability to place probes arbitrarily is probably not a good fit anyway.

    Cheers
     
    alia_0 likes this.
  3. alia_0

    alia_0

    Joined:
    Nov 28, 2012
    Posts:
    14
    Ya, for each chunk I was just going to place them in a regular grid, skipping full/partially full voxels. I guess I don't really need the LightProbeGroup at all if i can just set the positions and pass them to CalculateInterpolatedLightAndOcclusionProbes

    Thanks,

    A.