Why sun-coefficent simulation cannot capture specular reflections

I’m modeling a building with a specular blinds (Fig.1) located in Shanghai, when I compared results derived from 5-phase with those derived from conventional raytrcing method, I found sometimes decrepency between both methods were very large beacause sometimes specular reflection cannot be captured by sun-coefficient simulation. Comparison results are shown as Fig.2 and Fig.3.
Fig.1 blinds

Fig.2 Luminance map obtained by sun-coefficient method (1/1 10:00 am)


Fig.3 Luminance map obtained by rpict ((1/1 10:00 am))

Below two figures (Fig.2 and Fig.3) showed that two high-intensity points presented in luminance map simulated by rpict, but only one high-intensity point presented in luminance map simulated by sun-coefficient.
The point on top is solar and the lower point is the specular reflection light in Fig.2, but the specular reflection light absented in Fig. 3.

Somtimes both methods can capture specular reflection light, as shown below:
Fig.4 Luminance map obtained by sun-coefficient method (12/22 15:00 pm)


Fig.5 Luminance map obtained by rpict (12/22 15:00 pm)

My commands:
sun-coefficient:

echo “void light solar 0 0 3 1e6 1e6 1e6” > suns.rad
cnt 5185 | rcalc -e MF:6 -f reinsrc.cal -e Rbin=recno -o ‘solar source sun 0 0 4 ${Dx} ${Dy} ${Dz} 0.533’ >> suns.rad
oconv -f mat-black.rad 5pmmodel.rad suns.rad blinds.rad > sunCoefficients.oct

vwrays -vf Views/view.vf -x 600 -y 600 -pj 0.7 -ff | rcontrib -w- -i -ab 1 -ad 256 -lw 1.0e-3 -dc 1 -dt 0 -dj 0 -ffc -n 16 vwrays -vf Views/view.vf -x 600 -y 600 -d -o matrices/cds/hdrIllSpace/viewM6%04d.hdr -e MF:6 -f reinhart.cal -b rbin -bn Nrbins -m solar sunCoefficients.oct

oconv -f mat.rad 5pmmodel.rad glazeVmtx_black.rad > materialMap5Phase.oct

rpict -x 600 -y 600 -ps 1 -av 0.31831 0.31831 0.31831 -ab 0 -vf Views/view.vf materialMap5Phase.oct > matrices/cds/materialMapview.hdr

vwrays -vf Views/view.vf -x 600 -y 600 -pj 0.7 -ff | rcontrib -w- -ab 1 -ad 256 -lw 1.0e-3 -dc 1 -dt 0 -dj 0 -ffc -n 16 vwrays -vf Views/view.vf -x 600 -y 600 -d -o matrices/cds/hdrLumFacadefeye/viewM6%04d.hdr -e MF:6 -f reinhart.cal -b rbin -bn Nrbins -m solar sunCoefficients.oct

for idx in {0000…5185}
do
pcomb -h -e ‘ro=ri(1)*ri(2)+ri(3);go=gi(1)*gi(2)+gi(3);bo=bi(1)*bi(2)+bi(3)’ -o matrices/cds/materialMapview.hdr -o matrices/cds/hdrIllSpacefeye/viewM6${idx}.hdr -o matrices/cds/hdrLumFacadefeye/viewM6${idx}.hdr > matrices/cds/hdr/view${idx}.hdr
done

gendaymtx -5 0.533 -d -m 6 shanghai.wea > shanghai5PM.smx

dctimestep -o results/5ph/cds/hdr/view%04d.hdr matrices/cds/hdr/view%04d.hdr shanghai5PM.smx

Conventional ray-tracing:
gendaylit 1 1 9.500 -a 31.40 -o -121.45 -m -120 -W 293 0 -O 0 > sky10.rad
oconv -f sky10.rad mat-black.rad 5pmmodel.rad blinds.rad > model.oct
rpict -i -lw 1e-5 -ps 1 -ab 1 -ad 1000 -lw 1e-5 -dc 1 -dt 0 -dj 0 -x 600 -y 600 -vf Views/view.vf model.oct > face.hdr

rpict -lw 1e-5 -ps 1 -ab 1 -ad 1000 -lw 1e-5 -dc 1 -dt 0 -dj 0 -x 600 -y 600 -vf Views/view.vf model.oct > win.hdr

oconv mat.rad 5pmmodel.rad glazeVmtx_black.rad > mm.oct
rpict -vf Views/view.vf -ps 1 -x 600 -y 600 -av 0.31831 0.31831 0.31831 -ab 0 mm.oct > MM.hdr
pcomb -h -e “ro=ri(1)*ri(2)+ri(3);go=gi(1)*gi(2)+gi(3);bo=bi(1)*bi(2)+bi(3)” -o MM.hdr -o face.hdr -o win.hdr > 10.hdr

I was hoping someone else with more experience would respond to your post…

It is always true that with Monte Carlo sampling, your initial sampling must be high enough that the highlights you are attempting to capture cover multiple pixels. You can probably improve your result simply by increasing -x and -y beyond 600 in this case. How far beyond you need to go, I am not sure, but you can try doubling it.

Another factor is that rpict looks specifically for small-area light sources in its calculation, whereas rtrace does not. This can have an effect on the size and accuracy of the solar orb integration, but will not help on the reflections. In fact, unless you set -ps 1 for rpict, you may miss important reflections that rtrace will catch, similar to the issue with the shadows from venetian blinds in your previous post.

Cheers,
-Greg

Hi,Greg,
Thanks for your help.
Actually, I had set -ps 1 for the rpict in my simulation but didn’t report. I am sorry for that. In addition, solar positions in HDR images rendered by sun-coefficient slightly differs from those generated by the rpict. Thus, I doubt it’s because the position deviation of sun patches causes the specular reflection light outside the field of view.

Oh, I see the -ps 1 in your command, now. I must have missed it. Again, I don’t have the experience needed to address this properly, but if you are placing suns at the centers of Reinhart patches rather than using the exact solar location at each time step, then I would expect small differences in reflected positions.

Backing up your assumption and Greg’s answer, it seems that the difference in the exact sun position is causing your reflection not to appear. The sun is not exactly at the same place in your figures Fig. 2 and Fig. 3. (just above the second slat in Fig. 2, just below the first slat in Fig. 3). And this comes into play as the slat angle is close to the view direction (appearing approximately projected). In the second example (Fig. 4 and 5) the projected area of the slat is bigger and thus shows the reflection for both version (rcontrib and rpict), though not at the exact same position again.
Best,
David

1 Like