The direct illumination integrator doesn't correctly weigh the contributions of delta emitters. The easiest way to see this is by rendering a scene with a single point light and
<integrator type="direct">
<integer name="emitter_samples" value="n"/>
<integer name="bsdf_samples" value="0">
</integrator>
In the images below I render a scene with
- a sphere at (0,0,0) with a radius of 1
- a point light at (0,0,2)
- a camera at (0,0,5) looking at (0,0,0)
Full XML scene
<scene version="3.0.0">
<integrator type="direct">
<integer name="emitter_samples" value="10"/>
<integer name="bsdf_samples" value="0"/>
</integrator>
<emitter type="point">
<point name="position" x="0" y="0" z="2"/>
<rgb name="intensity" value="1.0"/>
</emitter>
<shape type="sphere" id="sphere">
<point name="center" x="0" y="0" z="0"/>
<float name="radius" value="1"/>
<bsdf type="diffuse">
</bsdf>
</shape>
<sensor type="perspective" id="sensor">
<float name="fov" value="60"/>
<transform name="to_world">
<lookat origin="0, 0, 5" target="0, 0, 0" up="0, 1, 0"/>
</transform>
<film type="hdrfilm">
<integer name="width" value="128"/>
<integer name="height" value="128"/>
</film>
<sampler type="independent">
<integer name="sample_count" value="1"/>
</sampler>
</sensor>
</scene>
The first image uses emitter_samples=1 and the second image uses emitter_samples=10. The intensity of the point light was not changed.
The RGB values of the second image are 10 times larger than those of the first image.
I think that the fix is very straightforward so I'd like to open a PR tomorrow.
The direct illumination integrator doesn't correctly weigh the contributions of delta emitters. The easiest way to see this is by rendering a scene with a single point light and
In the images below I render a scene with
Full XML scene
The first image uses
emitter_samples=1and the second image usesemitter_samples=10. The intensity of the point light was not changed.The RGB values of the second image are 10 times larger than those of the first image.
I think that the fix is very straightforward so I'd like to open a PR tomorrow.