How to make the rendering picture less patchy when using rpict

I used rpict to render a daylight illuminance image of an dayligt lit room and beacuse I wanted to computer the direct light only, a very low abounce (-ab 1) was used. However, the rendering picture is very patchy as shown below:

.
I also tried to increase the ambient divison (-ad) to 54446, and reduced direct sampling to 0.09, but it had a little improvement.

Then I tried to use rcontrib to render it and got a smooth picture, but the computation time is very long.

Finally, why is there so big difference between rpict and rcontrib, and how to improve the rendering picture quality when using rpict.

My commands:
rpict -i -vf Views/view.vf -x 600 -y 600 -ab 1 -ad 54446 -ds 0.09 -as 512 -ar 512 -lw 1.0e-5 -dc 1 -dt 0 -dj 0 temp9.oct > surf9RT.hdr

vwrays -ff -x 600 -y 600 -vf Views/view.vf |rcontrib -i -ds 0.3 -dc 1 -dt 0 -dj 0 -lw 1e-3 -ab 1 -ad 128 -ffc vwrays -vf Views/view.vf -x 600 -y 600 -d -m solar -V+ temp9.oct > surf9.hdr

Rcontrib uses pure Monte Carlo sampling, which takes longer but produces more noise for the same number of samples as the “ambient cache” used in rpict, which is the source of the artifacts in your first image.

The trouble is that you are using the “indirect” calculation to compute your “direct” component inside the room from daylight. You can reduce, but not eliminate, the artifacts by two well-known methods:

(1) perform a low-resolution overture rpict run and discard the resulting picture to populate the ambient cache (-af option) before the final high-resolution pass, and

(2) decrease the -aa setting to space the indirect calculations more closely together.

I recommend using both in combination, running the following commands:

rpict -i -vf Views/view.vf -x 60 -y 60 -ab 1 -ad 4096 -aa .05 -af temp9.amb -ds 0.09 -as 512 -ar 512 -lw 1.0e-5 -dc 1 -dt 0 -dj 0 temp9.oct > /dev/null
rpict -i -vf Views/view.vf -x 600 -y 600 -ab 1 -ad 4096 -aa .05 -af temp9.amb -ds 0.09 -as 512 -ar 512 -lw 1.0e-5 -dc 1 -dt 0 -dj 0 temp9.oct > surf9RT.hdr

Alternatively, you can use rtpict with the -n option for multi-processing (assuming you are on a Unix box) with the same options as the second operation, as it randomizes ray samples to avoid these artifacts.

Cheers,
-Greg

1 Like

Hi,Greg,
I used mkillum with -ab of 0 to generate a secondary lighting source and rpict with -ab of 1 to obtain the HDR image. The resulting image is shown as below:


It seems that the quality was very good, and no artifacts. I also compared luminance in this picture with those in the image generated by rcontrib, and the result is similar.

But I still can’t confirm this method is feasible because I didn’t know much about what happened in mkillum.

Excellent – I’m glad you figured this out. I was thinking to suggest mkillum, which was designed to solve this very problem, but it was rather a lot to explain.

Like most things in Radiance, the best way to gain confidence in the different methods is to experiment with them until your results converge.

Best,
-Greg