Integrated photon mapping and material roughness

This was indeed a bug in the new photon-mapping code, and well-spotted by Martin!

I introduced this over-counting bug in my zealous attempt to simplify what Roland had done so skillfully the first time. I took out a macro test that it turns out we need after all, so it has been reinstated in the routines I checked into the HEAD just this morning. It certainly solves the problem in Martin's test case, and hopefully doesn't introduce any new issues. (It shouldn't, being more or less an "undo" of my earlier modification.)

Cheers,
-Greg

···

From: "Martin Klingler" <[email protected]>
Subject: [Radiance-general] Integrated photon mapping and material roughness
Date: August 2, 2015 3:21:22 AM PDT

Hello experts,

playing around with the new integrated photon mapping I met the following strage effect.

First I am using the old version (Radiance 3.7 and Photon map patch 4.3.1) and this very simple geometry (sorry for the german notes):

# LED als IES-Verteilung
# strahlt in Richtung der x-Achse
!xform LED.rad | xform -ry -90 -t -0.2 0 0

# Umlenkspiegel als Metal
void metal spiegel
0
0
5
0.9 0.9 0.9 1 0

!gensurf spiegel mir ’-0.25+s*0.5’ ’-0.25+t*0.5’ ’0’ 1 1 | xform -ry -135

# Testflaeche
void plastic weiss
0
0
5
0.8 0.8 0.8 0 0

!gensurf weiss test ’-4+s*8’ ’-4+t*8’ ’-2’ 1 1

A caustic map is generated like this: mkpmap -apc map2 1000000 -dp 50000

And based on that rad file:

# Rad Input File created by trad Son Aug 2 11:57:29 CEST 2015
DETAIL= Medium
EYESEP= 1
INDIRECT= 1
OCTREE= Dir_Pmap.oct
PENUMBRAS= True
PICTURE= Dir_Pmap
QUALITY= Medium
RESOLUTION= 1024
UP= Z
VARIABILITY= High
ZONE= Interior -4 4 -4 4 -2 0.5
render= -apcb map2 100 2000
scene= System_Pmap.rad
view= g1 -vtl -vp 0 0 -0.5 -vd 0 0 -1 -vu 0 1 0 -vh 8.5 -vv 8.5

I get this output: https://dl.dropboxusercontent.com/u/27495200/HGF.jpg

If I change the roughness for the "spiegel" material to 0.1, I get this output: https://dl.dropboxusercontent.com/u/27495200/RoughF.jpg
which seem to be quite Ok for me.

Now I change to the radiance HEAD from the 4th July. I use the same geometry and the following rad file:

# Rad Input File created by trad Son Aug 2 11:59:05 CEST 2015
DETAIL= Medium
INDIRECT= 0
OCTREE= Pmap1.oct
PCMAP= map3 1000000 50
PENUMBRAS= True
PICTURE= Pmap1rough
QUALITY= Medium
RESOLUTION= 1024
UP= Z
VARIABILITY= High
ZONE= Interior -4 4 -4 4 -2 0.5
mkpmap= -dp 50000
scene= System_Pmap.rad
view= g1 -vtl -vp 0 0 -0.5 -vd 0 0 -1 -vu 0 1 0 -vh 8.5 -vv 8.5

With the roughness of 0.0 I get this output: https://dl.dropboxusercontent.com/u/27495200/HGnF.jpg
Which, compared to a run with mirror material, seems to be even better than the old result.

But when I change to the roughness 0.1 I get this output: https://dl.dropboxusercontent.com/u/27495200/RoughnF.jpg

I already tried differend setting for the bandwidth parameter but the were no fundamental chages.

May thanks for any ideas
Martin Klingler