Closed huseyinsavran closed 3 years ago
I created two identical application with helloar java and helloar unity. These are printing the first 3 number of 27 coefficients. Both apps print similar numbers with the same real camera angle and device. So, Unity multiplies spherical harmonics numbers in native code.
In the 1.21.0 version of android arcore sdk, helloar.java sample uses sphericalharmonics. but it multiplies the sphericalharmonics values by these coeffcients: sphericalHarmonicFactors = { 0.282095f, -0.325735f, 0.325735f, -0.325735f, 0.273137f, -0.273137f, 0.078848f, -0.273137f, 0.136569f, }
This multiplication came from Filament renderer implementation. I couldn't understand the reason. Does unity arcore sdk do the same? I saw that the spherical harmonics are returned by native unity session code. I couldn't find c sources, so I don't figure out the algorithm of native session.