Why does the rendering time of vways-rcontrib vary with image resolution, but rpic doesn't?

I compared the rendering time when rendering the images of different resolutions, and found that the rendering time reduced significantly with the decrease of the resolution of the rendering images using vways-rcontrib, but had no obvious change when using rpict.

uisng vways-rcontrib

using rpict

rpict -vf views/view2.vf -t 20 -lr 10 -lw 1e-5 -ab 4 -aa 0.2 -ad 10000 -x 500 -y 500 m.oct

vwrays -ff -x 500 -y 500 -vf Views/view2.vf | rcontrib -n 16 -ds 0.3 -dc 1 -dt 0 -dj 0 -lw 1e-4 -ab 8 -ad 10000 -ffc vwrays -vf Views/view2.vf -x 500 -y 500 -d -V+ -m skyglow m.oct

This is likely due to the benefit of using the ambient cache, which shares values between neighboring pixels. There is also some benefit to image-plane sampling in rpict, where pixels are interpolated rather than calculated in regions where there is little going on.


Hi, Greg

The results indicate that if the image resolution is lower than 400x400, the ambient cache will increase the computation time. Is it because the increased time caused by the interpolation algorithm offsets the benefits of the ambient cache?

That’s because without the ambient cache, calculation time is linear in the number of pixels. The ambient cache makes it sublinear, so there will always be a cross-over point.