Dear all,
I have created a daylight coefficients file with the command:
rfluxmtx -parameters oct_file.oct < pointsfile.pts > illumfile
Additionally, I have created a sky matrix with the folowing command:
gendaymtx -parameters weather.wea > sky
and in order to create the irradiance file I use the command:
dctimestep illumfile < sky > irrfile
to achieve the multiplication between the daylight coefficient matrix and the sky matrix.
First, I would like to ask, is this RGB multiplication implemented this way?:
Cr[i][j]=Ar[i][0]*Br[0][j]+Ar[i][1]*Br[1][j]+…+Ar[i][N]*Br[N][j]
Cg[i][j]=Ag[i][0]*Bg[0][j]+Ag[i][1]*Bg[1][j]+…+Ag[i][N]*Bg[N][j]
Cb[i][j]=Ab[i][0]*Bb[0][j]+Ab[i][1]*Bb[1][j]+…+Ab[i][N]*Bb[N][j]
Those 2 arrays contain 3 components of RGB in each element, so the irradiance file will contain 3 components of RGB in each element too.
In order to reduce the size of the result file irradiance, I merge the RGB numbers to one number with the formula (0.265*R + 0.67 G + 0.065B) at this command:
rmtxop -parameters 0.265 0.67 0.065 - < irrfile > result
Now, what I am trying to do is to merge the RGB contents of the illumfile and the skyvector before the multiplication.
But if I use the same formula (0.265*R + 0.67 G + 0.065B) to each element of the daylight coefficient and the sky vector and then I multiplicate them, I do not have the same result as previous.
Any ideas for how I can achieve the same result?
Because if I had 3 components just in the illumfile and 1 component in the sky matrix It would work.
Do I have to apply another formula for the both of the files?
Thank you in advance!