I’ve checked that every surface normal is pointing outwards with your
Good to see that the surface geometry is not the culprit.
I’ve used $ rtrace -I scene.oct < input.dat > output.dat
I thought that -ab describes the diffuse bounces. Does it influences
the direct bounces too?
No, but if you would have defined your source by glow, not light, it
would have made a difference.
My light source is defined in the following way:
void light bright
3 1000 0 0
bright source light_q
4 0 -1 0 180
There are two probems with this:
First, “light” defines a source that is tested by deterministic
ray-tracing. E.g. to find its contribution to the local illuminance on a
surface, one ray would be sent to its centre, or (if enabled) each of
its automatically generated partitions. This works fine for point-like
sources, and even for e.g. a typical luminaire at a distance of several
meters. If, however, the subtended solid angle get large, sending one
ray to the centre becomes little meaningful. And partitioning it to the
degree that thousands of samples are distributed over the source area
renders the idea of deterministic ray-tracing superfluous. Therefore,
whenever defining sourfaces that are not “small” when seen from the
illuminated surfaces, it is better to switch to “stochastic sampling”.
Here, random samples are sent out and, whenever hitting other (luminous
or reflective) surfaces, return a contribution to the illuminance (as
part of the ambient calculation, requiring -ab >0). This is more or less
what has been first published as “distributed ray-tracing”, and
triggered if you switch from “light” to “glow”. This is also the reason
why you would usually model the sun as “light”, and the sky hemisphere
as “glow”. So to get a reasonable result, switch from “light” to “glow”,
and run rtrace with -ab 1. The next important parameters will be -ad and
-lw, since they control how many random samples are sent out. With a
large, uniform source this is no problem, but a narrow or non-uniform
“glow”-source, or one seen e.g. through a small aperture, this quickly
leads to -ad settings >10000 and beyond. With rtrace point-sensors, this
may be acceptable, but if you would generate an image the computing cost
would at some point become a serios limitation.
Second, since you may not only want to calculate transmission and
reflection by a diffusely illuminated sample (this is what your 180 deg.
source gives you), you may want to shrink the source diameter. The
problem with this is that the narrower the source gets, the more random
sample rays you will need to hit it. Switching back to “light” with the
narrow source would address this problem. Unfortunately, in the case of
reflection on a dielectric, Radiance would not find the path to the
source any more. This is very similar to the problem of caustics, e.g.
the calculation of the illuminance on a diffuse surface contributed by
perfectly mirror-like reflection from a “light” source. I did not test
it, but you would probably get a correct result for tranmission, but not
reflection with a e.g. 2 deg. source of type “light”.
So this case of measuring illuminance by reflection from a dielectric,
appearing trivial at first sight, can actually be challenging for a
backward ray-tracing algorithm. Please keep this problem in mind for the
future - if you ever need to model such mirror-like reflection toward a
diffuse surface (or virtual sensor plane with rtrace -I), you would
rather use secondary sources by “mirror” or e.g. photon mapping.