[Radiance-general] Difference in computation time between rtrace and rfluxmtx
Lars O. Grobe
grobe at gmx.net
Thu Dec 21 23:53:42 PST 2017
Hi Antoine,
it is always difficult to give a general answer when it comes to
Radiance, since everything depends on the parameters you chose. Still
I'll try to give some hints.
> First I did /rtrace/ simulations for "point in time" analysis with a
> basic set of parameter that DAYSIM uses.
It would be good if you note down at least all parameters starting with
-a. These control the indirect-diffuse calculation, which takes most of
your rendering times. So you should look out for -ab (number of ambient
"bounces"), -ad (number of directions that are sampled at each bounce),
-aa and -ar (defining at which points the illuminance on the surfaces
will be computed, otherwise a quick interpolation happens in the ambient
cache).
> After I wanted to do Climate Based simulations with the matrix method
> of Daylight Coefficients. So I used /rfluxmtx./
> I'm wondering why I need to use a different set of parameters for this
> two kind of simulations, especially for -ad and -lw.
The main difference is that each pixel value is computed independently
from all others with rfluxmtx (and rcontrib), while rtrace with -aa >
0.0 re-uses a lot of data between pixels. This is what I meant by
"ambient cache" above. The - computationally expensive - ambient
calculation can, in most scenes, happen at a lower resolution than the
direct and specular calculation. Therefore, the illuminance on the
surfaces is not computed pixel by pixel, but for a coarse set of points
(initial defined by -ar, then refined according to the required accuracy
-aa). If the parameters are too low, you will see typical artefacts such
as splotchy images (like soft, cloudy patterns in areas illuminated by
diffuse light).
With rfluxmtx and rcontrib, this mechanism has to be disabled (they set
-aa 0), since the algorithm cannot know the illuminance gradient from
the contribution coefficients (the light sources are unknown at this
point). Without the ambient cache, Radiance will compute the illuminance
(coefficients) each time a ray hits a surface. Making the whole
rendering much slower. A typical artefact of this pixel-by-pixel
approach is pixel noise [1]. To reduce it, you must ensure that a lot (a
lot!) of rays are send out at each ambient bounce. Therefore, you will
typically set high -ad, e.g. 16384, and low -lw, which should be just
smaller than 1/ad (e.g. 1/16384 leading to -lw 6e-5).
> I also noticed that rfluxmtx is much faster than rtrace (even with
> Reinhart sky subdivision -m4) but I do not understand why.
Unfortunately, most of us experience the very opposite, rtrace being
faster due to the ambient cache. However, again, it depends on the
parameters, and on the scene. The use of the ambient cache can be
inefficient e.g. for very complex scenes [1]. Since you took your rtrace
parameters from Daysim, these might be more strict than the default
rfluxmtx parameters. To compare, you would call both programs with the
same parameters (just -aa, -ar would be ignored in rfluxmtx).
Cheers,
Lars.
[1] See Mark's page for a test of parameters to use with very detailed
scenes and no ambient cache:
http://markjstock.org/radmisc/aa0_ps1_test/final.html
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20171222/d6a9bd73/attachment.html>
More information about the Radiance-general
mailing list