- Home /
Question by
sewy · Jun 12, 2018 at 09:43 AM ·
editorlightingeditor-scriptinglightprobes
LightProbe comparsion
Hello,
I'm making editor script for automatic placing LightProbes. I place them in grid, bake the lighting and then I am comparing their Spherical Harmonics indexes, if they are within treshold. Those with similar values will be merged.
.
Problem is, every index can be in different numerical order, so it's a bit problem (I dont want to manualy add 27 thresholds, because I'm not sure, if the numerical orders are consistent for the specific index).
.
Any idea how to do it? Not much into reading mathematics papers (https://docs.unity3d.com/Manual/LightProbes-TechnicalInformation.html)
.
EDIT: kinda made it via percentage similarity, but still looking for more elegant and SH mathematical solution.
Comment