Focusing on black wall. (spotlight location not in scale, it's far away to give uniform illumination on white wall)
Image:
The pixel to the left of the center on the image (=below the black wall on diagram) focuses on empty space, and gets average radiance from the circle of confusion in the background. However, due to the black wall (see blocked red ray), only half of the radiance is to be received in theory. In other words, there must be some darkening of the bright background closer to the black edge at center. The darkening is not there on the image -- problem.
You do check visibility between splat points and randomly-chosen points on the lens, ok.
The problem (as I see) is that there is no flag (for rays) in the theory that distinguishes two cases:
Some radiance is blocked by a surface (=visibility test), resulting in zero radiance, and this zero gets rightfully ignored. This is the usual case, pinhole.
Same radiance, also blocked, also results in zero. But now, this zero has to be taken into account (for averaging over lens area). Special case lensRadius>0.
I didn't think how to fix it properly (and probably won't).
BTW, I didn't read dual photography paper, and adjoint chapter in Veach, but this:
return Spectrum(1 / (A * lensArea * cos2Theta * cos2Theta)); (in PerspectiveCamera::We), with two areas in denominator, would look frankenshteiny to me in his chapter 10.
Hello!
Using v3, but v4 looks affected too.
Setup diagram, view from above.
Focusing on black wall. (spotlight location not in scale, it's far away to give uniform illumination on white wall)
Image:
The pixel to the left of the center on the image (=below the black wall on diagram) focuses on empty space, and gets average radiance from the circle of confusion in the background. However, due to the black wall (see blocked red ray), only half of the radiance is to be received in theory. In other words, there must be some darkening of the bright background closer to the black edge at center. The darkening is not there on the image -- problem.
You do check visibility between splat points and randomly-chosen points on the lens, ok.
The problem (as I see) is that there is no flag (for rays) in the theory that distinguishes two cases:
Some radiance is blocked by a surface (=visibility test), resulting in zero radiance, and this zero gets rightfully ignored. This is the usual case, pinhole.
Same radiance, also blocked, also results in zero. But now, this zero has to be taken into account (for averaging over lens area). Special case lensRadius>0.
I didn't think how to fix it properly (and probably won't).
BTW, I didn't read dual photography paper, and adjoint chapter in Veach, but this:
return Spectrum(1 / (A * lensArea * cos2Theta * cos2Theta));
(in PerspectiveCamera::We), with two areas in denominator, would look frankenshteiny to me in his chapter 10.convert zlens.pfm -level 0,70% -quality 97 zlens.jpg
Sampler "random" "integer pixelsamples" [40] Integrator "bdpt" "integer maxdepth" [1]
LookAt 0 0 -0.2 0 0 0 0 1 0 Camera "perspective" "float fov" [28] "float lensradius" [0.1] "float focaldistance" [0.2] Film "image" "integer xresolution" [128] "integer yresolution" [128] "string filename" "zlens.pfm"
WorldBegin
Material "matte" "color Kd" [0 0 0] "float sigma" [0]
Shape "trianglemesh" "point P" [0 -1 0 0 1 0 1 1 0 1 -1 0] "integer indices" [ 0 1 2 2 3 0]
Material "matte" "color Kd" [1 1 1] "float sigma" [0] Shape "trianglemesh" "point P" [-0.2 -0.2 0.2 -0.2 0.2 0.2 0.2 0.2 0.2 0.2 -0.2 0.2] "integer indices" [ 0 1 2 2 3 0]
LightSource "spot" "point from" [-1 0 -2] "point to" [0 0 0.2] "float coneangle" [5] "float conedeltaangle" [0] "color I" [10 10 10]
WorldEnd